# HG changeset patch
# User cvs
# Date 1186987805 -7200
# Node ID 859a2309aef875f57a0d9398802d173b30bef147
# Parent ac1f612d52502bf9a155d5cfd1fdd2a5f1124da7
Import from CVS: tag r19-15b93
diff -r ac1f612d5250 -r 859a2309aef8 CHANGES-beta
--- a/CHANGES-beta Mon Aug 13 08:49:44 2007 +0200
+++ b/CHANGES-beta Mon Aug 13 08:50:05 2007 +0200
@@ -1,4 +1,12 @@
-*- indented-text -*-
+to 19.15 beta93
+-- VM-6.13 Courtesy of Kyle Jones
+-- Custom-1.30
+-- Replicating extents are history
+-- tm-7.103.5
+-- Miscellaneous bug fixes
+-- Synch to 20.0 patches
+
to 19.15 beta92
-- gnus-5.4.11
-- tm-7.103.1
diff -r ac1f612d5250 -r 859a2309aef8 configure
--- a/configure Mon Aug 13 08:49:44 2007 +0200
+++ b/configure Mon Aug 13 08:50:05 2007 +0200
@@ -1688,6 +1688,9 @@
;;
## Data General AViiON Machines
+ i586-dg-dgux5.4R4* | i586-dg-dgux5.4.4* )
+ machine=aviion opsys=dgux5-4r4
+ ;;
m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* )
machine=aviion opsys=dgux5-4r3
;;
diff -r ac1f612d5250 -r 859a2309aef8 etc/gnus/gnus-group-subscribe-up.xbm
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/etc/gnus/gnus-group-subscribe-up.xbm Mon Aug 13 08:50:05 2007 +0200
@@ -0,0 +1,12 @@
+#define noname_width 32
+#define noname_height 32
+static char noname_bits[] = {
+ 0x08,0x04,0x00,0x40,0x22,0x51,0x55,0x15,0x88,0x04,0x00,0x20,0x22,0xa0,0xaa,
+ 0x4a,0xc4,0xff,0x3f,0x00,0x61,0x80,0x60,0x55,0x54,0x8a,0xa0,0x80,0x42,0x84,
+ 0x20,0x2b,0x68,0x8a,0xe0,0x83,0x42,0x80,0x00,0x2a,0xd4,0xff,0x00,0x42,0x41,
+ 0x80,0x00,0x16,0x54,0x8a,0x00,0x42,0x41,0x84,0x00,0x2a,0x54,0x8a,0x00,0x82,
+ 0x41,0x80,0x00,0x2a,0xd4,0xff,0x00,0x82,0x42,0x80,0x00,0x2a,0x68,0x8a,0x00,
+ 0x82,0x44,0x84,0x00,0x2a,0x52,0x8a,0x00,0x42,0x40,0x80,0x00,0x16,0xea,0xff,
+ 0x00,0x22,0x40,0x80,0x00,0x4a,0x4a,0x80,0x00,0x02,0x61,0x80,0x00,0x56,0x44,
+ 0x80,0x00,0x02,0x51,0x80,0x00,0x52,0xc4,0xff,0xff,0x0b,0xa1,0x04,0x00,0x42,
+ 0x14,0xa8,0xaa,0x88,0x82,0x02,0x00,0x22};
diff -r ac1f612d5250 -r 859a2309aef8 etc/gnus/gnus-group-subscribe-up.xpm
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/etc/gnus/gnus-group-subscribe-up.xpm Mon Aug 13 08:50:05 2007 +0200
@@ -0,0 +1,38 @@
+/* XPM */
+static char * icon-unsubscribe_xpm[] = {
+"32 32 3 1",
+" c #BFBFBFBFBFBF s backgroundToolBarColor",
+". c #000000000000",
+"X c #FFFFFFFFFFFF",
+" ",
+" ",
+" ",
+" ",
+" ................ ",
+" .XXXXXXXX.XXXXX.. ",
+" .XX.X.XXX.XXXXX.X. ",
+" .XXX.XXXX.XXXXX.XX. ",
+" .XX.X.XXX.XXXXX..... ",
+" .XXXXXXXX.XXXXXXXXX. ",
+" ..........XXXXXXXXX. ",
+" .XXXXXXXX.XXXXXXXXX. ",
+" .XX.X.XXX.XXXXXXXXX. ",
+" .XXX.XXXX.XXXXXXXXX. ",
+" .XX.X.XXX.XXXXXXXXX. ",
+" .XXXXXXXX.XXXXXXXXX. ",
+" ..........XXXXXXXXX. ",
+" .XXXXXXXX.XXXXXXXXX. ",
+" .XX.X.XXX.XXXXXXXXX. ",
+" .XXX.XXXX.XXXXXXXXX. ",
+" .XX.X.XXX.XXXXXXXXX. ",
+" .XXXXXXXX.XXXXXXXXX. ",
+" ..........XXXXXXXXX. ",
+" .XXXXXXXX.XXXXXXXXX. ",
+" .XXXXXXXX.XXXXXXXXX. ",
+" .XXXXXXXX.XXXXXXXXX. ",
+" .XXXXXXXX.XXXXXXXXX. ",
+" .XXXXXXXX.XXXXXXXXX. ",
+" .................... ",
+" ",
+" ",
+" "};
diff -r ac1f612d5250 -r 859a2309aef8 etc/gnus/gnus-group-unsubscribe-up.xbm
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/etc/gnus/gnus-group-unsubscribe-up.xbm Mon Aug 13 08:50:05 2007 +0200
@@ -0,0 +1,12 @@
+#define noname_width 32
+#define noname_height 32
+static char noname_bits[] = {
+ 0x08,0x04,0x00,0x40,0x22,0x51,0x55,0x15,0x88,0x04,0x00,0x20,0x22,0xa0,0xaa,
+ 0x4a,0xc4,0xff,0x3f,0x00,0x61,0x80,0x60,0x55,0x54,0xa0,0xa0,0x80,0x42,0x90,
+ 0x20,0x2b,0x68,0x8a,0xe0,0x83,0x42,0x84,0x00,0x2a,0xd4,0xff,0x00,0x42,0x41,
+ 0x80,0x00,0x16,0x54,0xa0,0x00,0x42,0x41,0x90,0x00,0x2a,0x54,0x8a,0x00,0x82,
+ 0x41,0x84,0x00,0x2a,0xd4,0xff,0x00,0x82,0x42,0x80,0x00,0x2a,0x68,0xa0,0x00,
+ 0x82,0x44,0x90,0x00,0x2a,0x52,0x8a,0x00,0x42,0x40,0x84,0x00,0x16,0xea,0xff,
+ 0x00,0x22,0x40,0x80,0x00,0x4a,0x4a,0x80,0x00,0x02,0x61,0x80,0x00,0x56,0x44,
+ 0x80,0x00,0x02,0x51,0x80,0x00,0x52,0xc4,0xff,0xff,0x0b,0xa1,0x04,0x00,0x42,
+ 0x14,0xa8,0xaa,0x88,0x82,0x02,0x00,0x22};
diff -r ac1f612d5250 -r 859a2309aef8 etc/gnus/gnus-group-unsubscribe-up.xpm
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/etc/gnus/gnus-group-unsubscribe-up.xpm Mon Aug 13 08:50:05 2007 +0200
@@ -0,0 +1,38 @@
+/* XPM */
+static char * icon-subscribe_xpm[] = {
+"32 32 3 1",
+" c #BFBFBFBFBFBF s backgroundToolBarColor",
+". c #000000000000",
+"X c #FFFFFFFFFFFF",
+" ",
+" ",
+" ",
+" ",
+" ................ ",
+" .XXXXXXXX.XXXXX.. ",
+" .XXXXXX.X.XXXXX.X. ",
+" .XXXXX.XX.XXXXX.XX. ",
+" .XX.X.XXX.XXXXX..... ",
+" .XXX.XXXX.XXXXXXXXX. ",
+" ..........XXXXXXXXX. ",
+" .XXXXXXXX.XXXXXXXXX. ",
+" .XXXXXX.X.XXXXXXXXX. ",
+" .XXXXX.XX.XXXXXXXXX. ",
+" .XX.X.XXX.XXXXXXXXX. ",
+" .XXX.XXXX.XXXXXXXXX. ",
+" ..........XXXXXXXXX. ",
+" .XXXXXXXX.XXXXXXXXX. ",
+" .XXXXXX.X.XXXXXXXXX. ",
+" .XXXXX.XX.XXXXXXXXX. ",
+" .XX.X.XXX.XXXXXXXXX. ",
+" .XXX.XXXX.XXXXXXXXX. ",
+" ..........XXXXXXXXX. ",
+" .XXXXXXXX.XXXXXXXXX. ",
+" .XXXXXXXX.XXXXXXXXX. ",
+" .XXXXXXXX.XXXXXXXXX. ",
+" .XXXXXXXX.XXXXXXXXX. ",
+" .XXXXXXXX.XXXXXXXXX. ",
+" .................... ",
+" ",
+" ",
+" "};
diff -r ac1f612d5250 -r 859a2309aef8 etc/gnus/gnus-pointer.xbm
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/etc/gnus/gnus-pointer.xbm Mon Aug 13 08:50:05 2007 +0200
@@ -0,0 +1,6 @@
+#define noname_width 18
+#define noname_height 13
+static char noname_bits[] = {
+ 0x00,0x00,0x00,0xc0,0x0c,0x00,0xe0,0x1f,0x00,0x92,0x39,0x00,0x0e,0x71,0x02,
+ 0x46,0xe0,0x03,0x20,0xc0,0x01,0x00,0x08,0x00,0x10,0x0d,0x00,0xc4,0x08,0x00,
+ 0x78,0x08,0x00,0x18,0x89,0x00,0x00,0x08,0x00};
diff -r ac1f612d5250 -r 859a2309aef8 etc/gnus/gnus-summary-catchup-up.xbm
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/etc/gnus/gnus-summary-catchup-up.xbm Mon Aug 13 08:50:05 2007 +0200
@@ -0,0 +1,12 @@
+#define noname_width 32
+#define noname_height 32
+static char noname_bits[] = {
+ 0x11,0x91,0x11,0x95,0x54,0x25,0x54,0x21,0x02,0x90,0x00,0x84,0xa0,0x0a,0x54,
+ 0x29,0x1b,0xb1,0x11,0x91,0x40,0x0a,0x4a,0x25,0x8a,0xa0,0x20,0x88,0x20,0x14,
+ 0x0e,0x22,0x9b,0x51,0xb7,0x99,0x20,0x14,0x0b,0x02,0x42,0xc1,0x22,0x28,0x14,
+ 0x92,0x48,0x45,0x51,0x19,0x11,0x11,0x14,0x42,0xaa,0x54,0x42,0x88,0x00,0x02,
+ 0x90,0x72,0xaa,0x56,0x15,0x71,0x11,0x17,0x42,0x3a,0x49,0x4b,0x28,0x49,0xa4,
+ 0x22,0x04,0x30,0x02,0x09,0xb1,0xdb,0x59,0xb5,0x15,0xa0,0xd3,0xff,0x40,0x05,
+ 0xbf,0x02,0x2a,0xd3,0x08,0x54,0x91,0x53,0x77,0x7f,0xc8,0xa9,0xd4,0x8a,0x62,
+ 0x22,0x86,0x35,0xc8,0x5b,0x4b,0x67,0x93,0xfd,0x91,0x39,0x24,0x18,0xff,0x7a,
+ 0x90,0x46,0xc5,0xcf,0x25,0x94,0x21,0xf1};
diff -r ac1f612d5250 -r 859a2309aef8 etc/gnus/gnus-summary-catchup-up.xpm
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/etc/gnus/gnus-summary-catchup-up.xpm Mon Aug 13 08:50:05 2007 +0200
@@ -0,0 +1,37 @@
+/* XPM */
+static char * icon-catchup2_xpm[] = {
+"32 32 2 1",
+" c #000000000000",
+". c #BFBFBFBFBFBF s backgroundToolBarColor",
+" ... ... ... ... ... ... ... ...",
+"................................",
+"................................",
+"................................",
+" ... ... ... ... ... ... ... ...",
+"................................",
+"................................",
+"................. .............",
+" ... ... ... ... . ... ... ...",
+"................ ..............",
+"............... ................",
+"................................",
+" ... ... ... ... ... ... ... ...",
+"................................",
+"................................",
+"............. .......... .....",
+" ... ... ... . ... ... . ...",
+"............ .......... ......",
+"........... ........... ........",
+"............ .......... .......",
+" ... ... ... . . ... ... ... ...",
+"............... ..... ",
+"................ ... ......",
+"........ ..... ... ...... .....",
+" ... .. .. . . . . .. . .",
+"....... .... .... ... .. . ... ",
+"...... ...... ... ..... ... ...",
+"...... .. .... ...... .. ..",
+" ... ... . ... .. .. ..",
+"........... .... . .... .",
+".......... ..... ..... .. .",
+".......... ..... ....... ... "};
diff -r ac1f612d5250 -r 859a2309aef8 etc/vm/help-up.xpm
--- a/etc/vm/help-up.xpm Mon Aug 13 08:49:44 2007 +0200
+++ b/etc/vm/help-up.xpm Mon Aug 13 08:50:05 2007 +0200
@@ -3,7 +3,7 @@
"64 42 6 1",
"X c Gray75 s backgroundToolBarColor",
"i c Gray20",
-"@ c yellow",
+"@ c rgb:00/df/ff",
"T c red",
"t c pink",
"o c black",
diff -r ac1f612d5250 -r 859a2309aef8 etc/vm/mime-colorful-dn.xpm
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/etc/vm/mime-colorful-dn.xpm Mon Aug 13 08:50:05 2007 +0200
@@ -0,0 +1,137 @@
+/* XPM */
+static char *mime-colorful-dn[] = {
+/* width height num_colors chars_per_pixel */
+" 64 42 88 2",
+/* colors */
+".. c #878787",
+".# c #818181",
+".a c #7f7f7f",
+".b c #939393",
+".c c #969696",
+".d c #979797",
+".e c #9f9f9f",
+".f c #a7a7a7",
+".g c #a1a1a1",
+".h c #a5a5a5",
+".i c #aeaeae",
+".j c #adadad",
+".k c #959595",
+".l c #9a9a9a",
+".m c #939393",
+".n c #868686",
+".o c #828282",
+".p c #8b8b8b",
+".q c #a3a3a3",
+".r c #838383",
+".s c #8e8e8e",
+".t c #a2a2a2",
+".u c #7d7d7d",
+".v c #7b7b7b",
+".w c #797979",
+".x c #767676",
+".y c #757575",
+".z c #757575",
+".A c #777777",
+".B c #727272",
+".C c #6f6f6f",
+".D c #6a6a6a",
+".E c #636363",
+".F c #6b6b6b",
+".G c #8a8a8a",
+".H c #8e8e8e",
+".I c #676767",
+".J c #6e6e6e",
+".K c #7a7a7a",
+".L c #626262",
+".M c #7e7e7e",
+".N c #8d8d8d",
+".O c #565656",
+".P c #505050",
+".Q c #4d4d4d",
+".R c #494949",
+".S c #434343",
+".T c #404040",
+".U c #575757",
+".V c #393939",
+".W c #3d3d3d",
+".X c #3f3f3f",
+".Y c #4f4f4f",
+".Z c #585858",
+".0 c #5b5b5b",
+".1 c #5a5a5a",
+".2 c #858585",
+".3 c #5e5e5e",
+".4 c #4b4b4b",
+".5 c #7b7b7b",
+".6 c #3a3a3a",
+".7 c #636363",
+".8 c #444444",
+".9 c #3c3c3c",
+"#. c #353535",
+"## c #515151",
+"#a c #323232",
+"#b c #6c6c6c",
+"#c c #6a6a6a",
+"#d c #6f6f6f",
+"#e c #2a2a2a",
+"#f c #666666",
+"#g c #838383",
+"#h c #2d2d2d",
+"#i c #737373",
+"#j c #8f8f8f",
+"#k c #6c6c6c",
+"#l c #a3a3a3",
+"#m c #9f9f9f",
+"#n c Gray60",
+"#o c #969696",
+"#p c #b0b0b0",
+"#q c #ababab",
+"#r c #9e9e9e",
+"#s c #9a9a9a",
+"#t c #8a8a8a",
+"#u c Gray60",
+"#v c #a7a7a7",
+/* pixels */
+"...#.#.......a.a.#.....b.b.c.d.d.d.e.d.e.e.e.e.e.e.f.g.g.h.h.e.f.h.i.h.h.f.h.h.f.h.j.j.f.h.f.j.f.h.j.h.j.h.g.e.e.e.d.d.k.c.l.b.m",
+".b.n...........o...p.b.b.b.b.c.d.d.e.c.d.e.e.e.d.g.e.e.e.g.l.g.e.e.g.g.e.g.q.f.h.h.h.g.h.h.h.j.i.h.h.h.h.e.e.e.e.l.e.c.d.e.c.m.c",
+".r.r...#...........b.b.b.s.b.m.d.d.c.l.e.d.l.e.d.e.m.d.l.d.e.e.e.e.e.e.e.e.d.g.d.e.e.e.h.g.f.h.h.h.h.f.h.g.t.e.e.d.e.d.c.c.d.c.c",
+".#.o.a.#.#.#...#.......p...b.b.b.m.k.d.b.d.d.m.b.b.d.d.b.b.b.m.k.d.d.d.d.d.b.m.k.d.d.d.d.g.g.g.e.e.g.e.g.e.e.d.d.d.d.d.b.k.b.b.d",
+".s.......#.#.#...#.o.#.....#.....p.....p.......#.a.#.#.......#.............b.b.b...b.b.k.e.c.e.d.e.d.e.d.e.e.d.d.k.c.b.b.m.b.m.d",
+".#.#.o.r.a.u.a.u.o.u.u.u.a.#.o.u.u.r.u.u.u.v.u.w.w.x.u.u.u.u.u.u.a.#.o.#.o.............s.s.b.k.k.k.b.k.b.m.b.b.s.......s...b.s.b",
+"...a.u.u.w.u.u.y.w.z.z.u.u.u.z.u.w.z.y.z.z.u.z.z.z.z.z.y.u.w.u.z.#.a.u.#.a.#.#.#...#.....#...........p.b.b...#.o.o.a.o.o.#.s.s.s",
+".a.w.z.u.w.z.w.w.w.z.A.u.z.z.z.B.z.z.A.z.A.z.A.y.z.C.A.z.z.y.w.w.w.a.o.a.#.#.o.a.o...o...#...#.#.#.#.r.#.#...o.a.a.o.u.a.o.o.#..",
+".#.o.u.z.z.z.z.B.B.z.y.B.z.B.B.B.B.B.B.B.B.B.B.B.C.B.B.w.w.w.w.x.u.w.u.u.o...a...#.....#.#...n.#.#.#.n...#.#.o.#.#.....#.o.r.#.#",
+".w.a.w.w.B.B.B.z.B.B.z.B.B.D.C.B.C.B.B.C.D.C.E.C.C.F.z.B.B.B.w.B.u.u.u.u.u.#.#.#.....G.......H...#.#.#.........#.....H..........",
+".w.x.z.z.B.B.z.C.z.B.B.B.C.C.D.C.E.I.C.E.E.D.D.C.B.F.B.B.F.z.w.w.w.u.#.v.o.a...........G...G...b.s.H.s.H.....G.s.H...G.b.s......",
+".w.x.z.B.B.z.A.z.B.B.B.F.C.B.F.E.C.E.E.C.E.F.E.B.J.B.B.B.w.w.w.w.w.o.u.#.o.#.#...n.#.....s...p.s.b...b.b...G.b...G.b...p.b...G..",
+".w.w.w.x.B.#.B.w.B.F.B.B.F.D.B.D.B.D.D.I.F.E.C.D.B.B.F.z.z.z.B.w.z.w.o.K.u.#.o.w.o.n...#.G.....H.b...s.G.b.b.s.H.p.b.b.s...G...#",
+".u.w.w.w.w.w.w.K.u.z.B.B.B.F.B.B.C.D.C.E.F.L.E.L.L.I.E.F.C.C.B.F.B.C.C.z.z.u.M.w.a.o.a.#.....H...s.G.b.b.N...b.....p...s.G.N...#",
+".a.w.a.w.a.o.a.u.y.w.B.B.B.B.C.E.L.O.P.P.Q.R.S.S.T.Q.R.R.R.P.P.U.O.L.L.L.E.B.F.B.B.x.w.M.w.#.o.o.#.#.......s.....s.s.G...s......",
+".#...o...o.r.a.#.u.u.B.C.F.E.P.U.R.V.P.R.V.W.T.V.V.X.S.S.T.Q.R.P.Y.Z.0.1.Z.1.L.1.E.L.B.B.B.x.w.w.o.2...#...G...#.n.s...G.....#..",
+".....#...#.o.r.a.w.w.B.F.3.P.Z.4.R.R.Q.V.S.S.T.W.V.S.V.S.V.S.S.W.R.P.Z.U.L.0.0.L.0.U.L.E.F.C.z.w.a.5.#.#.o.#...#...n.o.#...o....",
+".........#.o.a.o.x.x.C.O.Z.U.R.Y.R.R.R.W.W.S.S.W.W.V.6.6.W.S.W.W.R.S.W.R.S.R.P.Z.L.L.L.0.0.0.7.F.B.x.w.w.K.o.o.o.o...n.....n....",
+".s.H.......o.a.w.x.F.U.Z.U.Y.P.R.Y.R.S.S.8.R.6.S.S.6.S.W.6.9.9.9.9#..9#..6.S.R.Y.U.Z.P##.L.L.0.L.0.F.F.B.x.x.M.o.5...n.n.o...G..",
+".b.s.H...#.n.K.x.F.1.L.L.P.P.4.Y.R.8.Z.Y.L.Z.V.W.R.S.W#..9#.#..6.S.8.8.W.6.W.R.R.R.R.R.Z.L.L.F.L.L.U.0.F.F.M.w.M.o.n.2...o......",
+".s.s...n.#.o.w.F.L.L.L.1.L.L.U.Z.Z.Z.Z.5.7.R.S.S.R.S.9#a.9#.#.#b#b#c.Z.R.W.S.S.Y.R.Y.R.Y.Y.U.7.L.L.F.L.E.F.F.M.M.w.M.o.n.....G.s",
+".s.G.....o.K.M.1.F.F.E.F.L.L.Z#d.o.K.n.n.7.Z.Z.Y.S.W#a#e#a#e.6#d#d.5#b.R.8.S.Y#d.Z.R.R.R.8.Z.Z.U.7.F.B#d.C.B.x.A.#.o.a...G.H.b.k",
+".s.N.G...o.5.B.F.C.C.3.F.F#f#d.n.K.o.n#g#c.Z.Z.Z.S.6#.#e#h#..8#d.5#g.5.Z.8.Y.U.5.5#c.Y.Y.Y.R.Y.L.L.F.F.B.x.F.A.x.5..#g.....b.k.k",
+".H.s...n.o.w.C.F.B.C.C.F#f.M.o#g.n.n.H.G.5#d.U.Y.Y.6#.#a#.#..6#d#b.5#d.Z.Y.Z.7#g.n.5#d.Z.R.Y.Y.P.L.7.F.F.B.o.K.#.o.n...G.H.b.H.d",
+".s.H.....#.w.B.B#i.F#d.B.o.n.n.H.H.n.H#j.5.Z.Z.Z.L.U.Z.Y.6#..W.7#d.7#d.Z.7.7#d.H#j.H.G.5.Z.U.4.Z.Z.L.L#k.A.w.5.o.....G.m.b.k.b.k",
+".s.H...n.#.w.w.x.B.z.B.5.5.n#g.n.n.H#j.H#g#c.L.L#d#d#d.7.Y.R.W.Y.7#d.7.Y.Z#c.n#l#m.G#m.H.A.7.F.L.0.L.C.A.B.F.o.....G.b.H.k.d.d.g",
+".k.H.....n.#.o.w#n#n#n#n#n.n.n.n.H#m.k#o.H.5#c#c#b#b#c#d#d#d#d.7#b#b#d#c#d#d#p#q#l#n#n.5.A.x.M.M.A.A#d.F#d.#.N.G.b.k.k.k.d.g.k.g",
+".b.H.G...n.#.o.5#n#n.B.x#n#n.n.H.k#r.k.t.t.H#d#c#b#b#d#d#c.5#d#d#d#d#d#b#d#l#p.t#q#n#n.M.M.M.M.M.M.o.G.H.G.H.b.k.k.k.d.g#s.d.g#m",
+".H.k.H.H...o.n#n#n.B.B.B#n#n.n.G#n#n#n#n.t#m#g#n#n#n#n#d#d#d#n#n#n#n#d#d#r#n#n#l#n#n.5.5#n#n#n#n.M.5.n.b.k.k.k.k.g.b#m.b.g.g.g.k",
+".d#m.b.k.#.o.o#n#n.x.B.B#n#n.n#n#n.k#l#n#n#p#n#n#d#d#n#n#d#n#n#d#b#n#n.k#n#n#q#n#n#n.n#n#n.M.M#n.o.n.s.G.b.k.g.k.b#m.k.g.g#r.g.k",
+".b.k.b.k...o#n#n.o.w.B.B#n#n#n#n.G.k#r#n#n#n#n#r.5.5#b#d#n#n#b#d#d#n#n#n#n#p#r.H#n#n#n#n.M.A#g#n.o.n.H.H.d#m.d.g.g.g.g.g.e.g.g.g",
+".k.d.g.k.H.o#n#n.w.B.w#n#n.M#n#n#n#n#n#n#r#n#n#l.t#m.H#g#n#n.5.H#n#n#p#n#n#m.G#n#n#t#n#n#n#n#n#n.H.k.H.k.d.g#m.g.g.g.g.g.h.g.g.g",
+".g.e.d.d.H.o#n#n.x.w.w#n#n#n#n.o#g.n.o#g#n#n.s#m#r#n#n#n#n#m#m#u#u#n#n#n#m.G#u#u#n#u#u.n#u#u.n.n.H.H.k#u#u.e#u#u#u#u#u.g.h.h.f.h",
+".e.k.g.k.b#n#n.M.M.M#n#n.5#n#n.a.o#n#n.n#n#n.G.H#n#n.s#n#n.H.H#u#u#u#n#n.N#u#u#u#j#u#u.N#u#u#u.H.H.b#u#u#u.g#u#u.h.h.g#q.h#q.h.h",
+".e#m.d.d.b#n#n#n#n#n#n.o.w.M#n#n#n#n.w.5.##n#n#n#n.H.H.G#n#n#n#u#u#u.G#n#n#u#u#u.H#u#u#n#u#u#u.k.k.H#u#u#u.g#u#u.g.h.h.h.h.i.h.g",
+".d.g.g.k.d.k.p.s...#...n.5.5.#.5.M.A.M.#.5.o...5.n.G...n#g.G#g#u#u#u#u.n#u#u#u#u.k#u#u.b#u#u#u#u.g#u#u#u#u.h#u#u#u#u#u.h#v.f.f#q",
+".g.g.g.g.d.d.b.G.H...G.....n.o.o.A.o.s.M.#.n.5.o.o.n.o#g.x.n.n#u#u.b#u.G#u.k#u#u.H#u#u.g#u#u.g#u.g#u.h#u#u.i#u#u.i.g.i.f.i.g.h.i",
+".g.t.g.g.d.e.k.b.H.H.G.H.G.....5.o.n.o.5...5.G.o.n.....G.M.G..#u#u.d#u#u#u#m#u#u.k#u#u.g#u#u.g#u#u#u.h#u#u.h#u#u.h#q.f#q.h.i.h.j",
+".t.h.h.g.g#r.d.d.H.s.H.b.H.H.G.G.......n.G...G.n.G.H.H.H.n.H.H#u#u.g#m#u.g#m#u#u#r#u#u#r#u#u.h#q#u#q.h#u#u.i#u#u#q.h#q.h.i#q.i.h",
+".g.t.h.g.g.g.k.d.k.b.H.b.H.k.b.H.G.s.n.H.G.H.H.s.H.k.d.k.s.H.H#u#u#m#m#u#s#m#u#u#m#u#u#m#u#u#q.g#u.g#q#u#u.i#u#u#u#u#u#q.h.i.h#q",
+".h.h#v.h.g.g.g#m.d.d.k.d.k.k.k.d.H.k.G.s.H.b.b.k.b.d.b.H.e#m.H.k.g#m#m.g#r.g.g#q.g.h#q.h#q.g#q.h#q#q.h.i.i.h.i.i.i.i.h.i.h.i.h.f",
+".g.g.h.f.h.g.g.e.d.g.b.k.d.k.b.k.k.k.d.b.b.k.k.k.d.d.d.g.k.g.k.g#r.g.g.g.t.g.h#q#m.h#v#q.h#q.h#q#q#q.i#q.i.h.h#q.h.i.h.i.h.f.i.h"
+};
diff -r ac1f612d5250 -r 859a2309aef8 etc/vm/mime-colorful-up.xpm
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/etc/vm/mime-colorful-up.xpm Mon Aug 13 08:50:05 2007 +0200
@@ -0,0 +1,133 @@
+/* XPM */
+static char * mime-fancy-up_xpm[] = {
+"64 42 88 1",
+" c #B8B878785050",
+". c #B0B070705050",
+"X c #B0B070704848",
+"o c #C8C880806060",
+"O c #C8C888885858",
+"+ c #C8C888886060",
+"@ c #D0D090906868",
+"# c #D8D898987070",
+"$ c #D0D090907070",
+"% c #D0D098987070",
+"& c #D8D8A0A08080",
+"* c #D8D8A0A07878",
+"= c #C0C088886060",
+"- c #D0D088886060",
+"; c #C0C088885858",
+": c #B0B078785858",
+"> c #B0B070705858",
+", c #C0C078785858",
+"< c #D0D098986868",
+"1 c #B8B870705050",
+"2 c #C0C080805050",
+"3 c #C8C898987070",
+"4 c #A8A870704848",
+"5 c #B0B068684848",
+"6 c #A8A868684848",
+"7 c #A0A068684848",
+"8 c #A8A860604848",
+"9 c #A0A068684040",
+"0 c #A0A068685050",
+"q c #A0A060604848",
+"w c #989860604848",
+"e c #989858584040",
+"r c #909050504040",
+"t c #909060604040",
+"y c #B8B878786060",
+"u c #B8B880806060",
+"i c #909058584040",
+"p c #989860604040",
+"a c #A0A070704848",
+"s c #808058584040",
+"d c #A8A870705050",
+"f c #B8B880805858",
+"g c #787848483838",
+"h c #686848483838",
+"j c #686840404040",
+"k c #606040403838",
+"l c #585838383838",
+"z c #505038383838",
+"x c #787848484040",
+"c c #484830303838",
+"v c #484838383838",
+"b c #505038383030",
+"n c #606048484040",
+"m c #707050504040",
+"M c #787850504040",
+"N c #808048484040",
+"B c #B0B078785050",
+"V c #808050504040",
+"C c #606040404040",
+"Z c #A0A070705050",
+"A c #404038383838",
+"S c #808058584848",
+"D c #505040403838",
+"F c #484838383030",
+"G c #404030303030",
+"H c #686848484040",
+"J c #383830303030",
+"K c #808068685050",
+"L c #888860604848",
+"P c #888868685050",
+"I c #303028282828",
+"U c #888858584848",
+"Y c #A8A878785858",
+"T c #383828282828",
+"R c #989868684848",
+"E c #B8B880806868",
+"W c #909060604848",
+"Q c #C8C898987878",
+"! c #C8C890907878",
+"~ c #FFFFFFFFFFFF",
+"^ c #C0C088886868",
+"/ c #D0D0A8A88888",
+"( c #D0D0A0A08080",
+") c #C8C890907070",
+"_ c #C8C888887070",
+"` c #B0B080805858",
+"' c #000000000000",
+"] c #D0D098988080",
+" .. XX. ooO+++@+@@@@@@#$$%%@#%&%%#%%#%**#%#*#%*%*%$@@@++=O-o;",
+"o: > ,ooooO++@O+@@@+$@@@$-$@@$$@$<#%%%$%%%*&%%%%@@@@-@O+@O;O",
+"11 . ooo2o;++O-@+-@+@;+-+@@@@@@@@+$+@@@%$#%%%%#%$3@@+@+OO+OO",
+".>X... . , ooo;=+o++;oo++ooo;=+++++o;=++++$$$@@$@$@@+++++o=oo+",
+"2 ... .>. . , , .X.. . ooo oo=@O@+@+@+@@++=Ooo;o;+",
+"..>1X4X4>444X.>44144454667444444X.>.> 22o===o=o;oo2 2 o2o",
+" X446448699444946989949999984649.X4.X... . . ,oo .>>X>>.222",
+"X69469666904999q990909089w0998666X>X..>X> > . ....1.. >XX>4X>>. ",
+".>49999qq98q9qqqqqqqqqqqwqq666674644> X . .. :...: ..>.. .>1..",
+"6X66qqq9qq9qqewqwqqwewrwwt9qqq6q44444... y u ... . u ",
+"6799qq9w9qqqwwewriwrreewqtqqt96664.5>X y y o2u2u y2u yo2 ",
+"679qq909qqqtwqtrwrrwrtrqpqqq66666>4.>.. :. 2 ,2o oo yo yo ,o y ",
+"6667q.q6qtqqteqeqeeitrweqqt999q696>a4.>6>: .y uo 2yoo2u,oo2 y .",
+"4666666a49qqqtqqwewrtsrssirtwwqtqww994d6X>X. u 2yoof o , 2yf .",
+"X6X6X>X486qqqqwrsghhjkllzjkkkhhxgsssrqtqq76d6.>>.. 2 22y 2 ",
+". > >1X.44qwtrhxkchkcvzccbllzjkhnmMNmNsNrsqqq766>B . y .:2 y . ",
+" . .>1X66qtVhmCkkjcllzvclclcllvkhmxsMMsMxsrtw96XZ..>. . :>. > ",
+" .>X>77wgmxknkkkvvllvvcAAvlvvklvklkhmsssMMMStq766a>>>> : : ",
+"2u >X67txmxnhknkllDkAllAlvAFFFFGFGAlknxmhHssMsMttq77d>Z ::> y ",
+"o2u .:a7tNsshhCnkDmnsmcvklvGFGGAlDDvAvkkkkkmsstssxMttd6d>:B > ",
+"22 :.>6tsssNssxmmmmZSkllklFJFGGKKLmkvllnknknnxSsstsrttdd6d>: y2",
+"2y >adNttrtssmP>a::SmmnlvJIJIAPPZKkDlnPmkkkDmmxStqPwq70.>X yuo=",
+"2fy >ZqtwwVttUP:a>:YLmmmlAGITGDPZYZmDnxZZLnnnknssttq7t07Z Y o==",
+"u2 :>6wtqwwtUd>Y::uyZPxnnAGJGGAPKZPmnmSY:ZPmknnhsSttq>a.>: yuou+",
+"2u .6qqRtPq>::uu:uEZmmmsxmnAGvSPSPmSSPuEuyZmxCmmssW06Z> y;o=o=",
+"2u :.667q9qZZ:Y::uEuYLssPPPSnkvnSPSnmL:Q!y!u0StsMsw0qt> you=++$",
+"=u :.>6~~~~~:::u!=^uZLLKKLPPPPSKKPLPP/(Q~~Z07dd00PtP.fyo===+$=$",
+"ouy :.>Z~~q7~~:u=)=33uPLKKPPLZPPPPPKPQ/3(~~dddddd>yuyuo===+$_+$!",
+"u=uu >:~~qqq~~:y~~~~3!Y~~~~PPP~~~~PP)~~Q~~ZZ~~~~dZ:o====$o!o$$$=",
+"+!o=.>>~~7qq~~:~~=Q~~/~~PP~~P~~PK~~=~~(~~~:~~dd~>:2yo=$=o!=$$)$=",
+"o=o= >~~>6qq~~~~y=)~~~~)ZZKP~~KPP~~~~/)u~~~~d0Y~>:uu+!+$$$$$@$$$",
+"=+$=u>~~6q6~~d~~~~~~)~~Q3!uY~~Zu~~/~~!y~~`~~~~~~u=u=+$!$$$$$%$$$",
+"$@++u>~~766~~~~>Y:>Y~~2!)~~~~!!''~~~!y''~'':''::uu=''@'''''$%%#%",
+"@=$=o~~ddd~~Z~~X>~~:~~yu~~2~~uu'''~~f'''E''f'''uuo'''$''%%$(%(%%",
+"@!++o~~~~~~>6d~~~~6Z.~~~~uuy~~~'''y~~'''u''~'''==u'''$''$%%%%&%$",
+"+$$=+=,2 . :ZZ.Zd0d.Z> Z:y :YyY'''':''''=''o''''$''''%'''''%]##(",
+"$$$$++oyu y :>>0>2d.:Z>>:>Y7::''o'y'=''u''$''$'$'%''&''&$&$%&",
+"$3$$+@=ouuyuy Z>:>Z Zy>: ydy ''+'''!''=''$''$'''%''%''%(#(%&%*",
+"3%%$$)++u2uouuyy :y y:yuuu:uu''$!'$!'')'')''%('(%''&''(%(%&(&%",
+"$3%$$$=+=ouou=ouy2:uyuu2u=+=2uu''!!'_!''!''!''($'$(''&'''''(%&%(",
+"%%]%$$$!++=+===+u=y2uoo=o+ou@!u=$!!$)$$($%(%($(%((%&&%&&&&%&%&%#",
+"$$%#%$$@+$o=+=o===+oo===+++$=$=$)$$$3$%(!%](%(%(((&(&%%(%&%&%#&%"};
diff -r ac1f612d5250 -r 859a2309aef8 etc/vm/mime-colorful-xx.xpm
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/etc/vm/mime-colorful-xx.xpm Mon Aug 13 08:50:05 2007 +0200
@@ -0,0 +1,134 @@
+/* XPM */
+static char * mime-fancy-up_xpm[] = {
+"64 42 89 1",
+" c #B8B878785050",
+". c #B0B070705050",
+"X c #B0B070704848",
+"o c #C8C880806060",
+"O c #C8C888885858",
+"+ c #C8C888886060",
+"@ c #D0D090906868",
+"# c #D8D898987070",
+"$ c #D0D090907070",
+"% c #D0D098987070",
+"& c #D8D8A0A08080",
+"* c #D8D8A0A07878",
+"= c #C0C088886060",
+"- c #D0D088886060",
+"; c #C0C088885858",
+": c #B0B078785858",
+"> c #B0B070705858",
+", c #C0C078785858",
+"< c #D0D098986868",
+"1 c #B8B870705050",
+"2 c #C0C080805050",
+"3 c #C8C898987070",
+"4 c #A8A870704848",
+"5 c #B0B068684848",
+"6 c #A8A868684848",
+"7 c #A0A068684848",
+"8 c #A8A860604848",
+"9 c #A0A068684040",
+"0 c #A0A068685050",
+"q c #A0A060604848",
+"w c #989860604848",
+"e c #989858584040",
+"r c #909050504040",
+"t c #909060604040",
+"y c #B8B878786060",
+"u c #B8B880806060",
+"i c #909058584040",
+"p c #989860604040",
+"a c #A0A070704848",
+"s c #808058584040",
+"d c #A8A870705050",
+"f c #B8B880805858",
+"g c #787848483838",
+"h c #686848483838",
+"j c #686840404040",
+"k c #606040403838",
+"l c #585838383838",
+"z c #505038383838",
+"x c #787848484040",
+"c c #484830303838",
+"v c #484838383838",
+"b c #505038383030",
+"n c #606048484040",
+"m c #707050504040",
+"M c #787850504040",
+"N c #808048484040",
+"B c #B0B078785050",
+"V c #808050504040",
+"C c #606040404040",
+"Z c #A0A070705050",
+"A c #404038383838",
+"S c #808058584848",
+"D c #505040403838",
+"F c #484838383030",
+"G c #404030303030",
+"H c #686848484040",
+"J c #383830303030",
+"K c #808068685050",
+"L c #888860604848",
+"P c #888868685050",
+"I c #303028282828",
+"U c #888858584848",
+"Y c #A8A878785858",
+"T c #383828282828",
+"R c #989868684848",
+"E c #B8B880806868",
+"W c #909060604848",
+"Q c #C8C898987878",
+"! c #C8C890907878",
+"~ c Gray60",
+"^ c #C0C088886868",
+"/ c #D0D0A8A88888",
+"( c #D0D0A0A08080",
+") c #C8C890907070",
+"_ c #C8C888887070",
+"` c #B0B080805858",
+"' c Gray60",
+"] c #D0D098988080",
+"[ c black s backgroundToolBarColor",
+" [.[ [X[.[ [o[+[+[+[@[@[@[$[%[@[%[%[#[%[%[*[%[*[%[%[%[@[@[+[O[o[",
+"[:[ [ [>[,[o[o[+[@[+[@[+[@[@[-[@[$[@[<[%[%[%[%[&[%[%[@[@[@[+[O[O",
+"1[ [ [ [ [o[2[;[+[-[+[@[@[+[+[@[@[@[@[$[@[@[$[%[%[#[$[@[+[+[O[O[",
+"[>[.[.[.[ [,[o[o[=[o[+[o[+[o[o[=[+[+[o[=[+[+[$[@[$[$[@[+[+[o[o[+",
+"2[ [.[.[.[.[ [ [,[ [ [ [X[.[ [.[ [ [ [o[ [o[@[@[@[@[@[+[=[o[;[;[",
+"[.[1[4[4[4[4[.[4[1[4[5[6[7[4[4[4[.[.[ [ [ [2[o[=[o[o[o[2[ [2[o[o",
+" [4[6[4[6[9[4[9[6[8[9[9[9[9[4[4[.[4[X[.[ [ [.[ [ [,[o[.[>[>[.[2[",
+"[6[4[9[6[9[4[9[q[9[9[9[8[w[9[8[6[X[X[.[X[ [ [ [.[.[.[ [X[>[X[>[ ",
+".[4[9[9[q[8[9[q[q[q[q[q[w[q[6[6[4[4[>[X[.[ [.[:[.[:[.[>[.[ [>[.[",
+"[X[6[q[9[q[q[e[q[q[w[w[w[t[q[q[q[4[4[.[.[ [ [ [ [.[ [ [.[ [ [ [ ",
+"6[9[q[9[9[q[w[e[r[w[r[e[q[q[t[6[6[.[>[ [ [ [ [ [2[2[ [y[u[y[2[ [",
+"[7[q[9[9[q[t[q[r[r[w[t[q[q[q[6[6[>[.[.[ [.[ [ [2[ [o[y[ [o[,[ [ ",
+"6[6[q[q[q[q[t[q[q[e[t[w[q[t[9[q[9[>[4[>[>[ [y[ [o[2[o[2[,[o[ [ [",
+"[6[6[6[a[9[q[t[q[e[r[s[s[i[t[w[t[w[9[4[6[>[.[ [ [y[o[ [ [,[2[f[.",
+"X[X[X[X[8[q[q[w[s[h[j[l[z[k[k[h[g[s[r[t[q[6[6[>[.[ [ [ [2[y[2[ [",
+"[ [ [1[.[4[w[r[x[c[k[v[c[b[l[j[h[m[N[N[N[s[q[7[6[B[.[y[.[2[y[ [ ",
+" [.[.[1[6[q[V[m[k[j[l[z[c[c[c[l[k[m[s[M[M[s[t[9[X[.[>[ [ [>[ [ [",
+"[ [ [>[>[7[g[x[n[k[v[l[v[c[A[l[v[l[k[k[m[s[M[M[t[7[6[>[>[ [ [:[ ",
+"2[ [ [X[7[x[x[h[n[l[D[A[l[l[A[F[F[F[A[k[x[h[s[M[M[t[7[d[Z[:[>[y[",
+"[2[ [:[7[N[s[h[n[D[n[m[v[l[G[G[A[D[v[v[k[k[m[s[s[x[t[d[d[:[ [ [ ",
+"2[ [.[6[s[s[s[x[m[m[S[l[k[F[F[G[K[m[v[l[k[k[n[S[s[s[t[d[6[>[ [y[",
+"[y[ [a[N[t[t[s[P[a[:[m[n[v[I[I[P[Z[k[l[P[k[k[m[x[t[P[q[0[>[ [u[=",
+"2[y[>[q[w[V[t[P[a[:[L[m[l[G[T[D[Z[Z[D[x[Z[n[n[n[s[t[7[0[Z[Y[ [=[",
+"[2[:[6[t[w[t[d[Y[:[y[P[n[A[J[G[P[Z[m[m[Y[Z[m[n[h[S[t[>[.[:[y[o[+",
+"2[ [.[q[R[P[>[:[u[u[Z[m[s[m[A[v[P[P[S[P[E[y[m[C[m[s[0[Z[ [y[o[o[",
+"[u[:[6[7[9[Z[:[:[u[u[L[s[P[S[k[n[P[n[L[Q[y[u[S[s[s[0[t[ [y[u[+[$",
+"=[ [:[>[~[~[~[:[u[=[u[L[K[L[P[P[K[P[P[/[Q[~[0[d[0[P[P[f[o[=[+[=[",
+"[u[ [.[Z[~[7[~[u[)[3[u[L[K[P[Z[P[P[K[Q[3[~[d[d[d[>[u[u[=[=[$[+[!",
+"u[u[ [:[~[q[~[:[~[~[3[Y[~[~[P[~[~[P[)[~[~[Z[~[~[d[:[=[=[$[![$[$[",
+"[![=[>[~[7[q[~[~[=[~[/[~[P[~[~[P[~[=[~[~[~[~[d[~[:[y[=[=[![$[)[=",
+"o[o[ [~[>[q[~[~[y[)[~[~[Z[K[~[K[P[~[~[)[~[~[d[Y[>[u[+[+[$[$[@[$[",
+"[+[=[>[~[q[~[d[~[~[~[~[Q[![Y[~[u[~[~[![~[`[~[~[~[=[=[$[$[$[$[$[$",
+"$[+[u[~[7[6[~[~[Y[>[~[2[)[~[~[!['[~[!['[~['['[:[u[=['['['['[%[#[",
+"[=[=[~[d[d[~[~[X[~[:[~[u[~[~[u['['[~['['['[f['[u[o['[$['[%[([([%",
+"@[+[o[~[~[~[6[~[~[6[.[~[~[u[~[~['[y[~['[u['['['[=['['['[$[%[%[%[",
+"[$[=[=[2[.[:[Z[Z[0[.[>[Z[y[:[y['['[:['['['[o['['['['[%['['[%[#[(",
+"$[$[+[o[u[y[ [>[0[2[.[Z[>[>[7[:['['['['[u['['[$[$[%['['[&[&[&[%[",
+"[3[$[@[o[u[u[ [Z[:[Z[Z[>[ [y[y['[+['[!['['[$['['['['[%['[([([&[*",
+"3[%[$[+[u[u[u[y[ [ [y[y[y[u[:[u['[![$['[)['['[%['[%['['[([([&[&[",
+"[3[$[$[+[o[o[=[u[2[u[u[2[=[=[u['[!['[!['['[!['[$[$['[&['['[([&[(",
+"%[][$[$[+[=[=[=[u[y[u[o[o[o[@[u[$[![)[$[$[([([([([%[&[&[&[%[%[%[",
+"[$[#[$[@[$[=[=[=[=[o[=[=[+[$[$[$[$[$[$[([%[([([([([([%[([&[&[#[%"};
diff -r ac1f612d5250 -r 859a2309aef8 etc/vm/mime-dn.xbm
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/etc/vm/mime-dn.xbm Mon Aug 13 08:50:05 2007 +0200
@@ -0,0 +1,26 @@
+#define e_width 64
+#define e_height 42
+static char e_bits[] = {
+ 0x39,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xf7,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x42,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0x8f,0xda,0x7f,0xb8,0xff,0xff,0xff,0xff,0x0c,0x41,0x02,0x00,0xf4,
+ 0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00,0xed,0xbf,0xed,0x00,0x00,0x00,0x00,
+ 0x44,0x2f,0x64,0xb2,0x02,0x00,0x00,0x00,0xb0,0x66,0x4c,0x36,0x00,0x00,0x00,
+ 0x00,0x00,0xff,0x78,0xff,0x00,0x00,0x00,0x00,0xd0,0xff,0xff,0xff,0x00,0x00,
+ 0x00,0x00,0x92,0xfd,0xff,0xff,0x00,0x00,0x00,0x00,0x44,0xf7,0xff,0x7f,0x00,
+ 0x00,0x00,0x00,0x00,0xf2,0xff,0x7f,0x20,0x00,0x00,0x00,0x00,0xc0,0xfc,0xff,
+ 0x3e,0x00,0x00,0x00,0x00,0x00,0x77,0xbf,0x6b,0x00,0x00,0x00,0x00,0x00,0x50,
+ 0xf7,0xaf,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0x3f,0x00,0x00,0x00,0x0a,0x00,
+ 0x80,0xfe,0x2f,0x00,0x00,0x68,0x00,0x00,0x00,0xff,0x2f,0x00,0x00,0x68,0x00,
+ 0x00,0x00,0xfc,0x1f,0x00,0x0d,0x3c,0x00,0x00,0x00,0xfa,0x1f,0x80,0x0e,0x3c,
+ 0x02,0x00,0x00,0xfe,0x1f,0xc0,0x0f,0x3c,0x80,0x01,0x20,0xff,0x0f,0xf0,0x0f,
+ 0x20,0x80,0x07,0x80,0xff,0x0f,0xe0,0x1f,0x00,0xc0,0x0f,0xc0,0xff,0x5f,0xff,
+ 0x1f,0x00,0xc0,0x07,0xc0,0xff,0x5f,0xf3,0x3f,0x00,0xe0,0x07,0xfe,0xff,0xff,
+ 0xf1,0xff,0xc7,0xf3,0xf3,0xfc,0xff,0xef,0xf1,0xff,0x6c,0xfe,0x9f,0xff,0xff,
+ 0xff,0xf1,0xff,0x30,0xfe,0xcf,0xff,0xff,0xff,0xd8,0xff,0xbf,0xff,0xff,0xff,
+ 0xff,0xff,0xf8,0xff,0x7f,0x3e,0xc9,0x27,0xf8,0x7f,0x6c,0xff,0x7f,0x1c,0x89,
+ 0x23,0xff,0xff,0xcf,0xe3,0x7f,0x1c,0x89,0x23,0xff,0xff,0x0d,0x60,0x7f,0x08,
+ 0x09,0x21,0xf8,0xff,0xff,0xa6,0x6f,0x2a,0x49,0x25,0xff,0xff,0x7f,0xd7,0x6f,
+ 0x22,0x49,0x24,0xff,0xff,0xff,0xff,0x7f,0x36,0xc9,0x26,0xff,0xff,0xff,0xff,
+ 0x7f,0x36,0xc9,0x26,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff};
diff -r ac1f612d5250 -r 859a2309aef8 etc/vm/mime-simple-dn.xpm
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/etc/vm/mime-simple-dn.xpm Mon Aug 13 08:50:05 2007 +0200
@@ -0,0 +1,57 @@
+/* XPM */
+static char *noname[] = {
+/* width height ncolors chars_per_pixel */
+"64 42 8 1",
+/* colors */
+"` c Gray60",
+"a c #666666666666",
+"b c #9A9A9A9A9A9A",
+"c c #B0B0B0B0B0B0",
+"d c #2A2A2A2A2A2A",
+"e c #878787878787",
+"f c Gray60",
+"g c #434343434343",
+/* pixels */
+"eeeeeeeeeeebbbbbbbbbbbbbbcbbccbccccccccccccccccccccccbbbbbbbbbbb",
+"beeeeeeeeebbbbbbbbbbbbbbbbbbbbbbbbbbbbccccbcccccccccbbbbbbbbbbbb",
+"eeeeeeeeebbbebbbbbbbbbbbbbbbbbbbbbbbbbbbbbbcbcccccccbbbbbbbbbbbb",
+"eeeeeeeeeeeeebbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
+"eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeebbbebbbbbbbbbbbbbbbbbbbbbbb",
+"eeeeeeeeeeeeeeeeeeeeeeeeeaeeeeeeeeeeeeeeeeeeebbbbbbbbbbeeeeeebeb",
+"eeeeeeeaeaaeeeaeeaaaaeaaaaaaeeeaeeeeeeeeeeeeeeeeeeebbeeeeeeeeeee",
+"eeaeeaeeeaeeaaaaaaeaeaeaaaeaaaeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
+"eeeaaaaaaaaaaaaaaaaaaaaaaaaeeeeaeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
+"eeeeaaaaaaaaaaaaaaaaaaaaaaaaaaeaeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
+"eaaaaaaaaaaaaaaaaaaaaaaaaaaaaaeeeeeeeeeeeeeeeeebeeeeeeeeeeebeeee",
+"eaaaaaeaaaaaaaaaaaaaaaaaaaaaeeeeeeeeeeeeeeeeeeeebebbeebeebeebeee",
+"eeeaaeaeaaaaaaaaaaaaaaaaaaaaaaaeaeeeeeeeeeeeeeeebeeebbeeebbeeeee",
+"eeeeeeeeeaaaaaaaaaaaaaaaaaaaaaaaaaaaaeeeeeeeeeeeeebbeebeeeeeeeee",
+"eeeeeeeeaeaaaaaaaagggggggggggggaaaaaaaaaaaeeeeeeeeeeeeeeeeeeeeee",
+"eeeeeeeeeeaaaagagggggggggggggggggaaaaaaaaaaaaaeeeeeeeeeeeeeeeeee",
+"eeeeeeeeeeaaagagggggggggggggggggggaaaaaaaaaaaaaeeeeeeeeeeeeeeeee",
+"eeeeeeeeaaaaaagggggggggggggggggggggggggaaaaaaaaaaaeeeeeeeeeeeeee",
+"eeeeeeeeaaaaaggggggggggggggggggggdgdggggaaggaaaaaaaaaaeeeeeeeeee",
+"beeeeeeaaaaaggggggagaagggggdgddggggggggggggaaaaaaaaaaeeeeeeeeeee",
+"eeeeeeeaaaaaaaaaaaaeaggggggdgddaaaaggggggggggaaaaaaaaaeeeeeeeeee",
+"eeeeeeeaaaaaaaaaeeeeaaagggddddgaaeaggggaaggggaaaaaaaaaaeeeeeeebb",
+"eeeeeeaaaaaaaaaeeeeeaaaaggddddgaeeeaggaeeagggggaaaaaaaeaeeeeebbb",
+"eeeeeeaaaaaaaeeeeeeeeaagggddddgaaeaagaaeeeaaggggaaaaaeeeeeeeebeb",
+"eeeeeeaaaaaaeeeeeeeeeaaaaaaggdgaaaaaaaaeeeeeaagaaaaaeeeeeeebbbbb",
+"eeeeeeeaaaaeeeeeeeeeeaaaaaaaggggaaagaaebbebeeaaaaaaeaaeeeebebbbb",
+"beeeeeeefffffeeeebbbeeaaaaaaaaaaaaaaaaccbffeeaeeeeaaaeeebbbbbbbb",
+"beeeeeeeffaaffeebbbbbeaaaaaaaeaaaaaaabcbcffeeeeeeeeeeebbbbbbbbbb",
+"ebeeeeeffaaaffeeffffbbeffffaaaffffaabffbffeeffffeeebbbbbbbbbbbbb",
+"bbbbeeeffaaaffeffbbffcffaaffaffaaffbffcfffeffeefeeeebbbbbbbbbbbb",
+"bbbbeeffeeaaffffebbffffbeeaaffaaaffffcbeffffeeefeeeebbbbbbbbbbbb",
+"bbbbeeffeaeffeffffffbffbbbeeffeeffcffbeffeffffffebebbbbbbbbbcbbb",
+"bbbbeeffaeeffffeeeeeffebbffffbb``fffbe``f``e``eeeeb``b`````bcccc",
+"bbbbbffeeeffeffeeffeffeeffeffee```ffe```e``e```eeb```b``ccbccccc",
+"bbbbbffffffeeeffffeeeffffeeefff```eff```e``f```bbe```b``bccccccb",
+"bbbbbbeeeeeeeeeeeeeeeeeeeeeeeee````e````b``b````b````c`````ccccc",
+"bbbbbbbeeeeeeeeeeeeeeeeeeeeeaee``b`e`b``e``b``b`b`c``c``cbcccbcc",
+"bbbbbbbbeeeeeeeeeeeeeeeeeeeeeee``b```b``b``b``b```c``c``cccccccc",
+"bccbbbbbeeebeeeeeeeeeeeeeeeeeee``bb`bb``b``b``cc`cc``c``cccccccc",
+"bbcbbbbbbbebebbeeeeeeeeeebbbeee``bb`bb``b``b``cb`bc``c`````ccccc",
+"ccccbbbbbbbbbbbbebeeebbbbbbebbebbbbbbbbcbccccbcccccccccccccccccc",
+"bbcccbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbccbccccccccccccccccccccccc"
+};
diff -r ac1f612d5250 -r 859a2309aef8 etc/vm/mime-simple-up.xpm
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/etc/vm/mime-simple-up.xpm Mon Aug 13 08:50:05 2007 +0200
@@ -0,0 +1,57 @@
+/* XPM */
+static char *noname[] = {
+/* width height ncolors chars_per_pixel */
+"64 42 8 1",
+/* colors */
+"` c #000000000000",
+"a c #B8B878785050",
+"b c #D0D0A8A88888",
+"c c #585838383838",
+"d c #303028282828",
+"e c #FFFFFFFFFFFF",
+"f c #D0D090906868",
+"g c #909050504040",
+/* pixels */
+"aaaaaaaaaaaffffffffffffffffffffffbfffffffbbfffbffbfbfffffffffffa",
+"faaaaaaaaaffffffffffffffffffffffffffffffffffffbbffffffffffffffaf",
+"aaaaaaaaafffafaffffffffffaffffffffffffffffffffffffffffffffffffff",
+"aaaaaaaaaaaaafffafffffafffffffafffffffafffffffffffffffffffffffff",
+"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaafffafffffffffffffffffffafaf",
+"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaafffffffaffaaaaaafaf",
+"aaaaaaaaaggaaagaagaggagggggaaaagaaaaaaaaaaaaaaaaaaaffaaaaaaaaaaa",
+"aagaagaaagaaggggggagagaaggaggaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
+"aaagggggggaggggggggggggggggaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
+"aaaaggggggggggggggggggggggggggagaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
+"aaggggggggggggggggggggggggggggaaaaaaaaaaaaaaaaafaaaaaaaaaaafaaaa",
+"aaggggagggggggggggggggggggggaaaaaaaaaaaaaaaaaaaafaffaafaafaafaaa",
+"aaaagagagggggggggggggggggggggggagaaaaaaaaaaaaaaafaaaffaaaffaaaaa",
+"aaaaaaaaaggggggggggggggggggggggggggggaaaaaaaaaaaaaffaafaaaaaaaaa",
+"aaaaaaaaaaggggggggcccccccccccccggggggggggaaaaaaaaaaaaaaaaaaaaaaa",
+"aaaaaaaaaaggggcgcccccccccccccccccggggggggggggaaaaaaaaaaaaaaaaaaa",
+"aaaaaaaaaagggcgcccccccccccccccccccgggggggggggggaaaaaaaaaaaaaaaaa",
+"aaaaaaaaaaggggcccccccccccccccccccccccccggggggggggaaaaaaaaaaaaaaa",
+"aaaaaaaaaggggccccccccccccccccccccdcdccccggccggggggggaaaaaaaaaaaa",
+"faaaaaaaggggccccccgcggcccccdcddccccccccccccggggggggggaaaaaaaaaaa",
+"aaaaaaaggggggggggggagccccccdcddggggccccccccccgggggggggaaaaaaaaaa",
+"aaaaaaagggggggggaaaagggcccddddcggagccccggccccgggggggggaaaaaaaaff",
+"aaaaaagggggggggaaaaaggggccddddcgaaagccgaagcccccgggggagaaaaaaafff",
+"aaaaaagggggggaaaaaaaaggcccddddcggaggcggaaaggccccgggggaaaaaaaafaf",
+"aaaaaaggggggaaaaaaaaaggggggccdcggggggggaaaaaggcgggggaaaaaaaaffff",
+"aaaaaaaagggaaaaaaaaaagggggggccccgggcggaffafaaggggggaggaaaafaffff",
+"faaaaaaaeeeeeaaaafffaaggggggggggggggggbbfeeaaaaaaagggaaaffffffff",
+"faaaaaaaeegaeeaafffffagggggggagggggggfbfbeeaaaaaaaaaaaffffffffff",
+"afaaaaaeegggeeaaeeeeffaeeeegggeeeeggfeefeeaaeeeeaaafffffffffffff",
+"ffffaaaeeaggeeaeeffeebeeggeegeeggeefeebeeeaeeaaeaaaaffffffffffff",
+"ffffaaeeaaggeeeeaffeeeefaaggeegggeeeebfaeeeeaaaeaaaaffffffffffff",
+"ffffaaeeagaeeaeeeeeefeefffaaeeaaeebeefaeeaeeeeeeafafffffffffffff",
+"ffffaaeeaaaeeeeaaaaaeeaffeeeeff``eeefa``e``a``aaaaf``f`````fffff",
+"fffffeeaaaeeaeeaaeeaeeaaeeaeeaa```eea```a``a```aaf```f``fffbfbff",
+"fffffeeeeeeaaaeeeeaaaeeeeaaaeee```aee```a``e```ffa```f``fffffbff",
+"ffffffaaaaaaaaaaaaaaaaaaaaaaaaa````a````f``f````f````f`````fbffb",
+"fffffffaaaaaaaaaaaaaaaaaaaaaaaa``f`a`f``a``f``f`f`f``b``bfbfbffb",
+"ffffffffaaaaaaaaaaaaaaaaaaaaaaa``f```f``f``f``f```f``f``fbfbfbfb",
+"ffffffffaaafaaaaaaaaaaaaaaaaaaa``ff`ff``f``f``fb`bf``b``bfbfbbbf",
+"ffffffffffafaffaaaaaaaaaafffaaa``ff`ff``f``f``bf`fb``b`````bfbfb",
+"ffbfffffffffffffafaaaffffffaffaffffffffbffbfbfbfbbfbbfbbbbfbfbff",
+"fffffffffffffffffffffffffffffffffffffffbffbbfbfbbbbbbffbfbfbffbf"
+};
diff -r ac1f612d5250 -r 859a2309aef8 etc/vm/mime-simple-xx.xpm
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/etc/vm/mime-simple-xx.xpm Mon Aug 13 08:50:05 2007 +0200
@@ -0,0 +1,57 @@
+/* XPM */
+static char *noname[] = {
+/* width height ncolors chars_per_pixel */
+"64 42 8 1",
+/* colors */
+"` c #000000000000",
+"a c #D0D0A8A88888",
+"b c #B8B870705050",
+"c c #888868685050",
+"d c #999999999999",
+"e c #505040403838",
+"f c #303028282828",
+"g c #787848483838",
+/* pixels */
+"b`b`b`b`b`b`b`b`b`b`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`b`b`b`",
+"`b`b`b`b`b`b`b`b`a`b`a`b`a`a`b`a`a`a`a`a`a`a`a`a`a`a`a`a`a`b`b`b",
+"b`b`b`b`b`b`b`b`b`b`b`a`a`b`b`a`a`a`a`a`a`a`a`a`a`a`a`a`b`b`b`b`",
+"`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`a`a`a`a`a`b`b`b`b`b",
+"b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`a`a`a`a`a`b`b`b`b`b`",
+"`b`b`b`b`b`b`b`b`b`b`b`b`c`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b",
+"b`b`b`b`b`c`b`c`b`b`c`c`c`c`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`",
+"`b`b`c`b`c`b`c`c`c`c`c`b`c`c`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b",
+"b`b`c`c`c`b`c`c`c`c`c`c`c`c`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`",
+"`b`b`c`c`c`c`c`c`c`c`c`c`c`c`c`c`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b",
+"b`c`c`c`c`c`c`c`g`c`g`c`c`c`c`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`",
+"`c`c`c`c`c`c`c`g`g`c`c`c`c`c`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b",
+"b`b`c`c`c`c`c`c`c`c`c`c`c`c`c`c`c`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`",
+"`b`b`b`b`c`c`c`c`c`g`g`g`c`c`c`c`c`c`b`b`b`b`b`b`b`b`b`b`b`b`b`b",
+"b`b`b`b`b`c`c`c`g`g`g`e`e`e`e`g`g`g`g`c`c`b`b`b`b`b`b`b`b`b`b`b`",
+"`b`b`b`b`b`c`g`g`e`e`e`e`e`e`g`g`g`g`g`g`g`c`c`b`b`b`b`b`b`b`b`b",
+"b`b`b`b`b`c`g`g`e`g`e`e`e`e`e`e`e`g`g`g`g`g`c`c`b`b`b`b`b`b`b`b`",
+"`b`b`b`b`c`g`g`e`e`e`e`e`e`e`e`e`e`e`e`g`g`g`g`c`c`b`b`b`b`b`b`b",
+"b`b`b`b`c`g`g`g`e`e`e`e`e`e`e`e`e`e`e`e`g`g`g`g`g`c`c`b`b`b`b`b`",
+"`b`b`b`c`g`g`g`e`e`e`g`e`e`f`f`e`e`e`e`e`e`g`g`g`g`c`b`b`b`b`b`b",
+"b`b`b`b`g`g`g`g`g`g`c`e`e`e`e`f`c`g`e`e`e`e`e`c`g`g`c`b`b`b`b`b`",
+"`b`b`b`g`c`c`g`c`b`b`g`e`e`f`f`c`b`e`e`c`e`e`g`g`c`c`c`c`b`b`b`b",
+"b`b`b`c`c`g`c`c`b`b`c`g`e`f`f`e`b`b`e`g`b`e`e`e`g`c`c`c`b`b`b`b`",
+"`b`b`b`c`c`c`b`b`b`b`c`e`e`f`f`c`b`g`g`b`b`g`e`g`c`c`b`b`b`b`b`b",
+"b`b`b`c`c`c`b`b`b`b`b`g`g`g`e`e`c`c`c`c`b`b`g`e`g`g`c`b`b`b`b`b`",
+"`b`b`b`c`c`b`b`b`b`b`c`g`c`c`e`e`c`e`c`a`b`b`c`g`g`c`c`b`b`b`b`a",
+"b`b`b`b`d`d`d`b`b`b`b`c`c`c`c`c`c`c`c`a`a`d`c`b`c`c`c`b`b`b`b`b`",
+"`b`b`b`b`d`c`d`b`a`a`b`c`c`c`b`c`c`c`a`a`d`b`b`b`b`b`b`b`b`a`b`a",
+"b`b`b`b`d`c`d`b`d`d`a`b`d`d`c`d`d`c`a`d`d`b`d`d`b`b`b`b`a`a`a`a`",
+"`a`b`b`d`c`c`d`d`b`d`a`d`c`d`d`c`d`b`d`d`d`d`b`d`b`b`b`b`a`a`a`b",
+"b`b`b`d`b`c`d`d`b`a`d`d`b`c`d`c`c`d`d`a`d`d`b`b`b`b`b`b`a`a`a`a`",
+"`b`b`b`d`c`d`b`d`d`d`d`a`a`b`d`b`d`d`a`d`b`d`d`d`b`b`a`a`a`a`a`a",
+"a`b`b`d`c`b`d`d`b`b`d`b`a`d`d`a`d`d`a`d`d`d`d`b`b`b`d`d`d`d`a`a`",
+"`b`b`d`b`b`d`d`b`d`b`d`b`d`d`b`d`d`d`d`d`d`b`d`b`b`d`a`d`a`a`a`a",
+"a`b`b`d`d`d`b`d`d`b`b`d`d`b`d`d`d`b`d`d`b`d`d`d`b`d`d`d`a`a`a`a`",
+"`a`b`b`b`b`b`b`b`c`b`b`b`b`b`b`d`d`b`d`d`d`b`d`d`d`d`a`d`d`a`a`a",
+"a`a`b`b`b`b`b`b`c`b`b`b`b`b`c`b`d`d`d`d`b`d`d`a`a`a`d`d`a`a`a`a`",
+"`a`a`a`b`b`b`b`b`b`b`b`b`b`b`b`d`b`d`a`d`d`a`d`d`d`d`a`d`a`a`a`a",
+"a`a`a`b`b`b`b`b`b`b`b`b`b`b`b`b`d`a`a`d`a`d`d`a`d`a`d`d`a`a`a`a`",
+"`a`a`a`b`b`b`b`b`b`b`b`b`b`b`b`d`a`d`a`d`d`a`d`a`a`d`a`d`d`a`a`a",
+"a`a`a`a`b`b`b`b`b`b`b`b`b`b`a`b`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`",
+"`a`a`a`a`a`b`b`b`b`b`b`b`b`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a"
+};
diff -r ac1f612d5250 -r 859a2309aef8 etc/vm/mime-up.xbm
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/etc/vm/mime-up.xbm Mon Aug 13 08:50:05 2007 +0200
@@ -0,0 +1,32 @@
+#define e_width 64
+#define e_height 42
+static unsigned char e_bits[] = {
+ 0xc6, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xbd, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x25, 0x80, 0x47,
+ 0x00, 0x00, 0x00, 0x00, 0xf3, 0xbe, 0xfd, 0xff, 0x0b, 0x00, 0x00, 0x00,
+ 0xfe, 0xff, 0xff, 0xff, 0xff, 0x12, 0x40, 0x12, 0xff, 0xff, 0xff, 0xff,
+ 0xbb, 0xd0, 0x9b, 0x4d, 0xfd, 0xff, 0xff, 0xff, 0x4f, 0x99, 0xb3, 0xc9,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x87, 0x00, 0xff, 0xff, 0xff, 0xff,
+ 0x2f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x6d, 0x02, 0x00, 0x00,
+ 0xff, 0xff, 0xff, 0xff, 0xbb, 0x08, 0x00, 0x80, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0x0d, 0x00, 0x80, 0xdf, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x03, 0x00,
+ 0xc1, 0xff, 0xff, 0xff, 0xff, 0xff, 0x88, 0x40, 0x94, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xaf, 0x08, 0x50, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00,
+ 0xc0, 0xff, 0xff, 0xff, 0xf5, 0xff, 0x7f, 0x01, 0xd0, 0xff, 0xff, 0x97,
+ 0xff, 0xff, 0xff, 0x00, 0xd0, 0xff, 0xff, 0x97, 0xff, 0xff, 0xff, 0x03,
+ 0xe0, 0xff, 0xf2, 0xc3, 0xff, 0xff, 0xff, 0x05, 0xe0, 0x7f, 0xf1, 0xc3,
+ 0xfd, 0xff, 0xff, 0x01, 0xe0, 0x3f, 0xf0, 0xc3, 0x7f, 0xfe, 0xdf, 0x00,
+ 0xf0, 0x0f, 0xf0, 0xdf, 0x7f, 0xf8, 0x7f, 0x00, 0xf0, 0x1f, 0xe0, 0xff,
+ 0x3f, 0xf0, 0x3f, 0x00, 0xa0, 0x00, 0xe0, 0xff, 0x3f, 0xf8, 0x3f, 0x00,
+ 0xa0, 0x0c, 0xc0, 0xff, 0x1f, 0xf8, 0x01, 0x00, 0x00, 0x0e, 0x00, 0x38,
+ 0x0c, 0x0c, 0x03, 0x00, 0x10, 0x0e, 0x00, 0x93, 0x01, 0x60, 0x00, 0x00,
+ 0x00, 0x0e, 0x00, 0xcf, 0x01, 0x30, 0x00, 0x00, 0x00, 0x27, 0x00, 0x40,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x80, 0xc1, 0x36, 0xd8, 0x07,
+ 0x80, 0x93, 0x00, 0x80, 0xe3, 0x76, 0xdc, 0x00, 0x00, 0x30, 0x1c, 0x80,
+ 0xe3, 0x76, 0xdc, 0x00, 0x00, 0xf2, 0x9f, 0x80, 0xf7, 0xf6, 0xde, 0x07,
+ 0x00, 0x00, 0x59, 0x90, 0xd5, 0xb6, 0xda, 0x00, 0x00, 0x80, 0x28, 0x90,
+ 0xdd, 0xb6, 0xdb, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc9, 0x36, 0xd9, 0x00,
+ 0x00, 0x00, 0x00, 0x80, 0xc9, 0x36, 0xd9, 0x07, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ };
diff -r ac1f612d5250 -r 859a2309aef8 etc/vm/mime-xx.xbm
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/etc/vm/mime-xx.xbm Mon Aug 13 08:50:05 2007 +0200
@@ -0,0 +1,26 @@
+#define ee_width 64
+#define ee_height 42
+static char ee_bits[] = {
+ 0xc6,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x70,0x25,0x80,0x47,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0x12,0x40,0x12,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0xfd,0xff,0xff,0xff,0x4f,0x99,0xb3,0xc9,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0x2f,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xbb,0x08,0x00,0x80,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xdf,0xff,0xff,0xff,0xff,0x3f,0x03,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x94,0xff,0xff,0xff,0xff,0xff,0xaf,
+ 0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0xf5,0xff,
+ 0x7f,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xd0,0xff,0xff,0x97,0xff,
+ 0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x7f,0xf1,0xc3,
+ 0xfd,0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x0f,0xf0,
+ 0xdf,0x7f,0xf8,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x00,
+ 0xe0,0xff,0x3f,0xf8,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x0e,0x00,0x38,0x0c,0x0c,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x0e,0x00,0xcf,0x01,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x07,0x00,0x80,0xc1,0x36,0xd8,0x07,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x30,0x1c,0x80,0xe3,0x76,0xdc,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x59,0x90,0xd5,0xb6,0xda,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xc9,0x36,0xd9,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00};
diff -r ac1f612d5250 -r 859a2309aef8 etc/w3/stylesheet
--- a/etc/w3/stylesheet Mon Aug 13 08:49:44 2007 +0200
+++ b/etc/w3/stylesheet Mon Aug 13 08:50:05 2007 +0200
@@ -47,7 +47,6 @@
** Since Emacs-19 doesn't handle mixed-sized fonts very well just yet,
** we only use them under XEmacs. Hopefully, this will change soon.
*/
-
@media xemacs {
h1 { font-size : +12pt }
h2 { font-size : +6pt }
@@ -72,7 +71,6 @@
@media emacs {
h1,h2,h3,
h4,h5,h6 {
- font-style: small-caps;
text-decoration: underline;
color: blue;
}
@@ -88,6 +86,21 @@
blockquote{ display: block; margin-left: 5; margin-right: 5; }
/*
+** How to draw form elements.
+** This is an extension in Emacs-W3 (and perhaps soon E-Scape)
+** Since there are so many different types of input fields, you should be
+** able to control formatting based on that. Enter pseudo-classes.
+**
+** This functionality will be removed as soon as the W3C comes up with
+** the standard way to do this, perhaps in CSS level 2.
+*/
+input { text-decoration: underline; }
+input:submit { color: green; text-decoration: none; }
+input:reset { color: red; text-decoration: none; }
+input:button { color: yellow; text-decoration: none; }
+input:image { text-decoration: none; }
+
+/*
** List formatting instructions
*/
@@ -136,7 +149,6 @@
** Hypertext link coloring
*/
-a { cursor: hand2 }
a:link { color: #FF0000 }
a:visited { color: #B22222 }
a:active { color: #FF0000 }
diff -r ac1f612d5250 -r 859a2309aef8 lib-src/make-docfile.c
--- a/lib-src/make-docfile.c Mon Aug 13 08:49:44 2007 +0200
+++ b/lib-src/make-docfile.c Mon Aug 13 08:50:05 2007 +0200
@@ -91,6 +91,12 @@
static void read_lisp_symbol (FILE *, char *);
static int scan_lisp_file (CONST char *filename, CONST char *mode);
+#define C_IDENTIFIER_CHAR_P(c) \
+ (('A' <= c && c <= 'Z') || \
+ ('a' <= c && c <= 'z') || \
+ ('0' <= c && c <= '9') || \
+ (c == '_'))
+
/* Name this program was invoked with. */
char *progname;
@@ -338,24 +344,31 @@
char c = *p;
int ident_start = 0;
+ /* Add support for ANSI prototypes. Hop over
+ "Lisp_Object" string (the only C type allowed in DEFUNs) */
+ static char lo[] = "Lisp_Object";
+ if ((C_IDENTIFIER_CHAR_P (c) != in_ident) && !in_ident &&
+ (strncmp (p, lo, sizeof (lo) - 1) == 0) &&
+ isspace(*(p + sizeof (lo) - 1)))
+ {
+ p += (sizeof (lo) - 1);
+ while (isspace (*p))
+ p++;
+ c = *p;
+ }
+
/* Notice when we start printing a new identifier. */
- if ((('A' <= c && c <= 'Z')
- || ('a' <= c && c <= 'z')
- || ('0' <= c && c <= '9')
- || c == '_')
- != in_ident)
+ if (C_IDENTIFIER_CHAR_P (c) != in_ident)
{
if (!in_ident)
{
in_ident = 1;
ident_start = 1;
-
#if 0
/* XEmacs - This goes along with the change above. */
if (need_space)
putc (' ', out);
-#endif
-
+#endif
if (minargs == 0 && maxargs > 0)
fprintf (out, "&optional ");
just_spaced = 1;
@@ -377,10 +390,7 @@
`defalt'; unmangle that here. */
if (ident_start
&& strncmp (p, "defalt", 6) == 0
- && ! (('A' <= p[6] && p[6] <= 'Z')
- || ('a' <= p[6] && p[6] <= 'z')
- || ('0' <= p[6] && p[6] <= '9')
- || p[6] == '_'))
+ && ! C_IDENTIFIER_CHAR_P (p[6]))
{
fprintf (out, "DEFAULT");
p += 5;
@@ -496,8 +506,9 @@
if (c != 'F')
continue;
c = getc (infile);
- defunflag = c == 'U';
+ defunflag = (c == 'U');
defvarflag = 0;
+ c = getc (infile);
}
else continue;
@@ -514,7 +525,7 @@
c = read_c_string (infile, -1, 0);
if (defunflag)
- commas = 5;
+ commas = 4;
else if (defvarperbufferflag)
commas = 2;
else if (defvarflag)
@@ -531,7 +542,8 @@
{
do
c = getc (infile);
- while (c == ' ' || c == '\n' || c == '\t');
+ while (c == ' ' || c == '\n' || c == '\t')
+ ;
if (c < 0)
goto eof;
ungetc (c, infile);
@@ -585,12 +597,14 @@
if (defunflag && maxargs != -1)
{
char argbuf[1024], *p = argbuf;
+#if 0 /* For old DEFUN's only */
while (c != ')')
{
if (c < 0)
goto eof;
c = getc (infile);
}
+#endif
/* Skip into arguments. */
while (c != '(')
{
@@ -813,8 +827,17 @@
/* Skip until the first newline; remember the two previous chars. */
while (c != '\n' && c >= 0)
{
+ /* ### Kludge -- Ignore any ESC x x ISO2022 sequences */
+ if (c == 27)
+ {
+ getc (infile);
+ getc (infile);
+ goto nextchar;
+ }
+
c2 = c1;
c1 = c;
+ nextchar:
c = getc (infile);
}
@@ -933,7 +956,7 @@
{
/* If the next three characters aren't `dquote bslash newline'
then we're not reading a docstring. */
- if ((c = getc (infile)) != '"' ||
+ if ((c = getc (infile)) != '"' ||
(c = getc (infile)) != '\\' ||
(c = getc (infile)) != '\n')
{
@@ -946,7 +969,7 @@
}
}
-#ifdef DEBUG
+#if 0 /* causes crash */
else if (! strcmp (buffer, "if") ||
! strcmp (buffer, "byte-code"))
;
diff -r ac1f612d5250 -r 859a2309aef8 lisp/bytecomp/bytecomp.el
--- a/lisp/bytecomp/bytecomp.el Mon Aug 13 08:49:44 2007 +0200
+++ b/lisp/bytecomp/bytecomp.el Mon Aug 13 08:50:05 2007 +0200
@@ -2,7 +2,7 @@
;;; Copyright (C) 1985-1987, 1991-1994 Free Software Foundation, Inc.
-;; Author: Jamie Zawinski
+;; Author: Jamie Zawinski
;; Hallvard Furuseth
;; Keywords: internal
@@ -1226,18 +1226,20 @@
(not (eq (car rest) 'new-scope)))
(setq cell (car rest))
(if (and (= 0 (logand byte-compile-referenced-bit (cdr cell)))
- ;; Don't warn about declared-but-unused arguments, for two
- ;; reasons: first, the arglist structure might be imposed by
- ;; external forces, and we don't have (declare (ignore x)) yet;
- ;; and second, inline expansion produces forms like
+ ;; Don't warn about declared-but-unused arguments,
+ ;; for two reasons: first, the arglist structure
+ ;; might be imposed by external forces, and we don't
+ ;; have (declare (ignore x)) yet; and second, inline
+ ;; expansion produces forms like
;; ((lambda (arg) (byte-code "..." [arg])) x)
- ;; which we can't (ok, well, don't) recognise as containing a
- ;; reference to arg, so every inline expansion would generate
- ;; a warning. (If we had `ignore' then inline expansion could
- ;; emit an ignore declaration.)
+ ;; which we can't (ok, well, don't) recognise as
+ ;; containing a reference to arg, so every inline
+ ;; expansion would generate a warning. (If we had
+ ;; `ignore' then inline expansion could emit an
+ ;; ignore declaration.)
(= 0 (logand byte-compile-arglist-bit (cdr cell)))
- ;; Don't warn about defvars because this is a legitimate special
- ;; binding.
+ ;; Don't warn about defvars because this is a
+ ;; legitimate special binding.
(not (byte-compile-defvar-p (car cell))))
(setq unreferenced (cons (car cell) unreferenced)))
(setq rest (cdr rest)))
diff -r ac1f612d5250 -r 859a2309aef8 lisp/cl/cl-macs.el
--- a/lisp/cl/cl-macs.el Mon Aug 13 08:49:44 2007 +0200
+++ b/lisp/cl/cl-macs.el Mon Aug 13 08:50:05 2007 +0200
@@ -1399,7 +1399,10 @@
(cond ((eq (car-safe spec) 'special)
(if (boundp 'byte-compile-bound-variables)
(setq byte-compile-bound-variables
- (append (cdr spec) byte-compile-bound-variables))))
+ ;; todo: this should compute correct binding bits vs. 0
+ (append (mapcar #'(lambda (v) (cons v 0))
+ (cdr spec))
+ byte-compile-bound-variables))))
((eq (car-safe spec) 'inline)
(while (setq spec (cdr spec))
diff -r ac1f612d5250 -r 859a2309aef8 lisp/custom/custom-edit.el
--- a/lisp/custom/custom-edit.el Mon Aug 13 08:49:44 2007 +0200
+++ b/lisp/custom/custom-edit.el Mon Aug 13 08:50:05 2007 +0200
@@ -4,7 +4,7 @@
;;
;; Author: Per Abrahamsen
;; Keywords: help, faces
-;; Version: 1.24
+;; Version: 1.30
;; X-URL: http://www.dina.kvl.dk/~abraham/custom/
;;; Commentary:
diff -r ac1f612d5250 -r 859a2309aef8 lisp/custom/custom.el
--- a/lisp/custom/custom.el Mon Aug 13 08:49:44 2007 +0200
+++ b/lisp/custom/custom.el Mon Aug 13 08:50:05 2007 +0200
@@ -4,7 +4,7 @@
;;
;; Author: Per Abrahamsen
;; Keywords: help, faces
-;; Version: 1.24
+;; Version: 1.30
;; X-URL: http://www.dina.kvl.dk/~abraham/custom/
;;; Commentary:
@@ -22,14 +22,15 @@
(define-widget-keywords :prefix :tag :load :link :options :type :group)
;; These autoloads should be deleted when the file is added to Emacs
-(autoload 'customize "custom-edit" nil t)
-(autoload 'customize-variable "custom-edit" nil t)
-(autoload 'customize-face "custom-edit" nil t)
-(autoload 'customize-apropos "custom-edit" nil t)
-(autoload 'customize-customized "custom-edit" nil t)
-(autoload 'custom-buffer-create "custom-edit")
-(autoload 'custom-menu-update "custom-edit")
-(autoload 'custom-make-dependencies "custom-edit")
+(unless (fboundp 'load-gc)
+ (autoload 'customize "custom-edit" nil t)
+ (autoload 'customize-variable "custom-edit" nil t)
+ (autoload 'customize-face "custom-edit" nil t)
+ (autoload 'customize-apropos "custom-edit" nil t)
+ (autoload 'customize-customized "custom-edit" nil t)
+ (autoload 'custom-buffer-create "custom-edit")
+ (autoload 'custom-menu-update "custom-edit")
+ (autoload 'custom-make-dependencies "custom-edit"))
;;; Compatibility.
@@ -92,7 +93,7 @@
;;; The `defcustom' Macro.
-;;;###autoload
+;;; Don't ;;;###autoload
(defun custom-declare-variable (symbol value doc &rest args)
"Like `defcustom', but SYMBOL and VALUE are evaluated as notmal arguments."
(unless (and (default-boundp symbol)
@@ -129,7 +130,7 @@
(run-hooks 'custom-define-hook)
symbol)
-;;;###autoload
+;;; Don't ;;;###autoload
(defmacro defcustom (symbol value doc &rest args)
"Declare SYMBOL as a customizable variable that defaults to VALUE.
DOC is the variable documentation.
@@ -154,7 +155,7 @@
;;; The `defface' Macro.
-;;;###autoload
+;;; Don't ;;;###autoload
(defun custom-declare-face (face spec doc &rest args)
"Like `defface', but FACE is evaluated as a normal argument."
(put face 'factory-face spec)
@@ -170,7 +171,7 @@
(run-hooks 'custom-define-hook)
face)
-;;;###autoload
+;;; Don't ;;;###autoload
(defmacro defface (face spec doc &rest args)
"Declare FACE as a customizable face that defaults to SPEC.
FACE does not need to be quoted.
@@ -220,7 +221,7 @@
;;; The `defgroup' Macro.
-;;;###autoload
+;;; Don't ;;;###autoload
(defun custom-declare-group (symbol members doc &rest args)
"Like `defgroup', but SYMBOL is evaluated as a normal argument."
(put symbol 'custom-group (nconc members (get symbol 'custom-group)))
@@ -244,7 +245,7 @@
(run-hooks 'custom-define-hook)
symbol)
-;;;###autoload
+;;; Don't ;;;###autoload
(defmacro defgroup (symbol members doc &rest args)
"Declare SYMBOL as a customization group containing MEMBERS.
SYMBOL does not need to be quoted.
@@ -269,7 +270,7 @@
information."
`(custom-declare-group (quote ,symbol) ,members ,doc ,@args))
-;;;###autoload
+;;; Don't ;;;###autoload
(defun custom-add-to-group (group option widget)
"To existing GROUP add a new OPTION of type WIDGET,
If there already is an entry for that option, overwrite it."
@@ -396,10 +397,10 @@
match)))
(defconst custom-face-attributes
- '((:bold (toggle :format "Bold: %v") custom-set-face-bold)
- (:italic (toggle :format "Italic: %v") custom-set-face-italic)
+ '((:bold (toggle :format "Bold: %[%v%]\n") custom-set-face-bold)
+ (:italic (toggle :format "Italic: %[%v%]\n") custom-set-face-italic)
(:underline
- (toggle :format "Underline: %v") set-face-underline-p)
+ (toggle :format "Underline: %[%v%]\n") set-face-underline-p)
(:foreground (color :tag "Foreground") set-face-foreground)
(:background (color :tag "Background") set-face-background)
(:stipple (editable-field :format "Stipple: %v") set-face-stipple))
@@ -467,7 +468,7 @@
(make-face-italic face frame)
(make-face-unitalic face frame)))
-;;;###autoload
+;;; Don't ;;;###autoload
(defun custom-initialize-faces (&optional frame)
"Initialize all custom faces for FRAME.
If FRAME is nil or omitted, initialize them for all frames."
@@ -479,7 +480,7 @@
;;; Initializing.
-;;;###autoload
+;;; Don't ;;;###autoload
(defun custom-set-variables (&rest args)
"Initialize variables according to user preferences.
@@ -507,7 +508,7 @@
(put symbol 'saved-value (list value)))
(setq args (cdr (cdr args)))))))
-;;;###autoload
+;;; Don't ;;;###autoload
(defun custom-set-faces (&rest args)
"Initialize faces according to user preferences.
The arguments should be a list where each entry has the form:
@@ -581,7 +582,8 @@
(easy-menu-create-keymaps (car custom-help-menu)
(cdr custom-help-menu)))))))
-; (custom-menu-reset)
+(unless (fboundp 'load-gc)
+ (custom-menu-reset))
;;; The End.
diff -r ac1f612d5250 -r 859a2309aef8 lisp/custom/widget-edit.el
--- a/lisp/custom/widget-edit.el Mon Aug 13 08:49:44 2007 +0200
+++ b/lisp/custom/widget-edit.el Mon Aug 13 08:50:05 2007 +0200
@@ -4,7 +4,7 @@
;;
;; Author: Per Abrahamsen
;; Keywords: extensions
-;; Version: 1.24
+;; Version: 1.30
;; X-URL: http://www.dina.kvl.dk/~abraham/custom/
;;; Commentary:
@@ -190,6 +190,20 @@
items nil t)
items)))))
+(defun widget-get-sibling (widget)
+ "Get the item WIDGET is assumed to toggle.
+This is only meaningful for radio buttons or checkboxes in a list."
+ (let* ((parent (widget-get widget :parent))
+ (children (widget-get parent :children))
+ child)
+ (catch 'child
+ (while children
+ (setq child (car children)
+ children (cdr children))
+ (when (eq (widget-get child :button) widget)
+ (throw 'child child)))
+ nil)))
+
;;; Widget text specifications.
;;
;; These functions are for specifying text properties.
@@ -288,9 +302,9 @@
(unless (widget-get widget :size)
(add-text-properties to (1+ to) (list 'field widget
- 'face face
- 'local-map map
- 'keymap map)))))
+ 'face face)))
+ (add-text-properties to (1+ to) (list 'local-map map
+ 'keymap map))))
(defun widget-specify-button (widget from to)
;; Specify button for WIDGET between FROM and TO.
@@ -332,6 +346,10 @@
;;; Widget Properties.
+(defsubst widget-name (widget)
+ "Return the name of WIDGET, asymbol."
+ (car widget))
+
(defun widget-put (widget property value)
"In WIDGET set PROPERTY to VALUE.
The value can later be retrived with `widget-get'."
@@ -491,6 +509,7 @@
(unless widget-keymap
(setq widget-keymap (make-sparse-keymap))
+ (define-key widget-keymap "\C-k" 'widget-kill-line)
(define-key widget-keymap "\t" 'widget-forward)
(define-key widget-keymap "\M-\t" 'widget-backward)
(define-key widget-keymap [(shift tab)] 'widget-backward)
@@ -512,6 +531,8 @@
(unless widget-field-keymap
(setq widget-field-keymap (copy-keymap widget-keymap))
(define-key widget-field-keymap "\C-m" 'widget-field-activate)
+ (define-key widget-field-keymap "\C-a" 'widget-beginning-of-line)
+ (define-key widget-field-keymap "\C-e" 'widget-end-of-line)
(set-keymap-parent widget-field-keymap global-map))
(defvar widget-text-keymap nil
@@ -519,6 +540,8 @@
(unless widget-text-keymap
(setq widget-text-keymap (copy-keymap widget-keymap))
+ (define-key widget-text-keymap "\C-a" 'widget-beginning-of-line)
+ (define-key widget-text-keymap "\C-e" 'widget-end-of-line)
(set-keymap-parent widget-text-keymap global-map))
(defun widget-field-activate (pos &optional event)
@@ -625,6 +648,61 @@
(run-hooks 'widget-backward-hook)
(widget-move (- arg)))
+(defun widget-beginning-of-line ()
+ "Go to beginning of field or beginning of line, whichever is first."
+ (interactive)
+ (let ((bol (save-excursion (beginning-of-line) (point)))
+ (prev (previous-single-property-change (point) 'field)))
+ (goto-char (max bol (or prev bol)))))
+
+(defun widget-end-of-line ()
+ "Go to end of field or end of line, whichever is first."
+ (interactive)
+ (let ((bol (save-excursion (end-of-line) (point)))
+ (prev (next-single-property-change (point) 'field)))
+ (goto-char (min bol (or prev bol)))))
+
+(defun widget-kill-line ()
+ "Kill to end of field or end of line, whichever is first."
+ (interactive)
+ (let ((field (get-text-property (point) 'field))
+ (newline (save-excursion (search-forward "\n")))
+ (next (next-single-property-change (point) 'field)))
+ (if (and field (> newline next))
+ (kill-region (point) next)
+ (call-interactively 'kill-line))))
+
+(defun widget-identify (pos)
+ "Identify the widget under point."
+ (interactive "d")
+ (let* ((field (get-text-property pos 'field))
+ (button (get-text-property pos 'button))
+ (doc (get-text-property pos 'widget-doc))
+ (widget (or field button doc)))
+ (with-output-to-temp-buffer "*Widget Identity*"
+ (princ (cond (field "This is an editable text area.\n")
+ (button "This is an active area.\n")
+ (doc "This is documentation text.\n")
+ (t "This is unidentified text.\n")))
+ (while widget
+ (princ "It is part of a `")
+ (princ (car widget))
+ (princ "' widget (value: ")
+ (prin1 (condition-case nil
+ (widget-value widget)
+ (error 'error)))
+ (princ ").\n")
+ (when (eq (car widget) 'radio-button)
+ (let ((sibling (widget-get-sibling widget)))
+ (if (not sibling)
+ (princ "It doesn't seem to control anything.\n")
+ (princ "The value of its sibling is: ")
+ (prin1 (condition-case nil
+ (widget-value sibling)
+ (error 'error)))
+ (princ ".\n"))))
+ (setq widget (widget-get widget :parent))))))
+
;;; Setting up the buffer.
(defvar widget-field-new nil)
@@ -1231,36 +1309,33 @@
;;; The `toggle' Widget.
-(define-widget 'toggle 'menu-choice
+(define-widget 'toggle 'item
"Toggle between two states."
- :convert-widget 'widget-toggle-convert-widget
- :format "%v"
+ :format "%[%v%]\n"
+ :value-create 'widget-toggle-value-create
+ :action 'widget-toggle-action
+ :match (lambda (widget value) t)
:on "on"
:off "off")
-(defun widget-toggle-convert-widget (widget)
- ;; Create the types representing the `on' and `off' states.
- (let ((on-type (widget-get widget :on-type))
- (off-type (widget-get widget :off-type)))
- (unless on-type
- (setq on-type
- (list 'choice-item
- :value t
- :match (lambda (widget value) value)
- :tag (widget-get widget :on))))
- (unless off-type
- (setq off-type
- (list 'choice-item :value nil :tag (widget-get widget :off))))
- (widget-put widget :args (list on-type off-type)))
- widget)
+(defun widget-toggle-value-create (widget)
+ ;; Insert text representing the `on' and `off' states.
+ (if (widget-value widget)
+ (insert (widget-get widget :on))
+ (insert (widget-get widget :off))))
+(defun widget-toggle-action (widget &optional event)
+ ;; Toggle value.
+ (widget-value-set widget (not (widget-value widget)))
+ (widget-apply widget :notify widget event))
+
;;; The `checkbox' Widget.
(define-widget 'checkbox 'toggle
"A checkbox toggle."
- :convert-widget 'widget-item-convert-widget
- :on-type '(choice-item :format "%[[X]%]" t)
- :off-type '(choice-item :format "%[[ ]%]" nil))
+ :format "%[%v%]"
+ :on "[X]"
+ :off "[ ]")
;;; The `checklist' Widget.
@@ -1427,11 +1502,12 @@
(define-widget 'radio-button 'toggle
"A radio button for use in the `radio' widget."
:notify 'widget-radio-button-notify
- :on-type '(choice-item :format "%[(*)%]" t)
- :off-type '(choice-item :format "%[( )%]" nil))
+ :format "%[%v%]"
+ :on "(*)"
+ :off "( )")
(defun widget-radio-button-notify (widget child &optional event)
- ;; Notify the parent.
+ ;; Tell daddy.
(widget-apply (widget-get widget :parent) :action widget event))
;;; The `radio-button-choice' Widget.
@@ -2074,7 +2150,7 @@
(define-widget 'boolean 'toggle
"To be nil or non-nil, that is the question."
:tag "Boolean"
- :format "%{%t%}: %v")
+ :format "%{%t%}: %[%v%]")
;;; The `color' Widget.
diff -r ac1f612d5250 -r 859a2309aef8 lisp/custom/widget-example.el
--- a/lisp/custom/widget-example.el Mon Aug 13 08:49:44 2007 +0200
+++ b/lisp/custom/widget-example.el Mon Aug 13 08:50:05 2007 +0200
@@ -4,7 +4,7 @@
;;
;; Author: Per Abrahamsen
;; Keywords: help, extensions, faces, hypermedia
-;; Version: 1.24
+;; Version: 1.30
;; X-URL: http://www.dina.kvl.dk/~abraham/custom/
(require 'widget)
diff -r ac1f612d5250 -r 859a2309aef8 lisp/custom/widget.el
--- a/lisp/custom/widget.el Mon Aug 13 08:49:44 2007 +0200
+++ b/lisp/custom/widget.el Mon Aug 13 08:50:05 2007 +0200
@@ -4,7 +4,7 @@
;;
;; Author: Per Abrahamsen
;; Keywords: help, extensions, faces, hypermedia
-;; Version: 1.24
+;; Version: 1.30
;; X-URL: http://www.dina.kvl.dk/~abraham/custom/
;;; Commentary:
diff -r ac1f612d5250 -r 859a2309aef8 lisp/gnus/custom-opt.el
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/gnus/custom-opt.el Mon Aug 13 08:50:05 2007 +0200
@@ -0,0 +1,45 @@
+;;; custom-opt.el --- An option group.
+;;
+;; Copyright (C) 1996 Free Software Foundation, Inc.
+;;
+;; Author: Per Abrahamsen
+;; Keywords: help, faces
+;; Version: 1.24
+;; X-URL: http://www.dina.kvl.dk/~abraham/custom/
+
+;;; Code:
+
+(require 'custom)
+
+(defgroup options nil
+ "This group contains often used customization options."
+ :group 'emacs)
+
+(defvar custom-options
+ '((line-number-mode boolean)
+ (column-number-mode boolean)
+ (debug-on-error boolean)
+ (debug-on-quit boolean)
+ (case-fold-search boolean)
+ (case-replace boolean)
+ (transient-mark-mode boolean))
+ "Alist of customization options.
+The first element of each entry should be a variable name, the second
+a widget type.")
+
+(let ((options custom-options)
+ option name type)
+ (while options
+ (setq option (car options)
+ options (cdr options)
+ name (nth 0 option)
+ type (nth 1 option))
+ (put name 'custom-type type)
+ (custom-add-to-group 'options name 'custom-variable))
+ (run-hooks 'custom-define-hook))
+
+;;; The End.
+
+(provide 'custom-opt)
+
+;; custom-edit.el ends here
diff -r ac1f612d5250 -r 859a2309aef8 lisp/iso/iso-acc.el
--- a/lisp/iso/iso-acc.el Mon Aug 13 08:49:44 2007 +0200
+++ b/lisp/iso/iso-acc.el Mon Aug 13 08:50:05 2007 +0200
@@ -3,11 +3,11 @@
;; Copyright (C) 1993, 1994, 1996 Free Software Foundation, Inc.
;; Author: Johan Vromans
-;; Version: 1.8
-;; Maintainer: FSF
+;; Maintainer: Alexandre Oliva
;; Keywords: i18n
;; Adapted to XEmacs 19.14 by Alexandre Oliva
-;; Last update: Jan 25, 1997
+;; $Revision: 1.3 $
+;; $Date: 1997/02/09 23:51:31 $
;; This file is part of GNU Emacs.
@@ -41,15 +41,16 @@
;; " (second) -> diaeresis
;; ^ (caret) -> circumflex
;; ~ (tilde) -> tilde over the character
-;; / (slash) -> slash through the character.
-;; , (cedilla) -> cedilla under the character (except on default mode).
-;; Also: /A is A-with-ring and /E is AE ligature.
+;; / (slash) -> slash through the character
+;; . (dot) -> dot over the character
+;; , (cedilla) -> cedilla under the character (except on default mode)
+;; Also: /A is A-with-ring and /E is AE ligature.
;;
;; The action taken depends on the key that follows the pseudo accent.
;; In general:
;;
;; pseudo-accent + appropriate letter -> accented letter
-;; pseudo-accent + space -> pseudo-accent (except for comma)
+;; pseudo-accent + space -> pseudo-accent (except comma)
;; pseudo-accent + pseudo-accent -> accent (if available)
;; pseudo-accent + other -> pseudo-accent + other
;;
@@ -72,10 +73,13 @@
(if (fboundp 'read-event) ()
(defun read-event () (event-key (next-command-event))))
-;; needed to work on GNU Emacs (had to use this function on XEmacs)
-(if (fboundp 'character-to-event) ()
- (defun character-to-event (ch &optional event console meta)
- (if (listp ch) (car ch) ch)))
+(if (fboundp 'character-to-event)
+ (defun iso-char-to-event (ch)
+ "returns an event containing the given character"
+ (character-to-event (list ch)))
+ (defun iso-char-to-event (ch)
+ "returns the character itself"
+ ch))
;; needed for compatibility with XEmacs 19.14 and GNU Emacs 19.30
(if (fboundp 'this-single-command-keys) ()
@@ -85,6 +89,8 @@
(this-command-keys))
(defun this-single-command-keys () (this-command-keys))))
+;; end of compatibility modules
+
(defvar iso-languages
'(("portuguese"
(?' (?A . ?\301) (?E . ?\311) (?I . ?\315) (?O . ?\323) (?U . ?\332)
@@ -94,7 +100,8 @@
(?^ (?A . ?\302) (?E . ?\312) (?O . ?\324) (?a . ?\342) (?e . ?\352)
(?o . ?\364) (?\ . ?^) (space . ?^))
(?\" (?U . ?\334) (?u . ?\374) (?\ . ?\") (space . ?\"))
- (?\~ (?A . ?\303) (?O . ?\325) (?a . ?\343) (?o . ?\365) (?\ . ?\~) (space . ?\~))
+ (?\~ (?A . ?\303) (?O . ?\325) (?a . ?\343) (?o . ?\365) (?\ . ?\~)
+ (space . ?\~))
(?, (?c . ?\347) (?C . ?\307)))
("irish"
@@ -103,17 +110,44 @@
(?\ . ?') (space . ?')))
("french"
- (?' (?A . ?\301) (?E . ?\311) (?I . ?\315) (?O . ?\323) (?U . ?\332)
- (?C . ?\307) (?a . ?\341) (?e . ?\351) (?i . ?\355) (?o . ?\363)
- (?u . ?\372) (?c . ?\347) (?\ . ?') (space . ?'))
- (?` (?A . ?\300) (?E . ?\310) (?a . ?\340) (?e . ?\350) (?\ . ?`) (space . ?`))
+ (?' (?E . ?\311) (?C . ?\307) (?e . ?\351) (?c . ?\347) (?\ . ?')
+ (space . ?'))
+ (?` (?A . ?\300) (?E . ?\310) (?a . ?\340) (?e . ?\350) (?\ . ?`)
+ (space . ?`))
(?^ (?A . ?\302) (?E . ?\312) (?I . ?\316) (?O . ?\324) (?U . ?\333)
(?a . ?\342) (?e . ?\352) (?i . ?\356) (?o . ?\364) (?u . ?\373)
(?\ . ?^) (space . ?^))
- (?\" (?U . ?\334) (?u . ?\374) (?\ . ?\") (space . ?\"))
- (?\~ (?A . ?\303) (?O . ?\325) (?a . ?\343) (?o . ?\365) (?\ . ?\~) (space . ?\~))
+ (?\" (?E . ?\313) (?I . ?\317)
+ (?e . ?\353) (?i . ?\357) (?\ . ?\") (space . ?\"))
+ (?\~ (?< . ?\253) (?> . ?\273) (?C . ?\307) (?c . ?\347) (?\ . ?\~)
+ (space . ?\~))
(?, (?c . ?\347) (?C . ?\307)))
+ ;;; ISO-8859-3, developed by D. Dale Gulledge
+ ("latin-3"
+ (?' (?A . ?\301) (?E . ?\311) (?I . ?\315) (?O . ?\323)
+ (?U . ?\332) (?a . ?\341) (?e . ?\351) (?i . ?\355)
+ (?o . ?\363) (?u . ?\372) (?\ . ?') (space . ?'))
+ (?. (?C . ?\305) (?G . ?\325) (?I . ?\251) (?Z . ?\257)
+ (?c . ?\345) (?g . ?\365) (?z . ?\277))
+ (?\" (?A . ?\304) (?E . ?\313) (?I . ?\317) (?O . ?\326)
+ (?U . ?\334) (?a . ?\344) (?e . ?\353) (?i . ?\357)
+ (?o ?\366) (?u ?\374) (?\ . ?\") (space . ?\"))
+ (?\/ (?\/ . ?\260) (?\ . ?/) (space . ?/))
+ (?\~ (?C . ?\307) (?G . ?\253) (?N . ?\321) (?S . ?\252)
+ (?U . ?\335) (?\~ . ?\270) (?c . ?\347) (?g . ?\273)
+ (?h . ?\261) (?n . ?\361) (?u . ?\375)
+ (?\ . ?~) (space . ?~))
+ (?^ (?A . ?\302) (?C . ?\306) (?E . ?\312) (?G . ?\330)
+ (?H . ?\246) (?I . ?\316) (?J . ?\254) (?O . ?\324)
+ (?S . ?\336) (?U . ?\333) (?a . ?\342) (?c . ?\346)
+ (?e . ?\352) (?g . ?\370) (?h . ?\266) (?i . ?\356)
+ (?j . ?\274) (?o . ?\364) (?s . ?\376) (?u . ?\373)
+ (?\ . ?^) (space . \^))
+ (?` (?A . ?\300) (?E . ?\310) (?I . ?\314) (?O . ?\322)
+ (?U . ?\331) (?a . ?\340) (?e . ?\350) (?i . ?\354)
+ (?o . ?\362) (?u . ?\371) (?\ . ?`) (space . ?`)))
+
("latin-2"
(?' (?A . ?\301) (?C . ?\306) (?D . ?\320) (?E . ?\311) (?I . ?\315)
(?L . ?\305) (?N . ?\321) (?O . ?\323) (?R . ?\300) (?S . ?\246)
@@ -190,9 +224,9 @@
See the function `iso-accents-mode'.")
(make-variable-buffer-local 'iso-accents-mode)
-(defvar iso-accents-enable '(?' ?` ?^ ?\" ?~ ?/ ?,)
+(defvar iso-accents-enable '(?' ?` ?^ ?\" ?~ ?/ ?, ?.)
"*List of accent keys that become prefixes in ISO Accents mode.
-The default is (?' ?` ?^ ?\" ?~ ?/ ?,), which contains all the supported
+The default is (?' ?` ?^ ?\" ?~ ?/ ?, ?.), which contains all the supported
accent keys. If you set this variable to a list in which some of those
characters are missing, the missing ones do not act as accents.
@@ -229,15 +263,12 @@
(delete-region (1- (point)) (point)))))
(entry (cdr (assq second-char list))))
(if entry
- ;; Found it: insert the accented character and
- ;; return a do-nothing key
- (vector (character-to-event (list entry)))
+ ;; Found it: return the mapped char
+ (vector (iso-char-to-event entry))
;; Otherwise, advance and schedule the second key for execution.
- (setq unread-command-events (append
- (list
- (character-to-event (list second-char)))
- unread-command-events))
- (vector (character-to-event (list first-char))))))
+ (setq unread-command-events (cons (iso-char-to-event second-char)
+ unread-command-events))
+ (vector (iso-char-to-event first-char)))))
;; It is a matter of taste if you want the minor mode indicated
;; in the mode line...
@@ -283,14 +314,13 @@
;; Enable electric accents.
(setq iso-accents-mode t)))
-(defvar iso-accents-mode-map nil)
-
(defun iso-accents-customize (language)
"Customize the ISO accents machinery for a particular language.
It selects the customization based on the specifications in the
`iso-languages' variable."
(interactive (list (completing-read "Language: " iso-languages nil t)))
- (let ((table (assoc language iso-languages)) tail acc)
+ (let ((table (assoc language iso-languages))
+ tail)
(if (not table)
(error "Unknown language '%s'" language)
(setq iso-language language
@@ -299,57 +329,15 @@
(substitute-key-definition
'iso-accents-accent-key nil key-translation-map)
(setq key-translation-map (make-sparse-keymap)))
- (setq iso-accents-mode-map (make-sparse-keymap))
- (let ((pair (assoc 'iso-accents-mode minor-mode-map-alist)))
- (if pair
- (setcdr pair iso-accents-mode-map)
- (let ((l minor-mode-map-alist))
- (while (cdr l)
- (setq l (cdr l)))
- (setcdr l (list (cons 'iso-accents-mode iso-accents-mode-map))))))
;; Set up translations for all the characters that are used as
;; accent prefixes in this language.
(setq tail iso-accents-list)
(while tail
- (define-key key-translation-map
- (vector (character-to-event (list (car (car tail)))))
+ (define-key key-translation-map (vector (iso-char-to-event
+ (car (car tail))))
'iso-accents-accent-key)
- (setq acc (cdr (car tail)))
- (while acc
- (define-key iso-accents-mode-map
- (vector (character-to-event (list (cdr (car acc)))))
- 'iso-accents-self-insert-unless-redefined)
- (setq acc (cdr acc)))
(setq tail (cdr tail))))))
-(defun iso-accents-self-insert-unless-redefined (prompt)
- "Temporarily disables iso-accents-mode, and checks for additional bindings of the keys that produced its invocation. If no such binding is found, 'self-insert-command is returned"
- (interactive "p")
- (let* ((iso-accents-mode nil)
- (bind (key-binding (this-command-keys)))
- (repeat t) result)
- (while repeat
- (setq result
- (cond ((or (null bind)
- (eq bind 'self-insert-command))
- (setq repeat nil)
- (self-insert-command prompt))
- ((commandp bind)
- (setq repeat nil)
- (call-interactively bind))
- ((or (stringp bind)
- (keymapp bind))
- (setq repeat nil)
- bind)
- ((and (consp bind)
- (stringp (car bind)))
- (setq bind (cdr bind)))
- ((and (consp bind)
- (keymapp (car bind)))
- (setq bind (lookup-key (car bind) (cdr bind))))
- (t (error "Invalid key binding")))))
- result))
-
(defun iso-accentuate (start end)
"Convert two-character sequences in region into accented characters.
Noninteractively, this operates on text from START to END.
diff -r ac1f612d5250 -r 859a2309aef8 lisp/modes/cperl-mode.el
--- a/lisp/modes/cperl-mode.el Mon Aug 13 08:49:44 2007 +0200
+++ b/lisp/modes/cperl-mode.el Mon Aug 13 08:50:05 2007 +0200
@@ -32,7 +32,7 @@
;;; Corrections made by Ilya Zakharevich ilya@math.mps.ohio-state.edu
;;; XEmacs changes by Peter Arius arius@informatik.uni-erlangen.de
-;; $Id: cperl-mode.el,v 1.1.1.3 1996/12/18 03:53:13 steve Exp $
+;; $Id: cperl-mode.el,v 1.2 1997/02/09 23:51:33 steve Exp $
;;; To use this mode put the following into your .emacs file:
@@ -4526,3 +4526,7 @@
(cperl-get-help)
(setq cperl-help-shown t))))
(cperl-lazy-install)))
+
+(provide 'cperl-mode)
+
+;;; cperl-mode.el ends here
diff -r ac1f612d5250 -r 859a2309aef8 lisp/modes/make-mode.el
--- a/lisp/modes/make-mode.el Mon Aug 13 08:49:44 2007 +0200
+++ b/lisp/modes/make-mode.el Mon Aug 13 08:50:05 2007 +0200
@@ -1107,7 +1107,9 @@
(setq makefile-browser-client (current-buffer))
(makefile-pickup-targets)
(makefile-pickup-macros)
- (makefile-browse makefile-target-table makefile-macro-table))
+ (makefile-browse makefile-target-table
+ ;; take out the runtime macros which were added for completion sake -gk
+ (set-difference makefile-macro-table makefile-runtime-macros-list)))
diff -r ac1f612d5250 -r 859a2309aef8 lisp/packages/font-lock.el
--- a/lisp/packages/font-lock.el Mon Aug 13 08:49:44 2007 +0200
+++ b/lisp/packages/font-lock.el Mon Aug 13 08:50:05 2007 +0200
@@ -1158,9 +1158,10 @@
;; Find an occurrence of `matcher' from `start' to `end'.
(setq keyword (car keywords) matcher (car keyword))
(goto-char start)
- (while (if (stringp matcher)
- (re-search-forward matcher end t)
- (funcall matcher end))
+ (while (and (< (point) end)
+ (if (stringp matcher)
+ (re-search-forward matcher end t)
+ (funcall matcher end)))
;; Apply each highlight to this instance of `matcher', which may be
;; specific highlights or more keywords anchored to `matcher'.
(setq highlights (cdr keyword))
diff -r ac1f612d5250 -r 859a2309aef8 lisp/packages/ps-print.el
--- a/lisp/packages/ps-print.el Mon Aug 13 08:49:44 2007 +0200
+++ b/lisp/packages/ps-print.el Mon Aug 13 08:50:05 2007 +0200
@@ -3,7 +3,7 @@
;; Copyright (C) 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
;; Author: Jim Thompson (was )
-;; Maintainer: Jacques Duthen
+;; Maintainer: Jacques Duthen
;; Keywords: print, PostScript
;; Time-stamp: <97/01/29 23:21:25 tjchol01>
;; Version: 3.05
@@ -2445,15 +2445,16 @@
(/ x-color-value ps-print-color-scale))
(defun ps-color-values (x-color)
- (cond ((fboundp 'x-color-values)
+ (cond ((fboundp 'color-instance-rgb-components)
+ (if (ps-color-device)
+ (color-instance-rgb-components
+ (if (color-instance-p x-color) x-color
+ (if (color-specifier-p x-color)
+ (make-color-instance (color-name x-color))
+ (make-color-instance x-color))))
+ (error "No available function to determine X color values.")))
+ ((fboundp 'x-color-values)
(x-color-values x-color))
- ((and (fboundp 'color-instance-rgb-components)
- (ps-color-device))
- (color-instance-rgb-components
- (if (color-instance-p x-color) x-color
- (if (color-specifier-p x-color)
- (make-color-instance (color-name x-color))
- (make-color-instance x-color)))))
(t (error "No available function to determine X color values."))))
(defun ps-face-attributes (face)
diff -r ac1f612d5250 -r 859a2309aef8 lisp/prim/auto-autoloads.el
--- a/lisp/prim/auto-autoloads.el Mon Aug 13 08:49:44 2007 +0200
+++ b/lisp/prim/auto-autoloads.el Mon Aug 13 08:50:05 2007 +0200
@@ -889,135 +889,7 @@
;;;***
-;;;### (autoloads (custom-set-faces custom-set-variables custom-initialize-faces custom-add-to-group defgroup custom-declare-group defface custom-declare-face defcustom custom-declare-variable) "custom" "custom/custom.el")
-
-(autoload 'custom-declare-variable "custom" "\
-Like `defcustom', but SYMBOL and VALUE are evaluated as notmal arguments." nil nil)
-
-(autoload 'defcustom "custom" "\
-Declare SYMBOL as a customizable variable that defaults to VALUE.
-DOC is the variable documentation.
-
-Neither SYMBOL nor VALUE needs to be quoted.
-If SYMBOL is not already bound, initialize it to VALUE.
-The remaining arguments should have the form
-
- [KEYWORD VALUE]...
-
-The following KEYWORD's are defined:
-
-:type VALUE should be a widget type.
-:options VALUE should be a list of valid members of the widget type.
-:group VALUE should be a customization group.
- Add SYMBOL to that group.
-
-Read the section about customization in the emacs lisp manual for more
-information." nil 'macro)
-
-(autoload 'custom-declare-face "custom" "\
-Like `defface', but FACE is evaluated as a normal argument." nil nil)
-
-(autoload 'defface "custom" "\
-Declare FACE as a customizable face that defaults to SPEC.
-FACE does not need to be quoted.
-
-Third argument DOC is the face documentation.
-
-If FACE has been set with `custom-set-face', set the face attributes
-as specified by that function, otherwise set the face attributes
-according to SPEC.
-
-The remaining arguments should have the form
-
- [KEYWORD VALUE]...
-
-The following KEYWORD's are defined:
-
-:group VALUE should be a customization group.
- Add FACE to that group.
-
-SPEC should be an alist of the form ((DISPLAY ATTS)...).
-
-ATTS is a list of face attributes and their values. The possible
-attributes are defined in the variable `custom-face-attributes'.
-Alternatively, ATTS can be a face in which case the attributes of that
-face is used.
-
-The ATTS of the first entry in SPEC where the DISPLAY matches the
-frame should take effect in that frame. DISPLAY can either be the
-symbol `t', which will match all frames, or an alist of the form
-\((REQ ITEM...)...)
-
-For the DISPLAY to match a FRAME, the REQ property of the frame must
-match one of the ITEM. The following REQ are defined:
-
-`type' (the value of (window-system))
- Should be one of `x' or `tty'.
-
-`class' (the frame's color support)
- Should be one of `color', `grayscale', or `mono'.
-
-`background' (what color is used for the background text)
- Should be one of `light' or `dark'.
-
-Read the section about customization in the emacs lisp manual for more
-information." nil 'macro)
-
-(autoload 'custom-declare-group "custom" "\
-Like `defgroup', but SYMBOL is evaluated as a normal argument." nil nil)
-
-(autoload 'defgroup "custom" "\
-Declare SYMBOL as a customization group containing MEMBERS.
-SYMBOL does not need to be quoted.
-
-Third arg DOC is the group documentation.
-
-MEMBERS should be an alist of the form ((NAME WIDGET)...) where
-NAME is a symbol and WIDGET is a widget is a widget for editing that
-symbol. Useful widgets are `custom-variable' for editing variables,
-`custom-face' for edit faces, and `custom-group' for editing groups.
-
-The remaining arguments should have the form
-
- [KEYWORD VALUE]...
-
-The following KEYWORD's are defined:
-
-:group VALUE should be a customization group.
- Add SYMBOL to that group.
-
-Read the section about customization in the emacs lisp manual for more
-information." nil 'macro)
-
-(autoload 'custom-add-to-group "custom" "\
-To existing GROUP add a new OPTION of type WIDGET,
-If there already is an entry for that option, overwrite it." nil nil)
-
-(autoload 'custom-initialize-faces "custom" "\
-Initialize all custom faces for FRAME.
-If FRAME is nil or omitted, initialize them for all frames." nil nil)
-
-(autoload 'custom-set-variables "custom" "\
-Initialize variables according to user preferences.
-
-The arguments should be a list where each entry has the form:
-
- (SYMBOL VALUE [NOW])
-
-The unevaluated VALUE is stored as the saved value for SYMBOL.
-If NOW is present and non-nil, VALUE is also evaluated and bound as
-the default value for the SYMBOL." nil nil)
-
-(autoload 'custom-set-faces "custom" "\
-Initialize faces according to user preferences.
-The arguments should be a list where each entry has the form:
-
- (FACE SPEC [NOW])
-
-SPEC will be stored as the saved value for FACE. If NOW is present
-and non-nil, FACE will also be created according to SPEC.
-
-See `defface' for the format of SPEC." nil nil)
+;;;### (autoloads nil "custom" "custom/custom.el")
;;;***
@@ -3674,7 +3546,7 @@
;;;### (autoloads (ksh-mode) "ksh-mode" "modes/ksh-mode.el")
(autoload 'ksh-mode "ksh-mode" "\
-ksh-mode $Revision: 1.5 $ - Major mode for editing (Bourne, Korn or Bourne again)
+ksh-mode $Revision: 1.6 $ - Major mode for editing (Bourne, Korn or Bourne again)
shell scripts.
Special key bindings and commands:
\\{ksh-mode-map}
@@ -4891,7 +4763,7 @@
(autoload 'vhdl-mode "vhdl-mode" "\
Major mode for editing VHDL code.
-vhdl-mode $Revision: 1.5 $
+vhdl-mode $Revision: 1.6 $
To submit a problem report, enter `\\[vhdl-submit-bug-report]' from a
vhdl-mode buffer. This automatically sets up a mail buffer with version
information already added. You just need to add a description of the
diff -r ac1f612d5250 -r 859a2309aef8 lisp/prim/loadup.el
--- a/lisp/prim/loadup.el Mon Aug 13 08:49:44 2007 +0200
+++ b/lisp/prim/loadup.el Mon Aug 13 08:50:05 2007 +0200
@@ -105,7 +105,7 @@
; defined there.
(load-gc "help")
(load-gc "buff-menu")
- (load-gc "w3-sysdp")
+ ;; (load-gc "w3-sysdp")
(load-gc "font") ; required by widget
(load-gc "widget")
(load-gc "custom") ; Before loaddefs so that defcustom exists.
diff -r ac1f612d5250 -r 859a2309aef8 lisp/prim/minibuf.el
--- a/lisp/prim/minibuf.el Mon Aug 13 08:49:44 2007 +0200
+++ b/lisp/prim/minibuf.el Mon Aug 13 08:50:05 2007 +0200
@@ -162,7 +162,7 @@
map)
"Minibuffer keymap used by shell-command and related commands.")
-(defvar should-use-dialog-box t
+(defvar use-dialog-box t
"Variable controlling usage of the dialog box. If nil, the dialog box
will never be used, even in response to mouse events.")
@@ -2011,12 +2011,14 @@
event, and checks whether dialog-support exists and the current device
supports dialog boxes.
-The dialog box is totally disabled if the variable `should-use-dialog-box'
+The dialog box is totally disabled if the variable `use-dialog-box'
is set to nil."
(and (featurep 'dialog)
(device-on-window-system-p)
- should-use-dialog-box
+ use-dialog-box
(or force-dialog-box-use
(button-press-event-p last-command-event)
(button-release-event-p last-command-event)
(misc-user-event-p last-command-event))))
+
+;;; minibuf.el ends here
diff -r ac1f612d5250 -r 859a2309aef8 lisp/tm/tm-image.el
--- a/lisp/tm/tm-image.el Mon Aug 13 08:49:44 2007 +0200
+++ b/lisp/tm/tm-image.el Mon Aug 13 08:50:05 2007 +0200
@@ -7,7 +7,7 @@
;; Dan Rich
;; Maintainer: MORIOKA Tomohiko
;; Created: 1995/12/15
-;; Version: $Id: tm-image.el,v 1.3 1996/12/29 00:15:14 steve Exp $
+;; Version: $Id: tm-image.el,v 1.4 1997/02/09 23:51:47 steve Exp $
;; Keywords: mail, news, MIME, multimedia, image, picture, X-Face
@@ -224,14 +224,15 @@
(mime-decode-region beg end encoding)
(let ((data (buffer-string))
(minor (assoc-value ctype mime-viewer/image-converter-alist))
- gl)
+ gl e)
(delete-region (point-min)(point-max))
(while (progn
(setq gl (make-glyph (vector minor :data data)))
(eq (image-instance-type (glyph-image-instance gl))
'text)
))
- (make-annotation gl (point) 'text)
+ (setq e (make-extent (point) (point)))
+ (set-extent-end-glyph e gl)
)
(insert "\n")
))
diff -r ac1f612d5250 -r 859a2309aef8 lisp/tm/tm-play.el
--- a/lisp/tm/tm-play.el Mon Aug 13 08:49:44 2007 +0200
+++ b/lisp/tm/tm-play.el Mon Aug 13 08:50:05 2007 +0200
@@ -4,7 +4,7 @@
;; Author: MORIOKA Tomohiko
;; Created: 1995/9/26 (separated from tm-view.el)
-;; Version: $Id: tm-play.el,v 1.3 1997/02/04 02:36:07 steve Exp $
+;; Version: $Id: tm-play.el,v 1.4 1997/02/09 23:51:47 steve Exp $
;; Keywords: mail, news, MIME, multimedia
;; This file is part of tm (Tools for MIME).
@@ -355,10 +355,11 @@
(progn
(or (file-exists-p total-file)
(save-excursion
- (set-buffer (find-file-noselect total-file))
+ (set-buffer
+ (get-buffer-create mime/temp-buffer-name))
(erase-buffer)
(insert total)
- (save-buffer)
+ (write-file total-file)
(kill-buffer (current-buffer))
))
(string-to-number total)
@@ -366,13 +367,14 @@
(and (file-exists-p total-file)
(save-excursion
(set-buffer (find-file-noselect total-file))
- (and (re-search-forward "[0-9]+" nil t)
- (string-to-number
- (buffer-substring (match-beginning 0)
- (match-end 0)))
- )
- (kill-buffer (current-buffer))
- ))
+ (prog1
+ (and (re-search-forward "[0-9]+" nil t)
+ (string-to-number
+ (buffer-substring (match-beginning 0)
+ (match-end 0)))
+ )
+ (kill-buffer (current-buffer))
+ )))
)))
(if (and total (> total 0))
(catch 'tag
@@ -383,9 +385,9 @@
(let ((i 1))
(while (<= i total)
(setq file (concat root-dir "/" (int-to-string i)))
- (if (not (file-exists-p file))
+ (or (file-exists-p file)
(throw 'tag nil)
- )
+ )
(as-binary-input-file (insert-file-contents file))
(goto-char (point-max))
(setq i (1+ i))
@@ -422,6 +424,25 @@
;;; @ rot13-47
;;;
+(require 'view)
+
+(defconst mime-view-text/plain-mode-map (copy-keymap view-mode-map))
+(define-key mime-view-text/plain-mode-map
+ "q" (function mime-view-text/plain-exit))
+
+(defun mime-view-text/plain-mode ()
+ "\\{mime-view-text/plain-mode-map}"
+ (setq buffer-read-only t)
+ (setq major-mode 'mime-view-text/plain-mode)
+ (setq mode-name "MIME-View text/plain")
+ (use-local-map mime-view-text/plain-mode-map)
+ )
+
+(defun mime-view-text/plain-exit ()
+ (interactive)
+ (kill-buffer (current-buffer))
+ )
+
(defun mime-article/decode-caesar (beg end cal)
(let* ((cnum (mime-article/point-content-number beg))
(cur-buf (current-buffer))
@@ -432,7 +453,14 @@
(mode major-mode)
str)
(setq str (buffer-substring beg end))
- (switch-to-buffer new-name)
+ (let ((pwin (or (get-buffer-window mother)
+ (get-largest-window)))
+ (buf (get-buffer-create new-name))
+ )
+ (set-window-buffer pwin buf)
+ (set-buffer buf)
+ (select-window pwin)
+ )
(setq buffer-read-only nil)
(erase-buffer)
(insert str)
@@ -450,7 +478,8 @@
(goto-char (point-max))
(tm:caesar-region)
)
- (view-mode)
+ (set-buffer-modified-p nil)
+ (mime-view-text/plain-mode)
))
diff -r ac1f612d5250 -r 859a2309aef8 lisp/tm/tm-vm.el
--- a/lisp/tm/tm-vm.el Mon Aug 13 08:49:44 2007 +0200
+++ b/lisp/tm/tm-vm.el Mon Aug 13 08:50:05 2007 +0200
@@ -9,7 +9,7 @@
;; Oscar Figueiredo
;; Maintainer: Oscar Figueiredo
;; Created: 1994/10/29
-;; Version: $Revision: 1.3 $
+;; Version: $Revision: 1.4 $
;; Keywords: mail, MIME, multimedia, multilingual, encoded-word
;; This file is part of tm (Tools for MIME).
@@ -36,13 +36,16 @@
;;; Code:
(eval-when-compile
- (require 'tm-edit)
(require 'tm-mail)
(require 'vm)
(require 'vm-window))
+(require 'tm-edit)
(require 'tm-view)
+(require 'vm-reply)
+(require 'vm-summary)
(require 'vm-menu)
+(require 'vm-toolbar)
;;; @ Variables
@@ -60,7 +63,9 @@
(defvar tm-vm/use-original-url-button nil
"*If it is t, use original URL button instead of tm's.")
-(defvar tm-vm/automatic-mime-preview t
+(defvar tm-vm/automatic-mime-preview (or (and (boundp 'vm-display-using-mime)
+ vm-display-using-mime)
+ t)
"*If non-nil, automatically process and show MIME messages.")
(defvar tm-vm/strict-mime t
@@ -91,13 +96,55 @@
If `vm-digest-send-type' is \"rfc1521\", tm-vm runs this hook
instead of `vm-send-digest-hook'.")
+(defvar tm-vm/build-mime-preview-buffer-hook nil
+ "*List of functions called each time a MIME Preview buffer is built.
+These hooks are run in the MIME-Preview buffer.")
;;; @@ System/Information variables
(defconst tm-vm/RCS-ID
- "$Id: tm-vm.el,v 1.3 1997/02/02 05:06:20 steve Exp $")
+ "$Id: tm-vm.el,v 1.4 1997/02/09 23:51:48 steve Exp $")
(defconst tm-vm/version (get-version-string tm-vm/RCS-ID))
+; Ensure vm-menu-mail-menu gets properly defined *before* tm-vm/vm-emulation-map
+; since it contains a call to vm-menu-initialize-vm-mode-menu-map
+(setq vm-menu-mail-menu
+ (let ((title (if (vm-menu-fsfemacs-menus-p)
+ (list "Mail Commands"
+ "Mail Commands"
+ "---"
+ "---")
+ (list "Mail Commands"))))
+ (append
+ title
+ (list ["Send and Exit" vm-mail-send-and-exit (vm-menu-can-send-mail-p)]
+ ["Send, Keep Composing" vm-mail-send (vm-menu-can-send-mail-p)]
+ ["Cancel" kill-buffer t]
+ "----"
+ "Go to Field:"
+ "----"
+ [" To:" mail-to t]
+ [" Subject:" mail-subject t]
+ [" CC:" mail-cc t]
+ [" BCC:" mail-bcc t]
+ [" Reply-To:" mail-replyto t]
+ [" Text" mail-text t]
+ "----"
+ ["Yank Original" vm-menu-yank-original vm-reply-list]
+ ["Fill Yanked Message" mail-fill-yanked-message t]
+ ["Insert Signature" mail-signature t]
+ ["Insert File..." insert-file t]
+ ["Insert Buffer..." insert-buffer t])
+ (if tm-vm/attach-to-popup-menus
+ (list "----"
+ (cons "MIME Commands"
+ (mapcar (function (lambda (item)
+ (vector (nth 1 item)
+ (nth 2 item)
+ t)))
+ mime-editor/menu-list))))
+ )))
+
(defvar tm-vm/vm-emulation-map
(let ((map (make-sparse-keymap)))
(define-key map "h" 'vm-summarize)
@@ -111,16 +158,16 @@
;(define-key map "\C-\M-p" 'vm-move-message-backward)
;(define-key map "\t" 'vm-goto-message-last-seen)
;(define-key map "\r" 'vm-goto-message)
- ;(define-key map "^" 'vm-goto-parent-message)
+ (define-key map "^" 'vm-goto-parent-message)
(define-key map "t" 'vm-expose-hidden-headers)
(define-key map " " 'vm-scroll-forward)
(define-key map "b" 'vm-scroll-backward)
(define-key map "\C-?" 'vm-scroll-backward)
- ;(define-key map "d" 'vm-delete-message)
- ;(define-key map "\C-d" 'vm-delete-message-backward)
- ;(define-key map "u" 'vm-undelete-message)
- ;(define-key map "U" 'vm-unread-message)
- ;(define-key map "e" 'vm-edit-message)
+ (define-key map "d" 'vm-delete-message)
+ (define-key map "\C-d" 'vm-delete-message-backward)
+ (define-key map "u" 'vm-undelete-message)
+ (define-key map "U" 'vm-unread-message)
+ (define-key map "e" 'vm-edit-message)
;(define-key map "a" 'vm-set-message-attributes)
;(define-key map "j" 'vm-discard-cached-data)
;(define-key map "k" 'vm-kill-subject)
@@ -138,12 +185,12 @@
(define-key map "g" 'vm-get-new-mail)
;(define-key map "G" 'vm-sort-messages)
(define-key map "v" 'vm-visit-folder)
- ;(define-key map "s" 'vm-save-message)
+ (define-key map "s" 'vm-save-message)
;(define-key map "w" 'vm-save-message-sans-headers)
;(define-key map "A" 'vm-auto-archive-messages)
- ;(define-key map "S" 'vm-save-folder)
+ (define-key map "S" 'vm-save-folder)
;(define-key map "|" 'vm-pipe-message-to-command)
- ;(define-key map "#" 'vm-expunge-folder)
+ (define-key map "#" 'vm-expunge-folder)
(define-key map "q" 'vm-quit)
(define-key map "x" 'vm-quit-no-change)
(define-key map "i" 'vm-iconify-frame)
@@ -155,7 +202,7 @@
(define-key map ">" 'vm-end-of-message)
;(define-key map "\M-s" 'vm-isearch-forward)
(define-key map "=" 'vm-summarize)
- ;(define-key map "L" 'vm-load-init-file)
+ (define-key map "L" 'vm-load-init-file)
;(define-key map "l" (make-sparse-keymap))
;(define-key map "la" 'vm-add-message-labels)
;(define-key map "ld" 'vm-delete-message-labels)
@@ -186,13 +233,13 @@
;(define-key map "WS" 'vm-save-window-configuration)
;(define-key map "WD" 'vm-delete-window-configuration)
;(define-key map "W?" 'vm-window-help)
- ;(define-key map "\C-t" 'vm-toggle-threads-display)
- ;(define-key map "\C-x\C-s" 'vm-save-buffer)
- ;(define-key map "\C-x\C-w" 'vm-write-file)
- ;(define-key map "\C-x\C-q" 'vm-toggle-read-only)
+ (define-key map "\C-t" 'vm-toggle-threads-display)
+ (define-key map "\C-x\C-s" 'vm-save-buffer)
+ (define-key map "\C-x\C-w" 'vm-write-file)
+ (define-key map "\C-x\C-q" 'vm-toggle-read-only)
;(define-key map "%" 'vm-change-folder-type)
- ;(define-key map "\M-C" 'vm-show-copying-restrictions)
- ;(define-key map "\M-W" 'vm-show-no-warranty)
+ (define-key map "\M-C" 'vm-show-copying-restrictions)
+ (define-key map "\M-W" 'vm-show-no-warranty)
;; suppress-keymap provides these, but now that we don't use
;; suppress-keymap anymore...
(define-key map "0" 'digit-argument)
@@ -232,10 +279,15 @@
fsfmenu))
"VM's popup menu + MIME specific commands")
+
+
(define-key vm-mode-map "Z" 'tm-vm/view-message)
(define-key vm-mode-map "T" 'tm-vm/decode-message-header)
(define-key vm-mode-map "\et" 'tm-vm/toggle-preview-mode)
+; Disable VM 6 built-in MIME handling
+(setq vm-display-using-mime nil)
+(setq vm-send-using-mime nil)
;;; @ MIME encoded-words
@@ -259,7 +311,6 @@
(cdr ret))
ret)))
-(require 'vm-summary)
(or (fboundp 'tm:vm-su-subject)
(fset 'tm:vm-su-subject (symbol-function 'vm-su-subject))
)
@@ -413,7 +464,9 @@
vm-use-menus (vm-menu-support-possible-p))
(progn
(vm-energize-urls)
- (vm-energize-headers)))))))
+ (vm-energize-headers)))
+ (run-hooks 'tm-vm/build-mime-preview-buffer-hook)
+ ))))
(defun tm-vm/sync-preview-buffer ()
"Ensure that the MIME preview buffer, if it exists, actually corresponds to the current message.
@@ -968,7 +1021,6 @@
;;; @@ vm-yank-message
-(require 'vm-reply)
(defvar tm-vm/yank:message-to-restore nil
"For internal use by tm-vm only.")
@@ -1237,19 +1289,6 @@
;;; @@@ Menus
-;;; modified by Steven L. Baur
-;;; 1995/12/6 (c.f. [tm-en:209])
-(defun mime-editor/attach-to-vm-mode-menu ()
- "Arrange to attach MIME editor's popup menu to VM's"
- (if (boundp 'vm-menu-mail-menu)
- (progn
- (setq vm-menu-mail-menu
- (append vm-menu-mail-menu
- (list "----"
- mime-editor/popup-menu-for-xemacs)))
- (remove-hook 'vm-mail-mode-hook 'mime-editor/attach-to-vm-mode-menu)
- ))
-)
(call-after-loaded
'tm-edit
@@ -1264,10 +1303,6 @@
(interactive)
(funcall send-mail-function)
)))
- (if (and (string-match "XEmacs\\|Lucid" emacs-version)
- tm-vm/attach-to-popup-menus)
- (add-hook 'vm-mail-mode-hook 'mime-editor/attach-to-vm-mode-menu)
- )
)))
@@ -1312,11 +1347,91 @@
(vm-menu-popup-mode-menu event))))
)
+(defadvice vm-save-message (around tm-aware activate)
+ "Made TM aware. Callable from the MIME Preview buffer."
+ (if mime::preview/article-buffer
+ (save-excursion
+ (set-buffer mime::preview/article-buffer)
+ ad-do-it)
+ ad-do-it))
+(defadvice vm-expunge-folder (around tm-aware activate)
+ "Made TM aware. Callable from the MIME Preview buffer."
+ (if mime::preview/article-buffer
+ (save-excursion
+ (set-buffer mime::preview/article-buffer)
+ ad-do-it)
+ ad-do-it))
+
+(defadvice vm-save-folder (around tm-aware activate)
+ "Made TM aware. Callable from the MIME Preview buffer."
+ (if mime::preview/article-buffer
+ (save-excursion
+ (set-buffer mime::preview/article-buffer)
+ ad-do-it)
+ ad-do-it))
+
+(defadvice vm-goto-parent-message (around tm-aware activate)
+ "Made TM aware. Callable from the MIME Preview buffer."
+ (if mime::preview/article-buffer
+ (save-excursion
+ (set-buffer mime::preview/article-buffer)
+ ad-do-it)
+ ad-do-it))
+
+(defadvice vm-delete-message (around tm-aware activate)
+ "Made TM aware. Callable from the MIME Preview buffer."
+ (interactive "p")
+ (if (interactive-p)
+ (vm-follow-summary-cursor))
+ (if mime::preview/article-buffer
+ (save-excursion
+ (set-buffer mime::preview/article-buffer)
+ ad-do-it)
+ ad-do-it))
+
+(defadvice vm-delete-message-backward (around tm-aware activate)
+ "Made TM aware. Callable from the MIME Preview buffer."
+ (interactive "p")
+ (if (interactive-p)
+ (vm-follow-summary-cursor))
+ (if mime::preview/article-buffer
+ (save-excursion
+ (set-buffer mime::preview/article-buffer)
+ ad-do-it)
+ ad-do-it))
+
+(defadvice vm-undelete-message (around tm-aware activate)
+ "Made TM aware. Callable from the MIME Preview buffer."
+ (interactive "p")
+ (if (interactive-p)
+ (vm-follow-summary-cursor))
+ (if mime::preview/article-buffer
+ (save-excursion
+ (set-buffer mime::preview/article-buffer)
+ ad-do-it)
+ ad-do-it))
+
+(defadvice vm-unread-message (around tm-aware activate)
+ "Made TM aware. Callable from the MIME Preview buffer."
+ (if mime::preview/article-buffer
+ (save-excursion
+ (set-buffer mime::preview/article-buffer)
+ ad-do-it)
+ ad-do-it))
+
+(defadvice vm-edit-message (around tm-aware activate)
+ "Made TM aware. Callable from the MIME Preview buffer."
+ (if mime::preview/article-buffer
+ (save-excursion
+ (set-buffer mime::preview/article-buffer)
+ ad-do-it)
+ ad-do-it))
+
+
+
;;; @@ VM Toolbar Integration
-(require 'vm-toolbar)
-
;;; based on vm-toolbar-any-messages-p [vm-toolbar.el]
(defun tm-vm/check-for-toolbar ()
"Install VM toolbar if necessary."
diff -r ac1f612d5250 -r 859a2309aef8 lisp/utils/skeleton.el
--- a/lisp/utils/skeleton.el Mon Aug 13 08:49:44 2007 +0200
+++ b/lisp/utils/skeleton.el Mon Aug 13 08:50:05 2007 +0200
@@ -391,7 +391,8 @@
(defun skeleton-internal-1 (element &optional literal)
- (cond ((char-or-string-p element)
+ (cond ((or (integerp element)
+ (char-or-string-p element))
(if (and (integerp element) ; -num
(< element 0))
(if skeleton-untabify
diff -r ac1f612d5250 -r 859a2309aef8 lisp/version.el
--- a/lisp/version.el Mon Aug 13 08:49:44 2007 +0200
+++ b/lisp/version.el Mon Aug 13 08:50:05 2007 +0200
@@ -26,7 +26,7 @@
(defconst emacs-version "19.15" "\
Version numbers of this version of Emacs.")
-(setq emacs-version (purecopy (concat emacs-version " XEmacs Lucid (beta92)")))
+(setq emacs-version (purecopy (concat emacs-version " XEmacs Lucid (beta93)")))
(defconst emacs-major-version
(progn (or (string-match "^[0-9]+" emacs-version)
diff -r ac1f612d5250 -r 859a2309aef8 lisp/vm/Makefile
--- a/lisp/vm/Makefile Mon Aug 13 08:49:44 2007 +0200
+++ b/lisp/vm/Makefile Mon Aug 13 08:50:05 2007 +0200
@@ -1,9 +1,13 @@
# what Emacs version to build VM for.
# Allowed values are 18 and 19.
+# Version 18 of Emacs is UNSUPPORTED.
+# In fact all versions of Emacs prior to 19.34 for Emacs and
+# prior to 19.14 for XEmacs are unsupported.
#
-# Currently only vm-isearch-forward depends on this being
-# correct. You can use the same VM .elc files under v18 and v19
-# Emacs if you don't care about vm-isearch-forward.
+# Currently only vm-isearch-forward depends on the EMACS_VERSION
+# setting being correct. You can use the same VM .elc files
+# under v18 and v19 Emacs if you don't care about
+# vm-isearch-forward.
#
# Note that .elc files compiled with the v19 byte compiler won't
# work under v18 Emacs, but v18 .elcs will work under v19. So
@@ -50,7 +54,7 @@
OBJECTS = \
vm-delete.elc vm-digest.elc vm-easymenu.elc vm-edit.elc vm-folder.elc \
vm-license.elc vm-mark.elc vm-menu.elc vm-message.elc \
- vm-minibuf.elc vm-misc.elc vm-mouse.elc \
+ vm-mime.elc vm-minibuf.elc vm-misc.elc vm-mouse.elc \
vm-motion.elc vm-page.elc vm-pop.elc vm-reply.elc \
vm-save.elc \
vm-search.elc vm-sort.elc vm-summary.elc vm-startup.elc vm-thread.elc \
@@ -60,7 +64,7 @@
SOURCES = \
vm-delete.el vm-digest.el vm-easymenu.el vm-edit.el vm-folder.el \
vm-license.el vm-mark.el vm-menu.el vm-message.el \
- vm-minibuf.el vm-misc.el vm-mouse.el \
+ vm-mime.el vm-minibuf.el vm-misc.el vm-mouse.el \
vm-motion.el vm-page.el vm-pop.el vm-reply.el vm-save.el \
vm-search.el vm-sort.el vm-startup.el vm-summary.el vm-thread.el \
vm-toolbar.el \
@@ -142,6 +146,10 @@
@echo compiling vm-minibuf.el...
@$(EMACS) $(BATCHFLAGS) $(PRELOADS) -f batch-byte-compile vm-minibuf.el
+vm-mime.elc: vm-mime.el $(CORE)
+ @echo compiling vm-mime.el...
+ @$(EMACS) $(BATCHFLAGS) $(PRELOADS) -f batch-byte-compile vm-mime.el
+
vm-misc.elc: vm-misc.el $(CORE)
@echo compiling vm-misc.el...
@$(EMACS) $(BATCHFLAGS) $(PRELOADS) -f batch-byte-compile vm-misc.el
diff -r ac1f612d5250 -r 859a2309aef8 lisp/vm/README
--- a/lisp/vm/README Mon Aug 13 08:49:44 2007 +0200
+++ b/lisp/vm/README Mon Aug 13 08:50:05 2007 +0200
@@ -5,7 +5,8 @@
system, change them.
Note that version 18 of Emacs is no longer supported. VM may
- or may not work under v18.
+ or may not work under v18. The old v18 support code has been left
+ in place for those hardy souls who want to attempt it anyway.
1) Do one of these:
`make'.
@@ -16,7 +17,7 @@
2) Put all the .elc files into a Lisp directory that Emacs knows
about. (see load-path).
-3) If you're using XEmacs 19.12 and you want toolbar support,
+3) If you're using XEmacs 19.14 and you want toolbar support,
make a directory called `vm' in the XEmacs `etc' directory.
Copy the files in pixmaps directory into the directory you
just created. VM will look for the pixmap there by default.
diff -r ac1f612d5250 -r 859a2309aef8 lisp/vm/tapestry.el
--- a/lisp/vm/tapestry.el Mon Aug 13 08:49:44 2007 +0200
+++ b/lisp/vm/tapestry.el Mon Aug 13 08:50:05 2007 +0200
@@ -1,5 +1,5 @@
;;; Tools to configure your GNU Emacs windows
-;;; Copyright (C) 1991, 1993, 1994, 1995 Kyle E. Jones
+;;; Copyright (C) 1991, 1993, 1994, 1995, 1997 Kyle E. Jones
;;;
;;; This program is free software; you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
@@ -20,7 +20,12 @@
(provide 'tapestry)
-(defvar tapestry-version "1.07")
+(defvar tapestry-version "1.08")
+
+;; Pass state information between the tapestry-set-window-map
+;; and tapestry-set-buffer-map stages. UGH. The reason for this
+;; is explained in tapestry-set-buffer-map.
+(defvar tapestry-windows-changed nil)
(defun tapestry (&optional frame-list)
"Returns a list containing complete information about the current
@@ -69,6 +74,7 @@
coordinates can be found, the window with the greatest overlap of
ROOT-WINDOW-EDGES will be used."
(let ((sf (tapestry-selected-frame))
+ (tapestry-windows-changed nil)
frame-list frame-map other-maps other-map)
(setq frame-map (nth 0 map)
other-maps (nth 1 map))
@@ -195,12 +201,14 @@
(delete-window inside-w)))
(t (setq root-window overlap-w))))
(tapestry-apply-window-map map map-width map-height root-window)
+ (setq tapestry-windows-changed t)
root-window )
(if (tapestry-windows-match-map map map-width map-height)
(tapestry-first-window)
(delete-other-windows)
(setq root-window (selected-window))
(tapestry-apply-window-map map map-width map-height root-window)
+ (setq tapestry-windows-changed t)
root-window ))))
(defun tapestry-buffer-map ()
@@ -214,16 +222,50 @@
w-list (cdr w-list)))
(nreverse list)))
+;; This version of tapestry-set-buffer-map unconditionally set
+;; the window buffer. This confused XEmacs 19.14's scroll-up
+;; function when scrolling VM presentation buffers.
+;; end-of-buffer was never signaled after a scroll. You can
+;; duplicate this by creating a buffer that can be displayed
+;; fully in the current window and then run
+;;
+;; (progn
+;; (set-window-buffer (selected-window) (current-buffer))
+;; (scroll-up nil))
+;;;;;;;;;;;
+;;(defun tapestry-set-buffer-map (buffer-map &optional first-window)
+;; (let ((w-list (tapestry-window-list first-window)) wb)
+;; (while (and w-list buffer-map)
+;; (setq wb (car buffer-map))
+;; (set-window-buffer
+;; (car w-list)
+;; (if (car wb)
+;; (or (get-file-buffer (car wb))
+;; (find-file-noselect (car wb)))
+;; (get-buffer-create (nth 1 wb))))
+;; (setq w-list (cdr w-list)
+;; buffer-map (cdr buffer-map)))))
+
(defun tapestry-set-buffer-map (buffer-map &optional first-window)
- (let ((w-list (tapestry-window-list first-window)) wb)
+ (let ((w-list (tapestry-window-list first-window))
+ current-wb proposed-wb cell)
(while (and w-list buffer-map)
- (setq wb (car buffer-map))
- (set-window-buffer
- (car w-list)
- (if (car wb)
- (or (get-file-buffer (car wb))
- (find-file-noselect (car wb)))
- (get-buffer-create (nth 1 wb))))
+ (setq cell (car buffer-map)
+ proposed-wb (if (car cell)
+ (or (get-file-buffer (car cell))
+ (find-file-noselect (car cell)))
+ (get-buffer-create (nth 1 cell)))
+ current-wb (window-buffer (car w-list)))
+ ;; Setting the window buffer to the same value it already
+ ;; has seems to confuse XEmacs' scroll-up function. But
+ ;; _not_ setting after windows torn down seem to cause
+ ;; window point to sometimes drift away from point at
+ ;; redisplay time. The solution (hopefully!) is to track
+ ;; when windows have been rearranged and unconditionally do
+ ;; the set-window-buffer, otherwise do it only if the
+ ;; window buffer and the prosed window buffer differ.
+ (if (or tapestry-windows-changed (not (eq proposed-wb current-wb)))
+ (set-window-buffer (car w-list) proposed-wb))
(setq w-list (cdr w-list)
buffer-map (cdr buffer-map)))))
diff -r ac1f612d5250 -r 859a2309aef8 lisp/vm/vm-autoload.el
--- a/lisp/vm/vm-autoload.el Mon Aug 13 08:49:44 2007 +0200
+++ b/lisp/vm/vm-autoload.el Mon Aug 13 08:50:05 2007 +0200
@@ -6,7 +6,7 @@
time the current folder is expunged.
With a prefix argument COUNT, the current message and the next
-COUNT - 1 messages are deleted. A negative argument means the
+COUNT - 1 messages are deleted. A negative argument means
the current message and the previous |COUNT| - 1 messages are
deleted.
@@ -18,7 +18,7 @@
(autoload (quote vm-undelete-message) "vm-delete" "Remove the `deleted' attribute from the current message.
With a prefix argument COUNT, the current message and the next
-COUNT - 1 messages are undeleted. A negative argument means the
+COUNT - 1 messages are undeleted. A negative argument means
the current message and the previous |COUNT| - 1 messages are
deleted.
@@ -27,7 +27,13 @@
(autoload (quote vm-kill-subject) "vm-delete" "Delete all messages with the same subject as the current message.
Message subjects are compared after ignoring parts matched by
-the variables vm-subject-ignored-prefix and vm-subject-ignored-suffix." t nil)
+the variables vm-subject-ignored-prefix and vm-subject-ignored-suffix.
+
+The optional prefix argument ARG specifies the direction to move
+if vm-move-after-killing is non-nil. The default direction is
+forward. A positive prefix argument means move forward, a
+negative arugment means move backward, a zero argument means
+don't move at all." t nil)
(autoload (quote vm-expunge-folder) "vm-delete" "Expunge messages with the `deleted' attribute.
For normal folders this means that the deleted messages are
@@ -56,6 +62,28 @@
to be forwarded. See the docs for vm-reorder-message-headers
to find out how KEEP-LIST and DISCARD-REGEXP are used." nil nil)
+(autoload (quote vm-mime-encapsulate-messages) "vm-digest" "Encapsulate the messages in MESSAGE-LIST as per the MIME spec.
+The resulting digest is inserted at point in the current buffer.
+Point is not moved.
+
+MESSAGE-LIST should be a list of message structs (real or virtual).
+These are the messages that will be encapsulated.
+KEEP-LIST should be a list of regexps matching headers to keep.
+DISCARD-REGEXP should be a regexp that matches headers to be discarded.
+KEEP-LIST and DISCARD-REGEXP are used to order and trim the headers
+to be forwarded. See the docs for vm-reorder-message-headers
+to find out how KEEP-LIST and DISCARD-REGEXP are used.
+
+Returns the multipart boundary parameter (string) that should be used
+in the Content-Type header." nil nil)
+
+(autoload (quote vm-mime-burst-message) "vm-digest" "Burst messages from the digest message M.
+M should be a message struct for a real message.
+MIME encoding is expected. The message content type
+must be either message/* or multipart/digest." nil nil)
+
+(autoload (quote vm-mime-burst-layout) "vm-digest" nil nil nil)
+
(autoload (quote vm-rfc934-char-stuff-region) "vm-digest" "Quote RFC 934 message separators between START and END.
START and END are buffer positions in the current buffer.
Lines beginning with `-' in the region have `- ' prepended to them." nil nil)
@@ -126,9 +154,11 @@
(autoload (quote vm-burst-rfc1153-digest) "vm-digest" "Burst an RFC 1153 style digest" t nil)
+(autoload (quote vm-burst-mime-digest) "vm-digest" "Burst a MIME digest" t nil)
+
(autoload (quote vm-guess-digest-type) "vm-digest" "Guess the digest type of the message M.
M should be the message struct of a real message.
-Returns either \"rfc934\" or \"rfc1153\"." nil nil)
+Returns either \"rfc934\", \"rfc1153\" or \"mime\"." nil nil)
(autoload (quote vm-easy-menu-define) "vm-easymenu" "Define a menu bar submenu in maps MAPS, according to MENU.
The menu keymap is stored in symbol SYMBOL, both as its value
@@ -295,8 +325,8 @@
START-POINT should be a cons in vm-message-list or just t.
(t means start from the beginning of vm-message-list.)
If START-POINT is closer to the head of vm-message-list than
-vm-numbering-redo-start-point or is equal to t, then
-vm-numbering-redo-start-point is set to match it." nil nil)
+vm-summary-redo-start-point or is equal to t, then
+vm-summary-redo-start-point is set to match it." nil nil)
(autoload (quote vm-mark-for-summary-update) "vm-folder" "Mark message M for a summary update.
Also mark M's buffer as needing a display update. Any virtual
@@ -316,11 +346,14 @@
(autoload (quote vm-do-needed-mode-line-update) "vm-folder" "Do a modeline update for the current folder buffer.
This means setting up all the various vm-ml attribute variables
in the folder buffer and copying necessary variables to the
-folder buffer's summary buffer, and then forcing Emacs to update
-all modelines.
-
-Also if a virtual folder being updated has no messages,
-erase-buffer is called on its buffer." nil nil)
+folder buffer's summary and presentation buffers, and then
+forcing Emacs to update all modelines.
+
+If a virtual folder being updated has no messages, then
+erase-buffer is called on its buffer.
+
+If any type of folder is empty, erase-buffer is called
+on its presentation buffer, if any." nil nil)
(autoload (quote vm-update-summary-and-mode-line) "vm-folder" "Update summary and mode line for all VM folder and summary buffers.
Really this updates all the visible status indicators.
@@ -385,7 +418,7 @@
This function works by examining the beginning of a folder.
If optional arg FILE is present the type of FILE is returned instead.
If optional second and third arg START and END are provided,
-vm-get-folder-type will examine the the text between those buffer
+vm-get-folder-type will examine the text between those buffer
positions. START and END default to 1 and (buffer-size) + 1.
Returns
@@ -514,6 +547,8 @@
(autoload (quote vm-stuff-attributes) "vm-folder" nil nil nil)
+(autoload (quote vm-stuff-folder-attributes) "vm-folder" nil nil nil)
+
(autoload (quote vm-stuff-babyl-attributes) "vm-folder" nil nil nil)
(autoload (quote vm-babyl-attributes-string) "vm-folder" nil nil nil)
@@ -645,6 +680,10 @@
Interactively TYPE will be read from the minibuffer." t nil)
+(autoload (quote vm-garbage-collect-folder) "vm-folder" nil nil nil)
+
+(autoload (quote vm-garbage-collect-message) "vm-folder" nil nil nil)
+
(autoload (quote vm-show-copying-restrictions) "vm-license" nil t nil)
(autoload (quote vm-show-no-warranty) "vm-license" "Display \"NO WARRANTY\" section of the GNU General Public License." t nil)
@@ -663,6 +702,12 @@
N-1 messages. A negative N means unmark the current message and the
previous N-1 messages." t nil)
+(autoload (quote vm-mark-summary-region) "vm-mark" "Mark all messages with summary lines contained in the region." t nil)
+
+(autoload (quote vm-unmark-summary-region) "vm-mark" "Remove marks from messages with summary lines contained in the region." t nil)
+
+(autoload (quote vm-mark-or-unmark-summary-region) "vm-mark" nil nil nil)
+
(autoload (quote vm-mark-or-unmark-messages-with-selector) "vm-mark" nil nil nil)
(autoload (quote vm-mark-matching-messages) "vm-mark" "Mark messages matching some criterion.
@@ -720,6 +765,8 @@
(autoload (quote vm-menu-can-undo-p) "vm-menu" nil nil nil)
+(autoload (quote vm-menu-can-decode-mime-p) "vm-menu" nil nil nil)
+
(autoload (quote vm-menu-yank-original) "vm-menu" nil t nil)
(autoload (quote vm-menu-can-send-mail-p) "vm-menu" nil nil nil)
@@ -742,6 +789,8 @@
(autoload (quote vm-menu-popup-url-browser-menu) "vm-menu" nil t nil)
+(autoload (quote vm-menu-popup-mime-dispose-menu) "vm-menu" nil t nil)
+
(autoload (quote vm-menu-popup-fsfemacs-menu) "vm-menu" nil t nil)
(autoload (quote vm-menu-mode-menu) "vm-menu" nil nil nil)
@@ -846,6 +895,10 @@
(autoload (quote vm-virtual-summary-of) "vm-message" nil nil (quote macro))
+(autoload (quote vm-mime-layout-of) "vm-message" nil nil (quote macro))
+
+(autoload (quote vm-mime-encoded-header-flag-of) "vm-message" nil nil (quote macro))
+
(autoload (quote vm-attributes-of) "vm-message" nil nil (quote macro))
(autoload (quote vm-new-flag) "vm-message" nil nil (quote macro))
@@ -970,6 +1023,10 @@
(autoload (quote vm-set-virtual-summary-of) "vm-message" nil nil (quote macro))
+(autoload (quote vm-set-mime-layout-of) "vm-message" nil nil (quote macro))
+
+(autoload (quote vm-set-mime-encoded-header-flag-of) "vm-message" nil nil (quote macro))
+
(autoload (quote vm-set-attributes-of) "vm-message" nil nil (quote macro))
(autoload (quote vm-set-edited-flag-of) "vm-message" nil nil nil)
@@ -1036,6 +1093,280 @@
(autoload (quote vm-virtual-message-p) "vm-message" nil nil nil)
+(autoload (quote vm-mime-error) "vm-mime" nil nil nil)
+
+(autoload (quote vm-mm-layout-type) "vm-mime" nil nil nil)
+
+(autoload (quote vm-mm-layout-encoding) "vm-mime" nil nil nil)
+
+(autoload (quote vm-mm-layout-id) "vm-mime" nil nil nil)
+
+(autoload (quote vm-mm-layout-description) "vm-mime" nil nil nil)
+
+(autoload (quote vm-mm-layout-disposition) "vm-mime" nil nil nil)
+
+(autoload (quote vm-mm-layout-header-start) "vm-mime" nil nil nil)
+
+(autoload (quote vm-mm-layout-body-start) "vm-mime" nil nil nil)
+
+(autoload (quote vm-mm-layout-body-end) "vm-mime" nil nil nil)
+
+(autoload (quote vm-mm-layout-parts) "vm-mime" nil nil nil)
+
+(autoload (quote vm-mm-layout-cache) "vm-mime" nil nil nil)
+
+(autoload (quote vm-set-mm-layout-cache) "vm-mime" nil nil nil)
+
+(autoload (quote vm-mm-layout) "vm-mime" nil nil nil)
+
+(autoload (quote vm-mm-encoded-header) "vm-mime" nil nil nil)
+
+(autoload (quote vm-mime-Q-decode-region) "vm-mime" nil nil nil)
+
+(autoload (quote vm-mime-Q-encode-region) "vm-mime" nil nil nil)
+
+(autoload (quote vm-mime-Q-decode-string) "vm-mime" nil nil nil)
+
+(autoload (quote vm-mime-B-decode-string) "vm-mime" nil nil nil)
+
+(autoload (quote vm-mime-Q-encode-string) "vm-mime" nil nil nil)
+
+(autoload (quote vm-mime-B-encode-string) "vm-mime" nil nil nil)
+
+(autoload (quote vm-mime-crlf-to-lf-region) "vm-mime" nil nil nil)
+
+(autoload (quote vm-mime-lf-to-crlf-region) "vm-mime" nil nil nil)
+
+(autoload (quote vm-mime-charset-decode-region) "vm-mime" nil nil nil)
+
+(autoload (quote vm-mime-transfer-decode-region) "vm-mime" nil nil nil)
+
+(autoload (quote vm-mime-base64-decode-region) "vm-mime" nil nil nil)
+
+(autoload (quote vm-mime-base64-encode-region) "vm-mime" nil nil nil)
+
+(autoload (quote vm-mime-qp-decode-region) "vm-mime" nil nil nil)
+
+(autoload (quote vm-mime-qp-encode-region) "vm-mime" nil nil nil)
+
+(autoload (quote vm-decode-mime-message-headers) "vm-mime" nil nil nil)
+
+(autoload (quote vm-decode-mime-encoded-words) "vm-mime" nil nil nil)
+
+(autoload (quote vm-decode-mime-encoded-words-maybe) "vm-mime" nil nil nil)
+
+(autoload (quote vm-mime-parse-content-header) "vm-mime" nil nil nil)
+
+(autoload (quote vm-mime-get-header-contents) "vm-mime" nil nil nil)
+
+(autoload (quote vm-mime-parse-entity) "vm-mime" nil nil nil)
+
+(autoload (quote vm-mime-parse-entity-safe) "vm-mime" nil nil nil)
+
+(autoload (quote vm-mime-get-xxx-parameter) "vm-mime" nil nil nil)
+
+(autoload (quote vm-mime-get-parameter) "vm-mime" nil nil nil)
+
+(autoload (quote vm-mime-get-disposition-parameter) "vm-mime" nil nil nil)
+
+(autoload (quote vm-mime-insert-mime-body) "vm-mime" nil nil nil)
+
+(autoload (quote vm-mime-insert-mime-headers) "vm-mime" nil nil nil)
+
+(autoload (quote vm-make-presentation-copy) "vm-mime" nil nil nil)
+
+(autoload (quote vm-determine-proper-charset) "vm-mime" nil nil nil)
+
+(autoload (quote vm-determine-proper-content-transfer-encoding) "vm-mime" nil nil nil)
+
+(autoload (quote vm-mime-types-match) "vm-mime" nil nil nil)
+
+(autoload (quote vm-mime-can-display-internal) "vm-mime" nil nil nil)
+
+(autoload (quote vm-mime-can-convert) "vm-mime" nil nil nil)
+
+(autoload (quote vm-mime-convert-undisplayable-layout) "vm-mime" nil nil nil)
+
+(autoload (quote vm-mime-should-display-button) "vm-mime" nil nil nil)
+
+(autoload (quote vm-mime-should-display-internal) "vm-mime" nil nil nil)
+
+(autoload (quote vm-mime-find-external-viewer) "vm-mime" nil nil nil)
+
+(autoload (quote vm-mime-delete-button-maybe) "vm-mime" nil nil nil)
+
+(autoload (quote vm-decode-mime-message) "vm-mime" "Decode the MIME objects in the current message.
+
+The first time this command is run on a message, decoding is done.
+The second time, buttons for all the objects are displayed instead.
+The third time, the raw, undecoded data is displayed.
+
+If decoding, the decoded objects might be displayed immediately, or
+buttons might be displayed that you need to activate to view the
+object. See the documentation for the variables
+
+ vm-auto-displayed-mime-content-types
+ vm-mime-internal-content-types
+ vm-mime-external-content-types-alist
+
+to see how to control whether you see buttons or objects.
+
+If the variable vm-mime-display-function is set, then its value
+is called as a function with no arguments, and none of the
+actions mentioned in the preceding paragraphs are done. At the
+time of the call, the current buffer will be the presentation
+buffer for the folder and a copy of the current message will be
+in the buffer. The function is expected to make the message
+`MIME presentable' to the user in whatever manner it sees fit." t nil)
+
+(autoload (quote vm-decode-mime-layout) "vm-mime" nil nil nil)
+
+(autoload (quote vm-mime-display-button-text) "vm-mime" nil nil nil)
+
+(autoload (quote vm-mime-display-internal-text/html) "vm-mime" nil nil nil)
+
+(autoload (quote vm-mime-display-internal-text/plain) "vm-mime" nil nil nil)
+
+(autoload (quote vm-mime-display-internal-text/enriched) "vm-mime" nil nil nil)
+
+(autoload (quote vm-mime-display-external-generic) "vm-mime" nil nil nil)
+
+(autoload (quote vm-mime-display-internal-application/octet-stream) "vm-mime" nil nil nil)
+
+(autoload (quote vm-mime-display-button-image) "vm-mime" nil nil nil)
+
+(autoload (quote vm-mime-display-button-audio) "vm-mime" nil nil nil)
+
+(autoload (quote vm-mime-display-button-video) "vm-mime" nil nil nil)
+
+(autoload (quote vm-mime-display-button-message) "vm-mime" nil nil nil)
+
+(autoload (quote vm-mime-display-button-multipart) "vm-mime" nil nil nil)
+
+(autoload (quote vm-mime-display-internal-multipart/mixed) "vm-mime" nil nil nil)
+
+(autoload (quote vm-mime-display-internal-multipart/alternative) "vm-mime" nil nil nil)
+
+(autoload (quote vm-mime-display-button-multipart/parallel) "vm-mime" nil nil nil)
+
+(autoload (quote vm-mime-display-internal-multipart/digest) "vm-mime" nil nil nil)
+
+(autoload (quote vm-mime-display-internal-message/rfc822) "vm-mime" nil nil nil)
+
+(autoload (quote vm-mime-display-internal-message/partial) "vm-mime" nil nil nil)
+
+(autoload (quote vm-mime-display-internal-image-xxxx) "vm-mime" nil nil nil)
+
+(autoload (quote vm-mime-display-internal-image/gif) "vm-mime" nil nil nil)
+
+(autoload (quote vm-mime-display-internal-image/jpeg) "vm-mime" nil nil nil)
+
+(autoload (quote vm-mime-display-internal-image/png) "vm-mime" nil nil nil)
+
+(autoload (quote vm-mime-display-internal-image/tiff) "vm-mime" nil nil nil)
+
+(autoload (quote vm-mime-display-internal-audio/basic) "vm-mime" nil nil nil)
+
+(autoload (quote vm-mime-display-button-xxxx) "vm-mime" nil nil nil)
+
+(autoload (quote vm-mime-run-display-function-at-point) "vm-mime" nil t nil)
+
+(autoload (quote vm-mime-insert-button) "vm-mime" nil nil nil)
+
+(autoload (quote vm-mime-send-body-to-file) "vm-mime" nil nil nil)
+
+(autoload (quote vm-mime-pipe-body-to-command) "vm-mime" nil nil nil)
+
+(autoload (quote vm-mime-pipe-body-to-command-discard-output) "vm-mime" nil nil nil)
+
+(autoload (quote vm-mime-scrub-description) "vm-mime" nil nil nil)
+
+(autoload (quote vm-mime-layout-description) "vm-mime" nil nil nil)
+
+(autoload (quote vm-mime-layout-contains-type) "vm-mime" nil nil nil)
+
+(autoload (quote vm-mime-plain-message-p) "vm-mime" nil nil nil)
+
+(autoload (quote vm-mime-text-type-p) "vm-mime" nil nil nil)
+
+(autoload (quote vm-mime-charset-internally-displayable-p) "vm-mime" nil nil nil)
+
+(autoload (quote vm-mime-find-message/partials) "vm-mime" nil nil nil)
+
+(autoload (quote vm-message-at-point) "vm-mime" nil nil nil)
+
+(autoload (quote vm-mime-make-multipart-boundary) "vm-mime" nil nil nil)
+
+(autoload (quote vm-mime-attach-file) "vm-mime" "Attach a file to a VM composition buffer to be sent along with the message.
+The file is not inserted into the buffer and MIME encoded until
+you execute vm-mail-send or vm-mail-send-and-exit. A visible tag
+indicating the existence of the attachment is placed in the
+composition buffer. You can move the attachment around or remove
+it entirely with normal text editing commands. If you remove the
+attachment tag, the attachment will not be sent.
+
+First argument, FILE, is the name of the file to attach. Second
+argument, TYPE, is the MIME Content-Type of the file. Optional
+third argument CHARSET is the character set of the attached
+document. This argument is only used for text types, and it
+is ignored for other types.
+
+When called interactively all arguments are read from the
+minibuffer.
+
+This command is for attaching files that do not have a MIME
+header section at the top. For files with MIME headers, you
+should use vm-mime-attach-mime-file to attach such a file. VM
+will extract the content type information from the headers in
+this case and not prompt you for it in the minibuffer." t nil)
+
+(autoload (quote vm-mime-attach-mime-file) "vm-mime" "Attach a MIME encoded file to a VM composition buffer to be sent
+along with the message.
+
+The file is not inserted into the buffer until you execute
+vm-mail-send or vm-mail-send-and-exit. A visible tag indicating
+the existence of the attachment is placed in the composition
+buffer. You can move the attachment around or remove it entirely
+with normal text editing commands. If you remove the attachment
+tag, the attachment will not be sent.
+
+The sole argument, FILE, is the name of the file to attach.
+When called interactively the FILE argument is read from the
+minibuffer.
+
+This command is for attaching files that have a MIME
+header section at the top. For files without MIME headers, you
+should use vm-mime-attach-file to attach such a file. VM
+will interactively query you for the file type information." t nil)
+
+(autoload (quote vm-mime-attach-object) "vm-mime" nil nil nil)
+
+(autoload (quote vm-mime-default-type-from-filename) "vm-mime" nil nil nil)
+
+(autoload (quote vm-remove-mail-mode-header-separator) "vm-mime" nil nil nil)
+
+(autoload (quote vm-add-mail-mode-header-separator) "vm-mime" nil nil nil)
+
+(autoload (quote vm-mime-transfer-encode-region) "vm-mime" nil nil nil)
+
+(autoload (quote vm-mime-transfer-encode-layout) "vm-mime" nil nil nil)
+
+(autoload (quote vm-mime-encode-composition) "vm-mime" "MIME encode the current buffer.
+Attachment tags added to the buffer with vm-mime-attach-file are expanded
+and the approriate content-type and boundary markup information is added." t nil)
+
+(autoload (quote vm-mime-fragment-composition) "vm-mime" nil nil nil)
+
+(autoload (quote vm-mime-preview-composition) "vm-mime" "Show how the current composition buffer might be displayed
+in a MIME-aware mail reader. VM copies and encodes the current
+mail composition buffer and displays it as a mail folder.
+Type `q' to quit this temp folder and return to composing your
+message." t nil)
+
+(autoload (quote vm-mime-composite-type-p) "vm-mime" nil nil nil)
+
+(autoload (quote vm-mime-map-atomic-layouts) "vm-mime" nil nil nil)
+
(autoload (quote vm-minibuffer-complete-word) "vm-minibuf" nil t nil)
(autoload (quote vm-minibuffer-complete-word-and-exit) "vm-minibuf" nil t nil)
@@ -1111,6 +1442,8 @@
(autoload (quote vm-check-for-killed-summary) "vm-misc" nil nil nil)
+(autoload (quote vm-check-for-killed-presentation) "vm-misc" nil nil nil)
+
(autoload (quote vm-check-for-killed-folder) "vm-misc" nil nil nil)
(autoload (quote vm-error-if-folder-read-only) "vm-misc" nil nil (quote macro))
@@ -1139,6 +1472,12 @@
(autoload (quote vm-delete) "vm-misc" nil nil nil)
+(autoload (quote vm-delete-directory-file-names) "vm-misc" nil nil nil)
+
+(autoload (quote vm-delete-backup-file-names) "vm-misc" nil nil nil)
+
+(autoload (quote vm-delete-auto-save-file-names) "vm-misc" nil nil nil)
+
(autoload (quote vm-delete-duplicates) "vm-misc" "Delete duplicate equivalent strings from the list.
If ALL is t, then if there is more than one occurrence of a string in the list,
then all occurrences of it are removed instead of just the subsequent ones.
@@ -1158,6 +1497,8 @@
(autoload (quote vm-xemacs-p) "vm-misc" nil nil nil)
+(autoload (quote vm-xemacs-mule-p) "vm-misc" nil nil nil)
+
(autoload (quote vm-fsfemacs-19-p) "vm-misc" nil nil nil)
(autoload (quote vm-multiple-frames-possible-p) "vm-misc" nil nil nil)
@@ -1192,6 +1533,20 @@
(autoload (quote vm-buffer-string-no-properties) "vm-misc" nil nil nil)
+(autoload (quote vm-insert-region-from-buffer) "vm-misc" nil nil nil)
+
+(autoload (quote vm-copy-extent) "vm-misc" nil nil nil)
+
+(autoload (quote vm-make-tempfile-name) "vm-misc" nil nil nil)
+
+(autoload (quote vm-insert-char) "vm-misc" nil nil nil)
+
+(autoload (quote vm-xemacs-compatible-insert-char) "vm-misc" nil nil nil)
+
+(autoload (quote vm-symbol-lists-intersect-p) "vm-misc" nil nil nil)
+
+(autoload (quote vm-set-buffer-variable) "vm-misc" nil nil nil)
+
(autoload (quote vm-mouse-fsfemacs-mouse-p) "vm-mouse" nil nil nil)
(autoload (quote vm-mouse-xemacs-mouse-p) "vm-mouse" nil nil nil)
@@ -1202,7 +1557,7 @@
(autoload (quote vm-mouse-button-3) "vm-mouse" nil t nil)
-(autoload (quote vm-mouse-3-help) "vm-mouse" "Use mouse button 3 to see a menu of options." nil nil)
+(autoload (quote vm-mouse-3-help) "vm-mouse" nil nil nil)
(autoload (quote vm-mouse-get-mouse-track-string) "vm-mouse" nil nil nil)
@@ -1224,6 +1579,8 @@
(autoload (quote vm-run-command) "vm-mouse" nil nil nil)
+(autoload (quote vm-run-command-on-region) "vm-mouse" nil nil nil)
+
(autoload (quote vm-mouse-read-file-name) "vm-mouse" "Like read-file-name, except uses a mouse driven interface.
HISTORY argument is ignored." nil nil)
@@ -1320,6 +1677,14 @@
(autoload (quote vm-url-help) "vm-page" nil nil nil)
+(autoload (quote vm-energize-urls-in-message-region) "vm-page" nil nil nil)
+
+(autoload (quote vm-highlight-headers-maybe) "vm-page" nil nil nil)
+
+(autoload (quote vm-energize-headers-and-xfaces) "vm-page" nil nil nil)
+
+(autoload (quote vm-narrow-for-preview) "vm-page" nil nil nil)
+
(autoload (quote vm-preview-current-message) "vm-page" nil nil nil)
(autoload (quote vm-show-current-message) "vm-page" nil nil nil)
@@ -1397,6 +1762,8 @@
(autoload (quote vm-mail-send) "vm-reply" "Just like mail-send except that VM flags the appropriate message(s)
as replied to, forwarded, etc, if appropriate." t nil)
+(autoload (quote vm-mail-mode-get-header-contents) "vm-reply" nil nil nil)
+
(autoload (quote vm-rename-current-mail-buffer) "vm-reply" nil nil nil)
(autoload (quote vm-mail-mark-replied) "vm-reply" nil nil nil)
@@ -1471,6 +1838,8 @@
(autoload (quote vm-send-rfc1153-digest) "vm-reply" "Like vm-send-digest but always sends an RFC 1153 digest." t nil)
+(autoload (quote vm-send-mime-digest) "vm-reply" "Like vm-send-digest but always sends an MIME (multipart/digest) digest." t nil)
+
(autoload (quote vm-continue-composing-message) "vm-reply" "Find and select the most recently used mail composition buffer.
If the selected buffer is already a Mail mode buffer then it is
buried before beginning the search. Non Mail mode buffers and
@@ -1478,6 +1847,8 @@
Mail mode buffers are not skipped. If no suitable buffer is
found, the current buffer remains selected." t nil)
+(autoload (quote vm-mail-to-mailto-url) "vm-reply" nil nil nil)
+
(autoload (quote vm-mail-internal) "vm-reply" nil nil nil)
(autoload (quote vm-reply-other-frame) "vm-reply" "Like vm-reply, but run in a newly created frame." t nil)
@@ -1502,6 +1873,8 @@
(autoload (quote vm-send-rfc1153-digest-other-frame) "vm-reply" "Like vm-send-rfc1153-digest, but run in a newly created frame." t nil)
+(autoload (quote vm-send-mime-digest-other-frame) "vm-reply" "Like vm-send-mime-digest, but run in a newly created frame." t nil)
+
(autoload (quote vm-match-data) "vm-save" nil nil nil)
(autoload (quote vm-auto-select-folder) "vm-save" nil nil nil)
@@ -1695,7 +2068,7 @@
(autoload (quote vm-mode) "vm-startup" "Major mode for reading mail.
-This is VM 5.96 (beta).
+This is VM 6.13.
Commands:
h - summarize folder contents
@@ -1735,7 +2108,7 @@
@ - digestify and mail entire folder contents (the folder is not modified)
* - burst a digest into individual messages, and append and assimilate these
- message into the current folder.
+ messages into the current folder.
G - sort messages by various keys
@@ -1764,14 +2137,16 @@
M U - unmark the current message
M m - mark all messages
M u - unmark all messages
- M C - mark messages matches by a virtual folder selector
- M c - unmark messages matches by a virtual folder selector
+ M C - mark messages matched by a virtual folder selector
+ M c - unmark messages matched by a virtual folder selector
M T - mark thread tree rooted at the current message
M t - unmark thread tree rooted at the current message
M S - mark messages with the same subject as the current message
M s - unmark messages with the same subject as the current message
M A - mark messages with the same author as the current message
M a - unmark messages with the same author as the current message
+ M R - mark messages within the point/mark region in the summary
+ M r - unmark messages within the point/mark region in the summary
M ? - partial help for mark commands
@@ -1818,17 +2193,21 @@
vm-arrived-message-hook
vm-arrived-messages-hook
vm-auto-center-summary
+ vm-auto-decode-mime-messages
+ vm-auto-displayed-mime-content-types
vm-auto-folder-alist
vm-auto-folder-case-fold-search
vm-auto-get-new-mail
vm-auto-next-message
vm-berkeley-mail-compatibility
+ vm-burst-digest-messages-inherit-labels
vm-check-folder-types
- vm-convert-folder-types
vm-circular-folders
vm-confirm-new-folders
vm-confirm-quit
+ vm-convert-folder-types
vm-crash-box
+ vm-crash-box-suffix
vm-default-folder-type
vm-delete-after-archiving
vm-delete-after-bursting
@@ -1839,6 +2218,7 @@
vm-digest-preamble-format
vm-digest-send-type
vm-display-buffer-hook
+ vm-display-using-mime
vm-edit-message-hook
vm-folder-directory
vm-folder-read-only
@@ -1848,8 +2228,11 @@
vm-forwarding-digest-type
vm-forwarding-subject-format
vm-frame-parameter-alist
+ vm-frame-per-completion
vm-frame-per-composition
+ vm-frame-per-edit
vm-frame-per-folder
+ vm-frame-per-summary
vm-highlighted-header-face
vm-highlighted-header-regexp
vm-honor-page-delimiters
@@ -1858,32 +2241,52 @@
vm-included-text-discard-header-regexp
vm-included-text-headers
vm-included-text-prefix
- vm-inhibit-startup-message
vm-invisible-header-regexp
vm-jump-to-new-messages
vm-jump-to-unread-messages
+ vm-keep-crash-boxes
vm-keep-sent-messages
- vm-keep-crash-boxes
vm-mail-header-from
vm-mail-mode-hook
+ vm-make-crash-box-name
+ vm-make-spool-file-name
+ vm-mime-8bit-composition-charset
+ vm-mime-8bit-text-transfer-encoding
+ vm-mime-alternative-select-method
+ vm-mime-attachment-auto-type-alist
+ vm-mime-attachment-save-directory
+ vm-mime-avoid-folding-content-type
+ vm-mime-base64-decoder-program
+ vm-mime-base64-decoder-switches
+ vm-mime-base64-encoder-program
+ vm-mime-base64-encoder-switches
+ vm-mime-button-face
+ vm-mime-digest-discard-header-regexp
+ vm-mime-digest-headers
+ vm-mime-display-function
+ vm-mime-external-content-types-alist
+ vm-mime-internal-content-types
+ vm-mime-max-message-size
vm-mode-hook
vm-mosaic-program
vm-move-after-deleting
+ vm-move-after-killing
vm-move-after-undeleting
vm-move-messages-physically
+ vm-mutable-frames
vm-mutable-windows
- vm-mutable-frames
vm-netscape-program
- vm-options-file
vm-pop-md5-program
+ vm-popup-menu-on-mouse-3
+ vm-preferences-file
vm-preview-lines
vm-preview-read-messages
vm-primary-inbox
vm-quit-hook
vm-recognize-pop-maildrops
vm-reply-hook
+ vm-reply-ignored-addresses
vm-reply-ignored-reply-tos
- vm-reply-ignored-addresses
vm-reply-subject-prefix
vm-resend-bounced-discard-header-regexp
vm-resend-bounced-headers
@@ -1901,9 +2304,11 @@
vm-select-new-message-hook
vm-select-unread-message-hook
vm-send-digest-hook
+ vm-send-using-mime
vm-skip-deleted-messages
vm-skip-read-messages
vm-spool-files
+ vm-spool-file-suffixes
vm-startup-with-summary
vm-strip-reply-headers
vm-summary-arrow
@@ -1912,14 +2317,16 @@
vm-summary-mode-hook
vm-summary-redo-hook
vm-summary-show-threads
- vm-summary-subject-no-newlines
vm-summary-thread-indent-level
+ vm-temp-file-directory
+ vm-tale-is-an-idiot
vm-trust-From_-with-Content-Length
vm-undisplay-buffer-hook
vm-unforwarded-header-regexp
vm-url-browser
vm-url-search-limit
vm-use-menus
+ vm-use-toolbar
vm-virtual-folder-alist
vm-virtual-mirror
vm-visible-headers
@@ -1971,6 +2378,8 @@
(autoload (quote vm-load-init-file) "vm-startup" nil t nil)
+(autoload (quote vm-check-emacs-version) "vm-startup" nil nil nil)
+
(autoload (quote vm-session-initialization) "vm-startup" nil nil nil)
(autoload (quote vm-summary-mode-internal) "vm-summary" nil nil nil)
@@ -2109,6 +2518,10 @@
(autoload (quote vm-toolbar-can-recover-p) "vm-toolbar" nil nil nil)
+(autoload (quote vm-toolbar-can-decode-mime-p) "vm-toolbar" nil nil nil)
+
+(autoload (quote vm-toolbar-can-quit-p) "vm-toolbar" nil nil nil)
+
(autoload (quote vm-toolbar-update-toolbar) "vm-toolbar" nil nil nil)
(autoload (quote vm-toolbar-install-toolbar) "vm-toolbar" nil nil nil)
@@ -2243,12 +2656,6 @@
(autoload (quote vm-virtual-help) "vm-virtual" nil t nil)
-(autoload (quote vm-delete-directory-file-names) "vm-virtual" nil nil nil)
-
-(autoload (quote vm-delete-backup-file-names) "vm-virtual" nil nil nil)
-
-(autoload (quote vm-delete-auto-save-file-names) "vm-virtual" nil nil nil)
-
(autoload (quote vm-vs-or) "vm-virtual" nil nil nil)
(autoload (quote vm-vs-and) "vm-virtual" nil nil nil)
@@ -2380,10 +2787,18 @@
(autoload (quote vm-set-hooks-for-frame-deletion) "vm-window" nil nil nil)
+(autoload (quote vm-created-this-frame-p) "vm-window" nil nil nil)
+
(autoload (quote vm-delete-buffer-frame) "vm-window" nil nil nil)
+(autoload (quote vm-register-frame) "vm-window" nil nil nil)
+
(autoload (quote vm-goto-new-frame) "vm-window" nil nil nil)
+(autoload (quote vm-goto-new-summary-frame-maybe) "vm-window" nil nil nil)
+
+(autoload (quote vm-goto-new-folder-frame-maybe) "vm-window" nil nil nil)
+
(autoload (quote vm-warp-mouse-to-frame-maybe) "vm-window" nil nil nil)
(autoload (quote vm-iconify-frame-xxx) "vm-window" nil nil nil)
diff -r ac1f612d5250 -r 859a2309aef8 lisp/vm/vm-delete.el
--- a/lisp/vm/vm-delete.el Mon Aug 13 08:49:44 2007 +0200
+++ b/lisp/vm/vm-delete.el Mon Aug 13 08:50:05 2007 +0200
@@ -1,5 +1,5 @@
;;; Delete and expunge commands for VM.
-;;; Copyright (C) 1989, 1990, 1991, 1993, 1994, 1995 Kyle E. Jones
+;;; Copyright (C) 1989-1997 Kyle E. Jones
;;;
;;; This program is free software; you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
@@ -24,7 +24,7 @@
time the current folder is expunged.
With a prefix argument COUNT, the current message and the next
-COUNT - 1 messages are deleted. A negative argument means the
+COUNT - 1 messages are deleted. A negative argument means
the current message and the previous |COUNT| - 1 messages are
deleted.
@@ -71,7 +71,7 @@
"Remove the `deleted' attribute from the current message.
With a prefix argument COUNT, the current message and the next
-COUNT - 1 messages are undeleted. A negative argument means the
+COUNT - 1 messages are undeleted. A negative argument means
the current message and the previous |COUNT| - 1 messages are
deleted.
@@ -107,11 +107,17 @@
(eq vm-move-after-undeleting t))))
(vm-next-message count t executing-kbd-macro)))))
-(defun vm-kill-subject ()
+(defun vm-kill-subject (&optional arg)
"Delete all messages with the same subject as the current message.
Message subjects are compared after ignoring parts matched by
-the variables vm-subject-ignored-prefix and vm-subject-ignored-suffix."
- (interactive)
+the variables vm-subject-ignored-prefix and vm-subject-ignored-suffix.
+
+The optional prefix argument ARG specifies the direction to move
+if vm-move-after-killing is non-nil. The default direction is
+forward. A positive prefix argument means move forward, a
+negative arugment means move backward, a zero argument means
+don't move at all."
+ (interactive "p")
(vm-follow-summary-cursor)
(vm-select-folder-buffer)
(vm-check-for-killed-summary)
@@ -133,7 +139,16 @@
(message "No messages deleted.")
(message "%d message%s deleted" n (if (= n 1) "" "s")))))
(vm-display nil nil '(vm-kill-subject) '(vm-kill-subject))
- (vm-update-summary-and-mode-line))
+ (vm-update-summary-and-mode-line)
+ (cond ((or (not (numberp arg)) (> arg 0))
+ (setq arg 1))
+ ((< arg 0)
+ (setq arg -1))
+ (t (setq arg 0)))
+ (if vm-move-after-killing
+ (let ((vm-circular-folders (and vm-circular-folders
+ (eq vm-move-after-deleting t))))
+ (vm-next-message arg t executing-kbd-macro))))
(defun vm-expunge-folder (&optional shaddap)
"Expunge messages with the `deleted' attribute.
@@ -273,11 +288,13 @@
(lambda (buffer)
(set-buffer (symbol-name buffer))
(if (null vm-system-state)
- (if (null vm-message-pointer)
- ;; folder is now empty
- (progn (setq vm-folder-type nil)
- (vm-update-summary-and-mode-line))
- (vm-preview-current-message))
+ (progn
+ (vm-garbage-collect-message)
+ (if (null vm-message-pointer)
+ ;; folder is now empty
+ (progn (setq vm-folder-type nil)
+ (vm-update-summary-and-mode-line))
+ (vm-preview-current-message)))
(vm-update-summary-and-mode-line))
(if (not (eq major-mode 'vm-virtual-mode))
(setq vm-message-order-changed
diff -r ac1f612d5250 -r 859a2309aef8 lisp/vm/vm-digest.el
--- a/lisp/vm/vm-digest.el Mon Aug 13 08:49:44 2007 +0200
+++ b/lisp/vm/vm-digest.el Mon Aug 13 08:50:05 2007 +0200
@@ -1,5 +1,5 @@
;;; Message encapsulation
-;;; Copyright (C) 1989, 1990, 1993, 1994 Kyle E. Jones
+;;; Copyright (C) 1989, 1990, 1993, 1994, 1997 Kyle E. Jones
;;;
;;; This program is free software; you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
@@ -54,6 +54,149 @@
(goto-char (point-max))
(insert "------- end of forwarded message -------\n"))))
+(defun vm-mime-encapsulate-messages (message-list keep-list discard-regexp)
+ "Encapsulate the messages in MESSAGE-LIST as per the MIME spec.
+The resulting digest is inserted at point in the current buffer.
+Point is not moved.
+
+MESSAGE-LIST should be a list of message structs (real or virtual).
+These are the messages that will be encapsulated.
+KEEP-LIST should be a list of regexps matching headers to keep.
+DISCARD-REGEXP should be a regexp that matches headers to be discarded.
+KEEP-LIST and DISCARD-REGEXP are used to order and trim the headers
+to be forwarded. See the docs for vm-reorder-message-headers
+to find out how KEEP-LIST and DISCARD-REGEXP are used.
+
+Returns the multipart boundary parameter (string) that should be used
+in the Content-Type header."
+ (if message-list
+ (let ((target-buffer (current-buffer))
+ (boundary-positions nil)
+ (mlist message-list)
+ (mime-keep-list (append keep-list vm-mime-header-list))
+ boundary source-buffer m start n beg)
+ (save-restriction
+ ;; narrow to a zero length region to avoid interacting
+ ;; with anything that might have already been inserted
+ ;; into the buffer.
+ (narrow-to-region (point) (point))
+ (setq start (point))
+ (while mlist
+ (setq boundary-positions (cons (point-marker) boundary-positions))
+ (setq m (vm-real-message-of (car mlist))
+ source-buffer (vm-buffer-of m))
+ (setq beg (point))
+ (vm-insert-region-from-buffer source-buffer (vm-headers-of m)
+ (vm-text-end-of m))
+ (goto-char beg)
+ (vm-reorder-message-headers nil nil "\\(X-VM-\\|Status:\\)")
+ (vm-reorder-message-headers
+ nil (if (vm-mime-plain-message-p m)
+ keep-list
+ mime-keep-list)
+ discard-regexp)
+ (goto-char (point-max))
+ (setq mlist (cdr mlist)))
+ (goto-char start)
+ (setq boundary (vm-mime-make-multipart-boundary))
+ (while (re-search-forward (concat "^--"
+ (regexp-quote boundary)
+ "\\(--\\)?$")
+ nil t)
+ (setq boundary (vm-mime-make-multipart-boundary))
+ (goto-char start))
+ (goto-char (point-max))
+ (insert "\n--" boundary "--\n")
+ (while boundary-positions
+ (goto-char (car boundary-positions))
+ (insert "\n--" boundary "\n\n")
+ (setq boundary-positions (cdr boundary-positions)))
+ (goto-char start)
+ (setq n (length message-list))
+ (insert (format "This is a %s%sMIME encapsulation.\n"
+ (if (cdr message-list)
+ "digest, "
+ "forwarded message, ")
+ (if (cdr message-list)
+ (format "%d messages, " n)
+ "")))
+ (goto-char start))
+ boundary )))
+
+(defun vm-mime-burst-message (m)
+ "Burst messages from the digest message M.
+M should be a message struct for a real message.
+MIME encoding is expected. The message content type
+must be either message/* or multipart/digest."
+ (let ((ident-header nil)
+ (layout (vm-mm-layout m)))
+ (if vm-digest-identifier-header-format
+ (setq ident-header (vm-sprintf 'vm-digest-identifier-header-format m)))
+ (vm-mime-burst-layout layout ident-header)))
+
+(defun vm-mime-burst-layout (layout ident-header)
+ (let ((work-buffer nil)
+ (folder-buffer (current-buffer))
+ start part-list
+ (folder-type vm-folder-type))
+ (unwind-protect
+ (vm-save-restriction
+ (save-excursion
+ (widen)
+ (setq work-buffer (generate-new-buffer "*vm-work*"))
+ (buffer-disable-undo work-buffer)
+ (set-buffer work-buffer)
+ (cond ((not (vectorp layout))
+ (error "Not a MIME message"))
+ ((vm-mime-types-match "message"
+ (car (vm-mm-layout-type layout)))
+ (insert (vm-leading-message-separator folder-type))
+ (and ident-header (insert ident-header))
+ (setq start (point))
+ (vm-mime-insert-mime-body layout)
+ (vm-munge-message-separators folder-type start (point))
+ (insert (vm-trailing-message-separator folder-type)))
+ ((vm-mime-types-match "multipart/digest"
+ (car (vm-mm-layout-type layout)))
+ (setq part-list (vm-mm-layout-parts layout))
+ (while part-list
+ ;; Maybe we should verify that each part is
+ ;; of type message/rfc822 in here. But it
+ ;; seems more useful to just copy whatever
+ ;; the contents are and let teh user see the
+ ;; goop, whatever type it really is.
+ (insert (vm-leading-message-separator folder-type))
+ (and ident-header (insert ident-header))
+ (setq start (point))
+ (vm-mime-insert-mime-body (car part-list))
+ (vm-munge-message-separators folder-type start (point))
+ (insert (vm-trailing-message-separator folder-type))
+ (setq part-list (cdr part-list))))
+ (t (error
+ "MIME type is not multipart/digest or message/rfc822")))
+ ;; do header conversions.
+ (let ((vm-folder-type folder-type))
+ (goto-char (point-min))
+ (while (vm-find-leading-message-separator)
+ (vm-skip-past-leading-message-separator)
+ (vm-convert-folder-type-headers folder-type folder-type)
+ (vm-find-trailing-message-separator)
+ (vm-skip-past-trailing-message-separator)))
+ ;; now insert the messages into the folder buffer
+ (cond ((not (zerop (buffer-size)))
+ (set-buffer folder-buffer)
+ (let ((old-buffer-modified-p (buffer-modified-p))
+ (buffer-read-only nil)
+ (inhibit-quit t))
+ (goto-char (point-max))
+ (insert-buffer-substring work-buffer)
+ (set-buffer-modified-p old-buffer-modified-p)
+ ;; return non-nil so caller knows we found some messages
+ t ))
+ ;; return nil so the caller knows we didn't find anything
+ (t nil))))
+ (and work-buffer (kill-buffer work-buffer)))))
+
(defun vm-rfc934-char-stuff-region (start end)
"Quote RFC 934 message separators between START and END.
START and END are buffer positions in the current buffer.
@@ -92,6 +235,7 @@
to find out how KEEP-LIST and DISCARD-REGEXP are used."
(if message-list
(let ((target-buffer (current-buffer))
+ (mime-keep-list (append keep-list vm-mime-header-list))
(mlist message-list)
source-buffer m start n)
(save-restriction
@@ -116,7 +260,11 @@
(goto-char beg)
(vm-reorder-message-headers nil nil
"\\(X-VM-\\|Status:\\)")
- (vm-reorder-message-headers nil keep-list discard-regexp)
+ (vm-reorder-message-headers
+ nil (if (vm-mime-plain-message-p m)
+ keep-list
+ mime-keep-list)
+ discard-regexp)
(vm-rfc934-char-stuff-region beg (point-max))))))
(goto-char (point-max))
(insert "---------------")
@@ -175,6 +323,7 @@
to find out how KEEP-LIST and DISCARD-REGEXP are used."
(if message-list
(let ((target-buffer (current-buffer))
+ (mime-keep-list (append keep-list vm-mime-header-list))
(mlist message-list)
source-buffer m start)
(save-restriction
@@ -199,7 +348,11 @@
(goto-char beg)
(vm-reorder-message-headers nil nil
"\\(X-VM-\\|Status:\\)")
- (vm-reorder-message-headers nil keep-list discard-regexp)
+ (vm-reorder-message-headers
+ nil (if (vm-mime-plain-message-p m)
+ keep-list
+ mime-keep-list)
+ discard-regexp)
(vm-rfc1153-char-stuff-region beg (point-max))))))
(goto-char (point-max))
(insert "\n---------------")
@@ -228,12 +381,13 @@
separator-regexp "^------------------------------\n")
(setq prologue-separator-regexp "^-[^ ].*\n"
separator-regexp "^-[^ ].*\n"))
- (save-excursion
- (vm-save-restriction
+ (vm-save-restriction
+ (save-excursion
(widen)
(unwind-protect
(catch 'done
(setq work-buffer (generate-new-buffer "*vm-work*"))
+ (buffer-disable-undo work-buffer)
(set-buffer work-buffer)
(insert-buffer-substring (vm-buffer-of m)
(vm-text-of m)
@@ -367,7 +521,9 @@
(error "Couldn't guess digest type."))))
(vm-unsaved-message "Bursting %s digest..." digest-type)
(cond
- ((cond ((equal digest-type "rfc934")
+ ((cond ((equal digest-type "mime")
+ (vm-mime-burst-message m))
+ ((equal digest-type "rfc934")
(vm-rfc934-burst-message m))
((equal digest-type "rfc1153")
(vm-rfc1153-burst-message m))
@@ -381,8 +537,10 @@
;; buffer. switch back.
(save-excursion
(set-buffer start-buffer)
- (vm-delete-message 1)))
- (vm-assimilate-new-messages t)
+ ;; don't move message pointer when deleting the message
+ (let ((vm-move-after-deleting nil))
+ (vm-delete-message 1))))
+ (vm-assimilate-new-messages t nil (vm-labels-of (car mlist)))
;; do this now so if we error later in another iteration
;; of the loop the summary and mode line will be correct.
(vm-update-summary-and-mode-line)))
@@ -392,6 +550,7 @@
;; themselves.
(setq totals-blurb (vm-emit-totals-blurb))
(vm-display nil nil '(vm-burst-digest
+ vm-burst-mime-digest
vm-burst-rfc934-digest
vm-burst-rfc1153-digest)
(list this-command))
@@ -410,16 +569,29 @@
(interactive)
(vm-burst-digest "rfc1153"))
+(defun vm-burst-mime-digest ()
+ "Burst a MIME digest"
+ (interactive)
+ (vm-burst-digest "mime"))
+
(defun vm-guess-digest-type (m)
"Guess the digest type of the message M.
M should be the message struct of a real message.
-Returns either \"rfc934\" or \"rfc1153\"."
- (save-excursion
- (set-buffer (vm-buffer-of m))
+Returns either \"rfc934\", \"rfc1153\" or \"mime\"."
+ (catch 'return-value
+ (save-excursion
+ (set-buffer (vm-buffer-of m))
+ (let ((layout (vm-mm-layout m)))
+ (if (and (vectorp layout)
+ (or (vm-mime-types-match "multipart/digest"
+ (car (vm-mm-layout-type layout)))
+ (vm-mime-types-match "message/rfc822"
+ (car (vm-mm-layout-type layout)))))
+ (throw 'return-value "mime"))))
(save-excursion
(save-restriction
(widen)
(goto-char (vm-text-of m))
- (if (search-forward "\n----------------------------------------------------------------------\n" nil t)
- "rfc1153"
- "rfc934")))))
+ (cond ((search-forward "\n----------------------------------------------------------------------\n" (vm-text-end-of m) t)
+ "rfc1153")
+ (t "rfc934"))))))
diff -r ac1f612d5250 -r 859a2309aef8 lisp/vm/vm-edit.el
--- a/lisp/vm/vm-edit.el Mon Aug 13 08:49:44 2007 +0200
+++ b/lisp/vm/vm-edit.el Mon Aug 13 08:50:05 2007 +0200
@@ -1,5 +1,5 @@
;;; Editing VM messages
-;;; Copyright (C) 1990, 1991, 1993, 1994 Kyle E. Jones
+;;; Copyright (C) 1990, 1991, 1993, 1994, 1997 Kyle E. Jones
;;;
;;; This program is free software; you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
@@ -33,6 +33,7 @@
(vm-follow-summary-cursor)
(vm-select-folder-buffer)
(vm-check-for-killed-summary)
+ (vm-check-for-killed-presentation)
(vm-error-if-folder-read-only)
(vm-error-if-folder-empty)
(if (and (vm-virtual-message-p (car vm-message-pointer))
@@ -44,7 +45,10 @@
(vm-set-edited-flag-of (car vm-message-pointer) nil)
(vm-update-summary-and-mode-line)))
(let ((mp vm-message-pointer)
- (offset (- (point) (vm-headers-of (car vm-message-pointer))))
+ (offset (save-excursion
+ (if vm-presentation-buffer
+ (set-buffer vm-presentation-buffer))
+ (- (point) (vm-headers-of (car vm-message-pointer)))))
(edit-buf (vm-edit-buffer-of (car vm-message-pointer)))
(folder-buffer (current-buffer)))
(if (not (and edit-buf (buffer-name edit-buf)))
@@ -124,6 +128,7 @@
(vm-follow-summary-cursor)
(vm-select-folder-buffer)
(vm-check-for-killed-summary)
+ (vm-check-for-killed-presentation)
(vm-error-if-folder-empty)
(let ((mlist (vm-select-marked-or-prefixed-messages count)) m)
(while mlist
@@ -134,6 +139,9 @@
(vm-set-vheaders-of m nil)
(vm-set-vheaders-regexp-of m nil)
(vm-set-text-of m nil)
+ (vm-set-mime-layout-of m nil)
+ (if (and vm-presentation-buffer (eq (car vm-message-pointer) m))
+ (save-excursion (vm-preview-current-message)))
(if vm-thread-obarray
(vm-build-threads (list m)))
(if vm-summary-show-threads
@@ -142,6 +150,9 @@
(save-excursion
(while v-list
(set-buffer (vm-buffer-of (car v-list)))
+ (if (and vm-presentation-buffer
+ (eq (car vm-message-pointer) (car v-list)))
+ (save-excursion (vm-preview-current-message)))
(if vm-thread-obarray
(vm-build-threads (list (car v-list))))
(if vm-summary-show-threads
diff -r ac1f612d5250 -r 859a2309aef8 lisp/vm/vm-folder.el
--- a/lisp/vm/vm-folder.el Mon Aug 13 08:49:44 2007 +0200
+++ b/lisp/vm/vm-folder.el Mon Aug 13 08:50:05 2007 +0200
@@ -1,5 +1,5 @@
;;; VM folder related functions
-;;; Copyright (C) 1989, 1990, 1991, 1993, 1994, 1995, 1996 Kyle E. Jones
+;;; Copyright (C) 1989-1997 Kyle E. Jones
;;;
;;; This program is free software; you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
@@ -59,17 +59,18 @@
vm-numbering-redo-start-point or is equal to t, then
vm-numbering-redo-start-point is set to match it."
(intern (buffer-name) vm-buffers-needing-display-update)
- (if (and (consp start-point) (consp vm-numbering-redo-start-point)
- (not (eq vm-numbering-redo-start-point t)))
- (let ((mp vm-message-list))
- (while (and mp (not (or (eq mp start-point)
- (eq mp vm-numbering-redo-start-point))))
- (setq mp (cdr mp)))
- (if (null mp)
- (error "Something is wrong in vm-set-numbering-redo-start-point"))
- (if (eq mp start-point)
- (setq vm-numbering-redo-start-point start-point)))
- (setq vm-numbering-redo-start-point start-point)))
+ (if (eq vm-numbering-redo-start-point t)
+ nil
+ (if (and (consp start-point) (consp vm-numbering-redo-start-point))
+ (let ((mp vm-message-list))
+ (while (and mp (not (or (eq mp start-point)
+ (eq mp vm-numbering-redo-start-point))))
+ (setq mp (cdr mp)))
+ (if (null mp)
+ (error "Something is wrong in vm-set-numbering-redo-start-point"))
+ (if (eq mp start-point)
+ (setq vm-numbering-redo-start-point start-point)))
+ (setq vm-numbering-redo-start-point start-point))))
(defun vm-set-numbering-redo-end-point (end-point)
"Set vm-numbering-redo-end-point to END-POINT if appropriate.
@@ -122,20 +123,21 @@
START-POINT should be a cons in vm-message-list or just t.
(t means start from the beginning of vm-message-list.)
If START-POINT is closer to the head of vm-message-list than
-vm-numbering-redo-start-point or is equal to t, then
-vm-numbering-redo-start-point is set to match it."
+vm-summary-redo-start-point or is equal to t, then
+vm-summary-redo-start-point is set to match it."
(intern (buffer-name) vm-buffers-needing-display-update)
- (if (and (consp start-point) (consp vm-summary-redo-start-point)
- (not (eq vm-summary-redo-start-point t)))
- (let ((mp vm-message-list))
- (while (and mp (not (or (eq mp start-point)
- (eq mp vm-summary-redo-start-point))))
- (setq mp (cdr mp)))
- (if (null mp)
- (error "Something is wrong in vm-set-summary-redo-start-point"))
- (if (eq mp start-point)
- (setq vm-summary-redo-start-point start-point)))
- (setq vm-summary-redo-start-point start-point)))
+ (if (eq vm-summary-redo-start-point t)
+ nil
+ (if (and (consp start-point) (consp vm-summary-redo-start-point))
+ (let ((mp vm-message-list))
+ (while (and mp (not (or (eq mp start-point)
+ (eq mp vm-summary-redo-start-point))))
+ (setq mp (cdr mp)))
+ (if (null mp)
+ (error "Something is wrong in vm-set-summary-redo-start-point"))
+ (if (eq mp start-point)
+ (setq vm-summary-redo-start-point start-point)))
+ (setq vm-summary-redo-start-point start-point))))
(defun vm-mark-for-summary-update (m &optional dont-kill-cache)
"Mark message M for a summary update.
@@ -235,22 +237,34 @@
"Do a modeline update for the current folder buffer.
This means setting up all the various vm-ml attribute variables
in the folder buffer and copying necessary variables to the
-folder buffer's summary buffer, and then forcing Emacs to update
-all modelines.
+folder buffer's summary and presentation buffers, and then
+forcing Emacs to update all modelines.
-Also if a virtual folder being updated has no messages,
-erase-buffer is called on its buffer."
+If a virtual folder being updated has no messages, then
+erase-buffer is called on its buffer.
+
+If any type of folder is empty, erase-buffer is called
+on its presentation buffer, if any."
;; XXX This last bit should probably should be moved to
;; XXX vm-expunge-folder.
(if (null vm-message-pointer)
- ;; erase the leftover message if the folder is really empty.
- (if (eq major-mode 'vm-virtual-mode)
- (let ((buffer-read-only nil)
- (omodified (buffer-modified-p)))
- (unwind-protect
- (erase-buffer)
- (set-buffer-modified-p omodified))))
+ (progn
+ ;; erase the leftover message if the folder is really empty.
+ (if (eq major-mode 'vm-virtual-mode)
+ (let ((buffer-read-only nil)
+ (omodified (buffer-modified-p)))
+ (unwind-protect
+ (erase-buffer)
+ (set-buffer-modified-p omodified))))
+ (if vm-presentation-buffer
+ (let ((omodified (buffer-modified-p)))
+ (unwind-protect
+ (save-excursion
+ (set-buffer vm-presentation-buffer)
+ (let ((buffer-read-only nil))
+ (erase-buffer)))
+ (set-buffer-modified-p omodified)))))
;; try to avoid calling vm-su-labels if possible so as to
;; avoid loading vm-summary.el.
(if (vm-labels-of (car vm-message-pointer))
@@ -295,6 +309,30 @@
'vm-message-list)
(set-buffer vm-summary-buffer)
(set-buffer-modified-p modified))))
+ (if vm-presentation-buffer
+ (let ((modified (buffer-modified-p)))
+ (save-excursion
+ (vm-copy-local-variables vm-presentation-buffer
+ 'vm-ml-message-new
+ 'vm-ml-message-unread
+ 'vm-ml-message-read
+ 'vm-ml-message-edited
+ 'vm-ml-message-replied
+ 'vm-ml-message-forwarded
+ 'vm-ml-message-filed
+ 'vm-ml-message-written
+ 'vm-ml-message-deleted
+ 'vm-ml-message-marked
+ 'vm-ml-message-number
+ 'vm-ml-highest-message-number
+ 'vm-folder-read-only
+ 'vm-folder-type
+ 'vm-virtual-folder-definition
+ 'vm-virtual-mirror
+ 'vm-ml-labels
+ 'vm-message-list)
+ (set-buffer vm-presentation-buffer)
+ (set-buffer-modified-p modified))))
(vm-force-mode-line-update))
(defun vm-update-summary-and-mode-line ()
@@ -440,7 +478,7 @@
This function works by examining the beginning of a folder.
If optional arg FILE is present the type of FILE is returned instead.
If optional second and third arg START and END are provided,
-vm-get-folder-type will examine the the text between those buffer
+vm-get-folder-type will examine the text between those buffer
positions. START and END default to 1 and (buffer-size) + 1.
Returns
@@ -939,15 +977,17 @@
;;
;; header-alist will contain an assoc list version of
;; keep-list. For messages associated with a folder
- ;; buffer: when a matching header is found, the header
- ;; is stuffed into its corresponding assoc cell and the
- ;; header text is deleted from the buffer. After all
- ;; the visible headers have been collected, they are
- ;; inserted into the buffer in a clump at the end of
- ;; the header section. Unmatched headers are skipped over.
+ ;; buffer: when a matching header is found, the
+ ;; header's start and end positions are added to its
+ ;; corresponding assoc cell. The positions of unwanted
+ ;; headers are remember also so that they can be copied
+ ;; to the top of the message, to be out of sight after
+ ;; narrowing. Once the positions have all been
+ ;; recorded a new copy of the headers is inserted in
+ ;; the proper order and the old headers are deleted.
;;
- ;; For free standing messages, unmatched headers are
- ;; stripped from the message.
+ ;; For free standing messages, unwanted headers are
+ ;; stripped from the message, unremembered.
(vm-save-restriction
(let ((header-alist (vm-build-header-order-alist keep-list))
(buffer-read-only nil)
@@ -961,6 +1001,10 @@
;; in a mail context reordering headers is harmless.
(buffer-file-name nil)
(case-fold-search t)
+ (unwanted-list nil)
+ unwanted-tail
+ new-header-start
+ old-header-start
(old-buffer-modified-p (buffer-modified-p)))
(unwind-protect
(progn
@@ -987,6 +1031,7 @@
(vm-headers-of message)
(vm-text-of message))
(goto-char (point-min))))
+ (setq old-header-start (point))
(while (and (not (= (following-char) ?\n))
(vm-match-header))
(setq end-of-header (vm-matched-header-end)
@@ -998,50 +1043,69 @@
;; discard-regexp is matched
(if (or (and (null list) (null discard-regexp))
(and discard-regexp (looking-at discard-regexp)))
- ;; skip the unwanted header if doing
+ ;; delete the unwanted header if not doing
;; work for a folder buffer, otherwise
- ;; discard the header.
- (if message
- (goto-char end-of-header)
- (delete-region (point) end-of-header))
+ ;; remember the start and end of the
+ ;; unwanted header so we can copy it
+ ;; later.
+ (if (not message)
+ (delete-region (point) end-of-header)
+ (if (null unwanted-list)
+ (setq unwanted-list
+ (cons (point) (cons end-of-header nil))
+ unwanted-tail unwanted-list)
+ (if (= (point) (car (cdr unwanted-tail)))
+ (setcar (cdr unwanted-tail)
+ end-of-header)
+ (setcdr (cdr unwanted-tail)
+ (cons (point)
+ (cons end-of-header nil)))
+ (setq unwanted-tail (cdr (cdr unwanted-tail)))))
+ (goto-char end-of-header))
;; got a match
- ;; stuff the header into the cdr of the
- ;; returned alist element
+ ;; stuff the start and end of the header
+ ;; into the cdr of the returned alist
+ ;; element.
(if list
- (if (cdr list)
- (setcdr list
- (concat
- (cdr list)
- (buffer-substring (point)
- end-of-header)))
- (setcdr list (buffer-substring (point)
- end-of-header)))
+ ;; reverse point and end-of-header.
+ ;; list will be nreversed later.
+ (setcdr list (cons end-of-header
+ (cons (point)
+ (cdr list))))
+ ;; reverse point and end-of-header.
+ ;; list will be nreversed later.
(setq extras
- (cons (buffer-substring (point) end-of-header)
- extras)))
- (delete-region (point) end-of-header)))
+ (cons end-of-header
+ (cons (point) extras))))
+ (goto-char end-of-header)))
+ (setq new-header-start (point))
+ (while unwanted-list
+ (insert-buffer-substring (current-buffer)
+ (car unwanted-list)
+ (car (cdr unwanted-list)))
+ (setq unwanted-list (cdr (cdr unwanted-list))))
;; remember the offset of where the visible
;; header start so we can initialize the
;; vm-vheaders-of field later.
(if message
- (setq vheader-offset (1- (point))))
- ;; now dump out the headers we saved.
- ;; the keep-list headers go first.
- (setq list header-alist)
- (while list
- (if (cdr (car list))
- (progn
- (insert (cdr (car list)))
- (setcdr (car list) nil)))
- (setq list (cdr list)))
+ (setq vheader-offset (- (point) new-header-start)))
+ (while header-alist
+ (setq list (nreverse (cdr (car header-alist))))
+ (while list
+ (insert-buffer-substring (current-buffer)
+ (car list)
+ (car (cdr list)))
+ (setq list (cdr (cdr list))))
+ (setq header-alist (cdr header-alist)))
;; now the headers that were not explicitly
;; undesirable, if any.
- (if extras
- (progn
- (setq extras (nreverse extras))
- (while extras
- (insert (car extras))
- (setq extras (cdr extras)))))
+ (setq extras (nreverse extras))
+ (while extras
+ (insert-buffer-substring (current-buffer)
+ (car extras)
+ (car (cdr extras)))
+ (setq extras (cdr (cdr extras))))
+ (delete-region old-header-start new-header-start)
;; update the folder buffer if we're supposed to.
;; lock out interrupts.
(if message
@@ -1473,8 +1537,6 @@
attributes cache
(case-fold-search t)
(buffer-read-only nil)
- ;; don't truncate the printing of large Lisp objects
- (print-length nil)
opoint
;; This prevents file locking from occuring. Disabling
;; locking can speed things noticeably if the lock
@@ -1533,6 +1595,28 @@
(vm-set-modflag-of m nil))
(set-buffer-modified-p old-buffer-modified-p))))))
+(defun vm-stuff-folder-attributes (&optional abort-if-input-pending)
+ (let ((newlist nil) mp)
+ ;; stuff the attributes of messages that need it.
+ ;; build a list of messages that need their attributes stuffed
+ (setq mp vm-message-list)
+ (while mp
+ (if (vm-modflag-of (car mp))
+ (setq newlist (cons (car mp) newlist)))
+ (setq mp (cdr mp)))
+ ;; now sort the list by physical order so that we
+ ;; reduce the amount of gap motion induced by modifying
+ ;; the buffer. what we want to avoid is updating
+ ;; message 3, then 234, then 10, then 500, thus causing
+ ;; large chunks of memory to be copied repeatedly as
+ ;; the gap moves to accomodate the insertions.
+ (let ((vm-key-functions '(vm-sort-compare-physical-order-r)))
+ (setq mp (sort newlist 'vm-sort-compare-xxxxxx)))
+ (while (and mp (or (not abort-if-input-pending) (not (input-pending-p))))
+ (vm-stuff-attributes (car mp))
+ (setq mp (cdr mp)))
+ (if mp nil t)))
+
;; we can be a bit lazy in this function since it's only called
;; from within vm-stuff-attributes. we don't worry about
;; restoring the modified flag, setting buffer-read-only, or
@@ -1655,8 +1739,6 @@
;; oh well, no way around this.
(insert vm-labels-header " "
(let ((print-escape-newlines t)
- ;; don't truncate the printing of large Lisp objects
- (print-length nil)
(list nil))
(mapatoms (function
(lambda (sym)
@@ -1717,8 +1799,6 @@
(widen)
(let ((old-buffer-modified-p (buffer-modified-p))
(case-fold-search t)
- ;; don't truncate the printing of large Lisp objects
- (print-length nil)
;; This prevents file locking from occuring. Disabling
;; locking can speed things noticeably if the lock
;; directory is on a slow device. We don't need locking
@@ -1765,8 +1845,6 @@
(case-fold-search t)
(print-escape-newlines t)
lim
- ;; don't truncate the printing of large Lisp objects
- (print-length nil)
(buffer-read-only nil)
;; This prevents file locking from occuring. Disabling
;; locking can speed things noticeably if the lock
@@ -1810,8 +1888,6 @@
(widen)
(let ((old-buffer-modified-p (buffer-modified-p))
(case-fold-search t)
- ;; don't truncate the printing of large Lisp objects
- (print-length nil)
;; This prevents file locking from occuring. Disabling
;; locking can speed things noticeably if the lock
;; directory is on a slow device. We don't need locking
@@ -1937,8 +2013,11 @@
(if (not (memq major-mode '(vm-mode vm-virtual-mode)))
(error "%s must be invoked from a VM buffer." this-command))
(vm-check-for-killed-summary)
+ (vm-check-for-killed-presentation)
- (run-hooks 'vm-quit-hook)
+ (save-excursion (run-hooks 'vm-quit-hook))
+
+ (vm-garbage-collect-message)
(vm-display nil nil '(vm-quit-just-bury)
'(vm-quit-just-bury quitting))
@@ -1946,6 +2025,10 @@
(vm-display vm-summary-buffer nil nil nil))
(if vm-summary-buffer
(vm-bury-buffer vm-summary-buffer))
+ (if vm-presentation-buffer-handle
+ (vm-display vm-presentation-buffer-handle nil nil nil))
+ (if vm-presentation-buffer-handle
+ (vm-bury-buffer vm-presentation-buffer-handle))
(vm-display (current-buffer) nil nil nil)
(vm-bury-buffer (current-buffer)))
@@ -1957,15 +2040,22 @@
(if (not (memq major-mode '(vm-mode vm-virtual-mode)))
(error "%s must be invoked from a VM buffer." this-command))
(vm-check-for-killed-summary)
+ (vm-check-for-killed-presentation)
- (run-hooks 'vm-quit-hook)
+ (save-excursion (run-hooks 'vm-quit-hook))
+
+ (vm-garbage-collect-message)
(vm-display nil nil '(vm-quit-just-iconify)
'(vm-quit-just-iconify quitting))
- (vm-bury-buffer (current-buffer))
- (if vm-summary-buffer
- (vm-bury-buffer vm-summary-buffer))
- (vm-iconify-frame))
+ (let ((summary-buffer vm-summary-buffer)
+ (pres-buffer vm-presentation-buffer-handle))
+ (vm-bury-buffer (current-buffer))
+ (if summary-buffer
+ (vm-bury-buffer summary-buffer))
+ (if pres-buffer
+ (vm-bury-buffer pres-buffer))
+ (vm-iconify-frame)))
(defun vm-quit-no-change ()
"Quit visiting the current folder without saving changes made to the folder."
@@ -1979,11 +2069,13 @@
(if (not (memq major-mode '(vm-mode vm-virtual-mode)))
(error "%s must be invoked from a VM buffer." this-command))
(vm-check-for-killed-summary)
+ (vm-check-for-killed-presentation)
(vm-display nil nil '(vm-quit vm-quit-no-change)
(list this-command 'quitting))
(let ((virtual (eq major-mode 'vm-virtual-mode)))
(cond
((and (not virtual) no-change (buffer-modified-p)
+ (or buffer-file-name buffer-offer-save)
(not (zerop vm-messages-not-on-disk))
;; Folder may have been saved with C-x C-s and attributes may have
;; been changed after that; in that case vm-messages-not-on-disk
@@ -2000,14 +2092,20 @@
(if (= 1 vm-messages-not-on-disk) "" "s")))))
(error "Aborted"))
((and (not virtual)
- no-change (buffer-modified-p) vm-confirm-quit
+ no-change
+ (or buffer-file-name buffer-offer-save)
+ (buffer-modified-p)
+ vm-confirm-quit
(not (y-or-n-p "There are unsaved changes, quit anyway? ")))
(error "Aborted"))
((and (eq vm-confirm-quit t)
(not (y-or-n-p "Do you really want to quit? ")))
(error "Aborted")))
- (run-hooks 'vm-quit-hook)
+ (save-excursion (run-hooks 'vm-quit-hook))
+
+ (vm-garbage-collect-message)
+ (vm-garbage-collect-folder)
(vm-virtual-quit)
(if (and (not no-change) (not virtual))
@@ -2016,45 +2114,71 @@
(vm-unsaved-message "Quitting...")
(or vm-folder-read-only (eq major-mode 'vm-virtual-mode)
(vm-change-all-new-to-unread))))
- (if (and (buffer-modified-p) (not no-change) (not virtual))
+ (if (and (buffer-modified-p)
+ (or buffer-file-name buffer-offer-save)
+ (not no-change)
+ (not virtual))
(vm-save-folder))
(vm-unsaved-message "")
(let ((summary-buffer vm-summary-buffer)
+ (pres-buffer vm-presentation-buffer-handle)
(mail-buffer (current-buffer)))
(if summary-buffer
(progn
- (vm-display vm-summary-buffer nil nil nil)
+ (vm-display summary-buffer nil nil nil)
(kill-buffer summary-buffer)))
+ (if pres-buffer
+ (progn
+ (vm-display pres-buffer nil nil nil)
+ (kill-buffer pres-buffer)))
(set-buffer mail-buffer)
(vm-display mail-buffer nil nil nil)
;; vm-display is not supposed to change the current buffer.
- ;; still better to be safe here.
+ ;; still it's better to be safe here.
(set-buffer mail-buffer)
(set-buffer-modified-p nil)
(kill-buffer (current-buffer)))
(vm-update-summary-and-mode-line)))
(defun vm-start-itimers-if-needed ()
- (if (or (natnump vm-flush-interval)
- (natnump vm-auto-get-new-mail))
- (progn
- (if (null
- (condition-case data
- (progn (require 'itimer) t)
- (error nil)))
- (setq vm-flush-interval t
- vm-auto-get-new-mail t)
- (and (natnump vm-flush-interval) (not (get-itimer "vm-flush"))
- (start-itimer "vm-flush" 'vm-flush-itimer-function
- vm-flush-interval nil))
- (and (natnump vm-auto-get-new-mail) (not (get-itimer "vm-get-mail"))
- (start-itimer "vm-get-mail" 'vm-get-mail-itimer-function
- vm-auto-get-new-mail nil))))))
+ (cond ((and (not (natnump vm-flush-interval))
+ (not (natnump vm-auto-get-new-mail))))
+ ((condition-case data
+ (progn (require 'itimer) t)
+ (error nil))
+ (and (natnump vm-flush-interval) (not (get-itimer "vm-flush"))
+ (start-itimer "vm-flush" 'vm-flush-itimer-function
+ vm-flush-interval nil))
+ (and (natnump vm-auto-get-new-mail) (not (get-itimer "vm-get-mail"))
+ (start-itimer "vm-get-mail" 'vm-get-mail-itimer-function
+ vm-auto-get-new-mail nil)))
+ ((condition-case data
+ (progn (require 'timer) t)
+ (error nil))
+ (let (timer)
+ (and (natnump vm-flush-interval)
+ (setq timer (run-at-time vm-flush-interval vm-flush-interval
+ 'vm-flush-itimer-function nil))
+ (timer-set-function timer 'vm-flush-itimer-function
+ (list timer)))
+ (and (natnump vm-auto-get-new-mail)
+ (setq timer (run-at-time vm-auto-get-new-mail
+ vm-auto-get-new-mail
+ 'vm-get-mail-itimer-function nil))
+ (timer-set-function timer 'vm-get-mail-itimer-function
+ (list timer)))))
+ (t
+ (setq vm-flush-interval t
+ vm-auto-get-new-mail t))))
;; support for numeric vm-auto-get-new-mail
-(defun vm-get-mail-itimer-function ()
+;; if timer argument is present, this means we're using the Emacs
+;; 'timer package rather than the 'itimer package.
+(defun vm-get-mail-itimer-function (&optional timer)
(if (integerp vm-auto-get-new-mail)
- (set-itimer-restart current-itimer vm-auto-get-new-mail))
+ (if timer
+ (timer-set-time timer (current-time) vm-auto-get-new-mail)
+ (set-itimer-restart current-itimer vm-auto-get-new-mail)))
(let ((b-list (buffer-list)))
(while (and (not (input-pending-p)) b-list)
(save-excursion
@@ -2079,13 +2203,19 @@
(setq b-list (cdr b-list)))))
;; support for numeric vm-flush-interval
-(defun vm-flush-itimer-function ()
+;; if timer argument is present, this means we're using the Emacs
+;; 'timer package rather than the 'itimer package.
+(defun vm-flush-itimer-function (&optional timer)
(if (integerp vm-flush-interval)
- (set-itimer-restart current-itimer vm-flush-interval))
+ (if timer
+ (timer-set-time timer (current-time) vm-flush-interval)
+ (set-itimer-restart current-itimer vm-flush-interval)))
;; if no vm-mode buffers are found, we might as well shut down the
;; flush itimer.
(if (not (vm-flush-cached-data))
- (set-itimer-restart current-itimer nil)))
+ (if timer
+ (cancel-timer timer)
+ (set-itimer-restart current-itimer nil))))
;; flush cached data in all vm-mode buffers.
;; returns non-nil if any vm-mode buffers were found.
@@ -2099,16 +2229,12 @@
(setq found-one t)
(if (not (eq vm-modification-counter
vm-flushed-modification-counter))
- (let ((mp vm-message-list))
+ (progn
(vm-stuff-summary)
(vm-stuff-labels)
(and vm-message-order-changed
(vm-stuff-message-order))
- (while (and mp (not (input-pending-p)))
- (if (vm-modflag-of (car mp))
- (vm-stuff-attributes (car mp)))
- (setq mp (cdr mp)))
- (and (null mp)
+ (and (vm-stuff-folder-attributes t)
(setq vm-flushed-modification-counter
vm-modification-counter))))))
(setq buf-list (cdr buf-list)))
@@ -2124,23 +2250,19 @@
;; the stuff routines clean up after themselves, but should remain
;; as a safeguard against the time when other stuff is added here.
(vm-save-restriction
- (let ((mp vm-message-list)
- (buffer-read-only))
- (while mp
- (if (vm-modflag-of (car mp))
- (vm-stuff-attributes (car mp)))
- (setq mp (cdr mp)))
- (if vm-message-list
- (progn
- ;; get summary cache up-to-date
- (vm-update-summary-and-mode-line)
- (vm-stuff-bookmark)
- (vm-stuff-header-variables)
- (vm-stuff-labels)
- (vm-stuff-summary)
- (and vm-message-order-changed
- (vm-stuff-message-order))))
- nil ))))
+ (let ((buffer-read-only))
+ (vm-stuff-folder-attributes nil)
+ (if vm-message-list
+ (progn
+ ;; get summary cache up-to-date
+ (vm-update-summary-and-mode-line)
+ (vm-stuff-bookmark)
+ (vm-stuff-header-variables)
+ (vm-stuff-labels)
+ (vm-stuff-summary)
+ (and vm-message-order-changed
+ (vm-stuff-message-order))))
+ nil ))))
(defun vm-save-buffer (prefix)
(interactive "P")
@@ -2177,14 +2299,10 @@
(if (eq major-mode 'vm-virtual-mode)
(vm-virtual-save-folder prefix)
(if (buffer-modified-p)
- (let (mp)
+ (let (mp (newlist nil))
;; stuff the attributes of messages that need it.
(vm-unsaved-message "Stuffing attributes...")
- (setq mp vm-message-list)
- (while mp
- (if (vm-modflag-of (car mp))
- (vm-stuff-attributes (car mp)))
- (setq mp (cdr mp)))
+ (vm-stuff-folder-attributes nil)
;; stuff bookmark and header variable values
(if vm-message-list
(progn
@@ -2435,8 +2553,31 @@
;; a timer process might try to start retrieving mail
;; before we finish. block these attempts.
(vm-block-new-mail t)
+ (fallback-triples nil)
crash in maildrop popdrop
(got-mail nil))
+ (cond ((and buffer-file-name
+ (consp vm-spool-file-suffixes)
+ (stringp vm-crash-box-suffix))
+ (setq fallback-triples
+ (mapcar (function
+ (lambda (suffix)
+ (list buffer-file-name
+ (concat buffer-file-name suffix)
+ (concat buffer-file-name
+ vm-crash-box-suffix))))
+ vm-spool-file-suffixes))))
+ (cond ((and buffer-file-name
+ vm-make-spool-file-name vm-make-crash-box-name)
+ (setq fallback-triples
+ (ncons fallback-triples
+ (list (list buffer-file-name
+ (save-excursion
+ (funcall vm-make-spool-file-name
+ buffer-file-name))
+ (save-excursion
+ (funcall vm-make-crash-box-name
+ buffer-file-name))))))))
(cond ((null (vm-spool-files))
(setq triples (list
(list vm-primary-inbox
@@ -2449,6 +2590,7 @@
(vm-spool-files))))
((consp (car (vm-spool-files)))
(setq triples (vm-spool-files))))
+ (setq triples (append triples fallback-triples))
(while triples
(setq in (expand-file-name (nth 0 (car triples)) vm-folder-directory)
maildrop (nth 1 (car triples))
@@ -2573,7 +2715,10 @@
(message "No messages gathered."))))))
;; returns non-nil if there were any new messages
-(defun vm-assimilate-new-messages (&optional dont-read-attributes gobble-order)
+(defun vm-assimilate-new-messages (&optional
+ dont-read-attributes
+ gobble-order
+ labels)
(let ((tail-cons (vm-last vm-message-list))
b-list new-messages)
(save-excursion
@@ -2606,6 +2751,12 @@
;; vm-assimilate-new-messages returns this value so it must
;; not be mangled.
(setq new-messages (copy-sequence new-messages))
+ ;; add the labels
+ (if (and labels vm-burst-digest-messages-inherit-labels)
+ (let ((mp new-messages))
+ (while mp
+ (vm-set-labels-of (car mp) (copy-sequence labels))
+ (setq mp (cdr mp)))))
(if vm-summary-show-threads
(progn
;; get numbering and summary of new messages done now
@@ -2688,7 +2839,7 @@
(defun vm-display-startup-message ()
(if (sit-for 5)
(let ((lines vm-startup-message-lines))
- (message "VM %s, Copyright (C) 1996 Kyle E. Jones; type ? for help"
+ (message "VM %s, Copyright (C) 1997 Kyle E. Jones; type ? for help"
vm-version)
(setq vm-startup-message-displayed t)
(while (and (sit-for 4) lines)
@@ -2702,7 +2853,7 @@
(progn
(and vm-init-file
(load vm-init-file (not interactive) (not interactive) t))
- (and vm-options-file (load vm-options-file t t t))))
+ (and vm-preferences-file (load vm-preferences-file t t t))))
(setq vm-init-file-loaded t)
(vm-display nil nil '(vm-load-init-file) '(vm-load-init-file)))
@@ -2744,10 +2895,16 @@
mode-line-format vm-mode-line-format
mode-name "VM"
;; must come after the setting of major-mode
- mode-popup-menu (and vm-use-menus
+ mode-popup-menu (and vm-use-menus vm-popup-menu-on-mouse-3
(vm-menu-support-possible-p)
(vm-menu-mode-menu))
buffer-read-only t
+ ;; If the user quits a vm-mode buffer, the default action is
+ ;; to kill the buffer. Make a note that we should offer to
+ ;; save this buffer even if it has no file associated with it.
+ ;; We have no idea of the value of the data in the buffer
+ ;; before it was put into vm-mode.
+ buffer-offer-save t
require-final-newline nil
vm-thread-obarray nil
vm-thread-subject-obarray nil
@@ -2767,6 +2924,15 @@
(use-local-map vm-mode-map)
(and (vm-menu-support-possible-p)
(vm-menu-install-menus))
+ (add-hook 'kill-buffer-hook 'vm-garbage-collect-folder)
+ (add-hook 'kill-buffer-hook 'vm-garbage-collect-message)
+ ;; avoid the XEmacs file dialog box.
+ (defvar should-use-dialog-box)
+ (make-local-variable 'should-use-dialog-box)
+ (setq should-use-dialog-box nil)
+ ;; mail folders are precious. protect them by default.
+ (make-local-variable 'file-precious-flag)
+ (setq file-precious-flag t)
(run-hooks 'vm-mode-hook)
;; compatibility
(run-hooks 'vm-mode-hooks))
@@ -2881,6 +3047,24 @@
(narrow-to-region (point-min) (vm-text-end-of (car vm-message-pointer))))
(vm-display nil nil '(vm-change-folder-type) '(vm-change-folder-type)))
+(defun vm-garbage-collect-folder ()
+ (save-excursion
+ (while vm-folder-garbage-alist
+ (condition-case nil
+ (funcall (cdr (car vm-folder-garbage-alist))
+ (car (car vm-folder-garbage-alist)))
+ (error nil))
+ (setq vm-folder-garbage-alist (cdr vm-folder-garbage-alist)))))
+
+(defun vm-garbage-collect-message ()
+ (save-excursion
+ (while vm-message-garbage-alist
+ (condition-case nil
+ (funcall (cdr (car vm-message-garbage-alist))
+ (car (car vm-message-garbage-alist)))
+ (error nil))
+ (setq vm-message-garbage-alist (cdr vm-message-garbage-alist)))))
+
(if (not (memq 'vm-write-file-hook write-file-hooks))
(setq write-file-hooks
(cons 'vm-write-file-hook write-file-hooks)))
diff -r ac1f612d5250 -r 859a2309aef8 lisp/vm/vm-mark.el
--- a/lisp/vm/vm-mark.el Mon Aug 13 08:49:44 2007 +0200
+++ b/lisp/vm/vm-mark.el Mon Aug 13 08:50:05 2007 +0200
@@ -98,6 +98,61 @@
'(vm-unmark-message marking-message))
(vm-update-summary-and-mode-line))
+(defun vm-mark-summary-region ()
+ "Mark all messages with summary lines contained in the region."
+ (interactive)
+ (vm-select-folder-buffer)
+ (vm-check-for-killed-summary)
+ (vm-error-if-folder-empty)
+ (if (null vm-summary-buffer)
+ (error "No summary."))
+ (set-buffer vm-summary-buffer)
+ (if (not (mark))
+ (error "The region is not active now"))
+ (vm-mark-or-unmark-summary-region t)
+ (vm-display nil nil '(vm-mark-summary-region)
+ '(vm-mark-summary-region marking-message))
+ (vm-update-summary-and-mode-line))
+
+(defun vm-unmark-summary-region ()
+ "Remove marks from messages with summary lines contained in the region."
+ (interactive)
+ (vm-select-folder-buffer)
+ (vm-check-for-killed-summary)
+ (vm-error-if-folder-empty)
+ (if (null vm-summary-buffer)
+ (error "No summary."))
+ (set-buffer vm-summary-buffer)
+ (if (not (mark))
+ (error "The region is not active now"))
+ (vm-mark-or-unmark-summary-region nil)
+ (vm-display nil nil '(vm-unmark-summary-region)
+ '(vm-unmark-summary-region marking-message))
+ (vm-update-summary-and-mode-line))
+
+(defun vm-mark-or-unmark-summary-region (markit)
+ ;; The folder buffers copy of vm-message-list has already been
+ ;; propagated to the summary buffer.
+ (let ((mp vm-message-list)
+ (beg (point))
+ (end (mark))
+ tmp m)
+ (if (> beg end)
+ (setq tmp beg beg end end tmp))
+ (while mp
+ (setq m (car mp))
+ (if (not (eq (not markit) (not (vm-mark-of m))))
+ (if (or (and (> (vm-su-end-of m) beg)
+ (< (vm-su-end-of m) end))
+ (and (>= (vm-su-start-of m) beg)
+ (< (vm-su-start-of m) end))
+ (and (>= beg (vm-su-start-of m))
+ (< beg (vm-su-end-of m))))
+ (progn
+ (vm-set-mark-of m markit)
+ (vm-mark-for-summary-update m t))))
+ (setq mp (cdr mp)))))
+
(defun vm-mark-or-unmark-messages-with-selector (val selector arg)
(let ((mlist vm-message-list)
(virtual (eq major-mode 'vm-virtual-mode))
diff -r ac1f612d5250 -r 859a2309aef8 lisp/vm/vm-menu.el
--- a/lisp/vm/vm-menu.el Mon Aug 13 08:49:44 2007 +0200
+++ b/lisp/vm/vm-menu.el Mon Aug 13 08:50:05 2007 +0200
@@ -1,5 +1,5 @@
;;; Menu related functions and commands
-;;; Copyright (C) 1995 Kyle E. Jones
+;;; Copyright (C) 1995, 1997 Kyle E. Jones
;;;
;;; Folders menu derived from
;;; vm-folder-menu.el
@@ -123,6 +123,7 @@
["Pipe to Command" vm-pipe-message-to-command vm-message-list]
"---"
["Burst Message as Digest" (vm-burst-digest "guess") vm-message-list]
+ ["Decode MIME" vm-decode-mime-message (vm-menu-can-decode-mime-p)]
))))
(defconst vm-menu-motion-menu
@@ -178,6 +179,7 @@
["Retry Bounced Message" vm-resend-bounced-message vm-message-list]
["Send Digest (RFC934)" vm-send-rfc934-digest vm-message-list]
["Send Digest (RFC1153)" vm-send-rfc1153-digest vm-message-list]
+ ["Send MIME Digest" vm-send-mime-digest vm-message-list]
))
(defconst vm-menu-mark-menu
@@ -281,8 +283,36 @@
["Insert Signature" mail-signature t]
["Insert File..." insert-file t]
["Insert Buffer..." insert-buffer t]
+ "----"
+ "MIME:"
+ "----"
+ [" Attach File..." vm-mime-attach-file vm-send-using-mime]
+ [" Attach MIME File..." vm-mime-attach-mime-file vm-send-using-mime]
+ [" Encode MIME, But Don't Send" vm-mime-encode-composition
+ (and vm-send-using-mime
+ (null (vm-mail-mode-get-header-contents "MIME-Version:")))]
+ [" Preview MIME Before Sending" vm-mime-preview-composition
+ vm-send-using-mime]
))))
+(defconst vm-menu-mime-dispose-menu
+ (let ((title (if (vm-menu-fsfemacs-menus-p)
+ (list "Send MIME body to ..."
+ "Send MIME body to ..."
+ "---"
+ "---")
+ (list "Send MIME body to ..."))))
+ (append
+ title
+ (list ["File" (vm-mime-run-display-function-at-point
+ 'vm-mime-send-body-to-file) t]
+ ["Shell Pipeline (display output)"
+ (vm-mime-run-display-function-at-point
+ 'vm-mime-pipe-body-to-command) t]
+ ["Shell Pipeline (discard output)"
+ (vm-mime-run-display-function-at-point
+ 'vm-mime-pipe-body-to-command-discard-output) t]))))
+
(defconst vm-menu-url-browser-menu
(let ((title (if (vm-menu-fsfemacs-menus-p)
(list "Send URL to ..."
@@ -369,7 +399,7 @@
vm-menu-label-menu
vm-menu-sort-menu
vm-menu-virtual-menu
- vm-menu-undo-menu
+;; vm-menu-undo-menu
vm-menu-dispose-menu
"---"
"---"
@@ -420,6 +450,16 @@
(vm-select-folder-buffer)
vm-undo-record-list))
+(defun vm-menu-can-decode-mime-p ()
+ (save-excursion
+ (vm-check-for-killed-folder)
+ (vm-select-folder-buffer)
+ (and vm-display-using-mime
+ vm-message-pointer
+ vm-presentation-buffer
+ (not vm-mime-decoded)
+ (not (vm-mime-plain-message-p (car vm-message-pointer))))))
+
(defun vm-menu-yank-original ()
(interactive)
(save-excursion
@@ -508,6 +548,10 @@
;; url browser menu
(vm-easy-menu-define vm-menu-fsfemacs-url-browser-menu (list dummy) nil
vm-menu-url-browser-menu)
+ ;; mime dispose menu
+ (vm-easy-menu-define vm-menu-fsfemacs-mime-dispose-menu
+ (list dummy) nil
+ vm-menu-mime-dispose-menu)
;; block the global menubar entries in the map so that VM
;; can take over the menubar if necessary.
(define-key map [rootmenu] (make-sparse-keymap))
@@ -553,7 +597,7 @@
(menu-list
(if (consp vm-use-menus)
(reverse vm-use-menus)
- (list 'help nil 'dispose 'undo 'virtual 'sort
+ (list 'help nil 'dispose 'virtual 'sort
'label 'mark 'send 'motion 'folder))))
(while menu-list
(if (null (car menu-list))
@@ -624,12 +668,16 @@
(vm-menu-popup-url-browser-menu event))
((setq menu (overlay-get (car o-list) 'vm-header))
(setq found t)
- (vm-menu-popup-fsfemacs-menu event menu)))
+ (vm-menu-popup-fsfemacs-menu event menu))
+ ((overlay-get (car o-list) 'vm-mime-layout)
+ (setq found t)
+ (vm-menu-popup-mime-dispose-menu event)))
(setq o-list (cdr o-list)))
(and (not found) (vm-menu-popup-fsfemacs-menu event))))))
;; to quiet the byte-compiler
(defvar vm-menu-fsfemacs-url-browser-menu)
+(defvar vm-menu-fsfemacs-mime-dispose-menu)
(defun vm-menu-popup-url-browser-menu (event)
(interactive "e")
@@ -647,6 +695,22 @@
(vm-menu-popup-fsfemacs-menu
event vm-menu-fsfemacs-url-browser-menu))))
+(defun vm-menu-popup-mime-dispose-menu (event)
+ (interactive "e")
+ (cond ((and (vm-menu-xemacs-menus-p) vm-use-menus)
+ ;; Must select window instead of just set-buffer because
+ ;; popup-menu returns before the user has made a
+ ;; selection. This will cause the command loop to
+ ;; resume which might undo what set-buffer does.
+ (select-window (event-window event))
+ (and (event-point event) (goto-char (event-point event)))
+ (popup-menu vm-menu-mime-dispose-menu))
+ ((and (vm-menu-fsfemacs-menus-p) vm-use-menus)
+ (set-buffer (window-buffer (posn-window (event-start event))))
+ (goto-char (posn-point (event-start event)))
+ (vm-menu-popup-fsfemacs-menu
+ event vm-menu-fsfemacs-mime-dispose-menu))))
+
;; to quiet the byte-compiler
(defvar vm-menu-fsfemacs-mail-menu)
(defvar vm-menu-fsfemacs-dispose-popup-menu)
@@ -696,6 +760,9 @@
(cond ((vm-menu-xemacs-menus-p)
(if (null (car (find-menu-item current-menubar '("XEmacs"))))
(set-buffer-menubar vm-menu-vm-menubar)
+ ;; copy the current menubar in case it has been changed.
+ (make-local-variable 'vm-menu-vm-menubar)
+ (setq vm-menu-vm-menubar (copy-sequence current-menubar))
(set-buffer-menubar (copy-sequence (vm-menu-xemacs-global-menubar)))
(condition-case nil
(add-menu-button nil vm-menu-vm-button nil)
@@ -704,7 +771,12 @@
(vm-menu-set-menubar-dirty-flag)
(vm-check-for-killed-summary)
(and vm-summary-buffer
- (vm-menu-toggle-menubar vm-summary-buffer)))
+ (save-excursion
+ (vm-menu-toggle-menubar vm-summary-buffer)))
+ (vm-check-for-killed-presentation)
+ (and vm-presentation-buffer-handle
+ (save-excursion
+ (vm-menu-toggle-menubar vm-presentation-buffer-handle))))
((vm-menu-fsfemacs-menus-p)
(if (not (eq (lookup-key vm-mode-map [menu-bar])
(lookup-key vm-mode-menu-map [rootmenu vm])))
@@ -719,7 +791,9 @@
(defun vm-menu-install-menubar ()
(cond ((vm-menu-xemacs-menus-p)
(setq vm-menu-vm-menubar (vm-menu-make-xemacs-menubar))
- (set-buffer-menubar vm-menu-vm-menubar))
+ (set-buffer-menubar vm-menu-vm-menubar)
+ (run-hooks 'vm-menu-setup-hook)
+ (setq vm-menu-vm-menubar current-menubar))
((and (vm-menu-fsfemacs-menus-p)
;; menus only need to be installed once for FSF Emacs
(not (fboundp 'vm-menu-undo-menu)))
@@ -750,7 +824,8 @@
(cond ((vm-menu-xemacs-menus-p)
;; mail-mode doesn't have mode-popup-menu bound to
;; mouse-3 by default. fix that.
- (define-key vm-mail-mode-map 'button3 'popup-mode-menu)
+ (if vm-popup-menu-on-mouse-3
+ (define-key vm-mail-mode-map 'button3 'popup-mode-menu))
;; put menu on menubar also.
(if (vm-menu-xemacs-global-menubar)
(progn
@@ -764,8 +839,9 @@
;; Poorly.
;;(define-key vm-mail-mode-map [menu-bar mail]
;; (cons "Mail" vm-menu-fsfemacs-mail-menu))
- (define-key vm-mail-mode-map [down-mouse-3]
- 'vm-menu-popup-mode-menu))))
+ (if vm-popup-menu-on-mouse-3
+ (define-key vm-mail-mode-map [down-mouse-3]
+ 'vm-menu-popup-mode-menu)))))
(defun vm-menu-install-menus ()
(cond ((consp vm-use-menus)
diff -r ac1f612d5250 -r 859a2309aef8 lisp/vm/vm-message.el
--- a/lisp/vm/vm-message.el Mon Aug 13 08:49:44 2007 +0200
+++ b/lisp/vm/vm-message.el Mon Aug 13 08:50:05 2007 +0200
@@ -1,5 +1,5 @@
;;; Macros and functions dealing with accessing VM message struct fields
-;;; Copyright (C) 1989, 1990, 1991, 1993, 1994, 1995 Kyle E. Jones
+;;; Copyright (C) 1989-1997 Kyle E. Jones
;;;
;;; This program is free software; you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
@@ -81,6 +81,11 @@
;; summary for unmirrored virtual message
(defmacro vm-virtual-summary-of (message)
(list 'aref (list 'aref message 1) 15))
+;; MIME layout information; types, ids, positions, etc. of all MIME entities
+(defmacro vm-mime-layout-of (message)
+ (list 'aref (list 'aref message 1) 16))
+(defmacro vm-mime-encoded-header-flag-of (message)
+ (list 'aref (list 'aref message 1) 17))
;; message attribute vector
(defmacro vm-attributes-of (message) (list 'aref message 2))
(defmacro vm-new-flag (message) (list 'aref (list 'aref message 2) 0))
@@ -202,6 +207,10 @@
(list 'aset (list 'aref message 1) 14 data))
(defmacro vm-set-virtual-summary-of (message summ)
(list 'aset (list 'aref message 1) 15 summ))
+(defmacro vm-set-mime-layout-of (message layout)
+ (list 'aset (list 'aref message 1) 16 layout))
+(defmacro vm-set-mime-encoded-header-flag-of (message flag)
+ (list 'aset (list 'aref message 1) 17 flag))
(defmacro vm-set-attributes-of (message attrs) (list 'aset message 2 attrs))
;; The other routines in attributes group are part of the undo system.
(defun vm-set-edited-flag-of (message flag)
diff -r ac1f612d5250 -r 859a2309aef8 lisp/vm/vm-mime.el
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/vm/vm-mime.el Mon Aug 13 08:50:05 2007 +0200
@@ -0,0 +1,2495 @@
+;;; MIME support functions
+;;; Copyright (C) 1997 Kyle E. Jones
+;;;
+;;; This program is free software; you can redistribute it and/or modify
+;;; it under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 1, or (at your option)
+;;; any later version.
+;;;
+;;; This program is distributed in the hope that it will be useful,
+;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with this program; if not, write to the Free Software
+;;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+(provide 'vm-mime)
+
+(defun vm-mime-error (&rest args)
+ (signal 'vm-mime-error (list (apply 'format args)))
+ (error "can't return from vm-mime-error"))
+
+(if (fboundp 'define-error)
+ (define-error 'vm-mime-error "MIME error")
+ (put 'vm-mime-error 'error-conditions '(vm-mime-error error))
+ (put 'vm-mime-error 'error-message "MIME error"))
+
+(defun vm-mm-layout-type (e) (aref e 0))
+(defun vm-mm-layout-encoding (e) (aref e 1))
+(defun vm-mm-layout-id (e) (aref e 2))
+(defun vm-mm-layout-description (e) (aref e 3))
+(defun vm-mm-layout-disposition (e) (aref e 4))
+(defun vm-mm-layout-header-start (e) (aref e 5))
+(defun vm-mm-layout-body-start (e) (aref e 6))
+(defun vm-mm-layout-body-end (e) (aref e 7))
+(defun vm-mm-layout-parts (e) (aref e 8))
+(defun vm-mm-layout-cache (e) (aref e 9))
+
+(defun vm-set-mm-layout-cache (e c) (aset e 8 c))
+
+(defun vm-mm-layout (m)
+ (or (vm-mime-layout-of m)
+ (progn (vm-set-mime-layout-of
+ m
+ (condition-case data
+ (vm-mime-parse-entity m)
+ (vm-mime-error (apply 'message (cdr data)))))
+ (vm-mime-layout-of m))))
+
+(defun vm-mm-encoded-header (m)
+ (or (vm-mime-encoded-header-flag-of m)
+ (progn (setq m (vm-real-message-of m))
+ (vm-set-mime-encoded-header-flag-of
+ m
+ (save-excursion
+ (set-buffer (vm-buffer-of m))
+ (save-excursion
+ (save-restriction
+ (widen)
+ (goto-char (vm-headers-of m))
+ (or (re-search-forward vm-mime-encoded-word-regexp
+ (vm-text-of m) t)
+ 'none)))))
+ (vm-mime-encoded-header-flag-of m))))
+
+(defun vm-mime-Q-decode-region (start end)
+ (let ((buffer-read-only nil))
+ (subst-char-in-region start end ?_ (string-to-char " ") t)
+ (vm-mime-qp-decode-region start end)))
+
+(fset 'vm-mime-B-decode-region 'vm-mime-base64-decode-region)
+
+(defun vm-mime-Q-encode-region (start end)
+ (let ((buffer-read-only nil))
+ (subst-char-in-region start end (string-to-char " ") ?_ t)
+ (vm-mime-qp-encode-region start end)))
+
+(fset 'vm-mime-B-encode-region 'vm-mime-base64-encode-region)
+
+(defun vm-mime-Q-decode-string (string)
+ (vm-with-string-as-region string 'vm-mime-Q-decode-region))
+
+(defun vm-mime-B-decode-string (string)
+ (vm-with-string-as-region string 'vm-mime-B-decode-region))
+
+(defun vm-mime-Q-encode-string (string)
+ (vm-with-string-as-region string 'vm-mime-Q-encode-region))
+
+(defun vm-mime-B-encode-string (string)
+ (vm-with-string-as-region string 'vm-mime-B-encode-region))
+
+(defun vm-mime-crlf-to-lf-region (start end)
+ (let ((buffer-read-only nil))
+ (save-excursion
+ (save-restriction
+ (narrow-to-region start end)
+ (goto-char start)
+ (while (search-forward "\r\n" nil t)
+ (delete-char -2)
+ (insert "\n"))))))
+
+(defun vm-mime-lf-to-crlf-region (start end)
+ (let ((buffer-read-only nil))
+ (save-excursion
+ (save-restriction
+ (narrow-to-region start end)
+ (goto-char start)
+ (while (search-forward "\n" nil t)
+ (delete-char -1)
+ (insert "\r\n"))))))
+
+(defun vm-mime-charset-decode-region (charset start end)
+ (let ((buffer-read-only nil)
+ (cell (vm-mime-charset-internally-displayable-p charset))
+ (opoint (point)))
+ (cond ((and cell (vm-xemacs-mule-p) (eq (device-type) 'x))
+ (decode-coding-region start end (car cell))))
+ ;; In XEmacs 20.0 beta93 decode-coding-region moves point.
+ (goto-char opoint)))
+
+(defun vm-mime-transfer-decode-region (layout start end)
+ (let ((case-fold-search t) (crlf nil))
+ (cond ((string-match "^base64$" (vm-mm-layout-encoding layout))
+ (cond ((vm-mime-types-match "text"
+ (car (vm-mm-layout-type layout)))
+ (setq crlf t))
+ ((vm-mime-types-match "message"
+ (car (vm-mm-layout-type layout)))
+ (setq crlf t)))
+ (vm-mime-base64-decode-region start end crlf))
+ ((string-match "^quoted-printable$"
+ (vm-mm-layout-encoding layout))
+ (vm-mime-qp-decode-region start end)))))
+
+(defun vm-mime-base64-decode-region (start end &optional crlf)
+ (vm-unsaved-message "Decoding base64...")
+ (let ((work-buffer nil)
+ (done nil)
+ (counter 0)
+ (bits 0)
+ (lim 0) inputpos
+ (non-data-chars (concat "^=" vm-mime-base64-alphabet)))
+ (unwind-protect
+ (save-excursion
+ (setq work-buffer (generate-new-buffer " *vm-work*"))
+ (buffer-disable-undo work-buffer)
+ (if vm-mime-base64-decoder-program
+ (let* ((binary-process-output t) ; any text already has CRLFs
+ (status (apply 'vm-run-command-on-region
+ start end work-buffer
+ vm-mime-base64-decoder-program
+ vm-mime-base64-decoder-switches)))
+ (if (not (eq status t))
+ (vm-mime-error "%s" (cdr status))))
+ (goto-char start)
+ (skip-chars-forward non-data-chars end)
+ (while (not done)
+ (setq inputpos (point))
+ (cond
+ ((> (skip-chars-forward vm-mime-base64-alphabet end) 0)
+ (setq lim (point))
+ (while (< inputpos lim)
+ (setq bits (+ bits
+ (aref vm-mime-base64-alphabet-decoding-vector
+ (char-after inputpos))))
+ (vm-increment counter)
+ (vm-increment inputpos)
+ (cond ((= counter 4)
+ (vm-insert-char (lsh bits -16) 1 nil work-buffer)
+ (vm-insert-char (logand (lsh bits -8) 255) 1 nil
+ work-buffer)
+ (vm-insert-char (logand bits 255) 1 nil work-buffer)
+ (setq bits 0 counter 0))
+ (t (setq bits (lsh bits 6)))))))
+ (cond
+ ((= (point) end)
+ (if (not (zerop counter))
+ (vm-mime-error "at least %d bits missing at end of base64 encoding"
+ (* (- 4 counter) 6)))
+ (setq done t))
+ ((= (char-after (point)) 61) ; 61 is ASCII equals
+ (setq done t)
+ (cond ((= counter 1)
+ (vm-mime-error "at least 2 bits missing at end of base64 encoding"))
+ ((= counter 2)
+ (vm-insert-char (lsh bits -10) 1 nil work-buffer))
+ ((= counter 3)
+ (vm-insert-char (lsh bits -16) 1 nil work-buffer)
+ (vm-insert-char (logand (lsh bits -8) 255)
+ 1 nil work-buffer))
+ ((= counter 0) t)))
+ (t (skip-chars-forward non-data-chars end)))))
+ (and crlf
+ (save-excursion
+ (set-buffer work-buffer)
+ (vm-mime-crlf-to-lf-region (point-min) (point-max))))
+ (or (markerp end) (setq end (vm-marker end)))
+ (goto-char start)
+ (insert-buffer-substring work-buffer)
+ (delete-region (point) end))
+ (and work-buffer (kill-buffer work-buffer))))
+ (vm-unsaved-message "Decoding base64... done"))
+
+(defun vm-mime-base64-encode-region (start end &optional crlf)
+ (vm-unsaved-message "Encoding base64...")
+ (let ((work-buffer nil)
+ (counter 0)
+ (cols 0)
+ (bits 0)
+ (alphabet vm-mime-base64-alphabet)
+ inputpos)
+ (unwind-protect
+ (save-excursion
+ (setq work-buffer (generate-new-buffer " *vm-work*"))
+ (buffer-disable-undo work-buffer)
+ (if crlf
+ (progn
+ (or (markerp end) (setq end (vm-marker end)))
+ (vm-mime-lf-to-crlf-region start end)))
+ (if vm-mime-base64-encoder-program
+ (let ((status (apply 'vm-run-command-on-region
+ start end work-buffer
+ vm-mime-base64-encoder-program
+ vm-mime-base64-encoder-switches)))
+ (if (not (eq status t))
+ (vm-mime-error "%s" (cdr status))))
+ (setq inputpos start)
+ (while (< inputpos end)
+ (setq bits (+ bits (char-after inputpos)))
+ (vm-increment counter)
+ (cond ((= counter 3)
+ (vm-insert-char (aref alphabet (lsh bits -18)) 1 nil
+ work-buffer)
+ (vm-insert-char (aref alphabet (logand (lsh bits -12) 63))
+ 1 nil work-buffer)
+ (vm-insert-char (aref alphabet (logand (lsh bits -6) 63))
+ 1 nil work-buffer)
+ (vm-insert-char (aref alphabet (logand bits 63)) 1 nil
+ work-buffer)
+ (setq cols (+ cols 4))
+ (cond ((= cols 72)
+ (vm-insert-char ?\n 1 nil work-buffer)
+ (setq cols 0)))
+ (setq bits 0 counter 0))
+ (t (setq bits (lsh bits 8))))
+ (vm-increment inputpos))
+ ;; write out any remaining bits with appropriate padding
+ (if (= counter 0)
+ nil
+ (setq bits (lsh bits (- 16 (* 8 counter))))
+ (vm-insert-char (aref alphabet (lsh bits -18)) 1 nil
+ work-buffer)
+ (vm-insert-char (aref alphabet (logand (lsh bits -12) 63))
+ 1 nil work-buffer)
+ (if (= counter 1)
+ (vm-insert-char ?= 2 nil work-buffer)
+ (vm-insert-char (aref alphabet (logand (lsh bits -6) 63))
+ 1 nil work-buffer)
+ (vm-insert-char ?= 1 nil work-buffer)))
+ (if (> cols 0)
+ (vm-insert-char ?\n 1 nil work-buffer)))
+ (or (markerp end) (setq end (vm-marker end)))
+ (goto-char start)
+ (insert-buffer-substring work-buffer)
+ (delete-region (point) end))
+ (and work-buffer (kill-buffer work-buffer))))
+ (vm-unsaved-message "Encoding base64... done"))
+
+(defun vm-mime-qp-decode-region (start end)
+ (vm-unsaved-message "Decoding quoted-printable...")
+ (let ((work-buffer nil)
+ (buf (current-buffer))
+ (case-fold-search nil)
+ (hex-digit-alist '((?0 . 0) (?1 . 1) (?2 . 2) (?3 . 3)
+ (?4 . 4) (?5 . 5) (?6 . 6) (?7 . 7)
+ (?8 . 8) (?9 . 9) (?A . 10) (?B . 11)
+ (?C . 12) (?D . 13) (?E . 14) (?F . 15)))
+ inputpos stop-point copy-point)
+ (unwind-protect
+ (save-excursion
+ (setq work-buffer (generate-new-buffer " *vm-work*"))
+ (buffer-disable-undo work-buffer)
+ (goto-char start)
+ (setq inputpos start)
+ (while (< inputpos end)
+ (skip-chars-forward "^=\n" end)
+ (setq stop-point (point))
+ (cond ((looking-at "\n")
+ ;; spaces or tabs before a hard line break must be ignored
+ (skip-chars-backward " \t")
+ (setq copy-point (point))
+ (goto-char stop-point))
+ (t (setq copy-point stop-point)))
+ (save-excursion
+ (set-buffer work-buffer)
+ (insert-buffer-substring buf inputpos copy-point))
+ (cond ((= (point) end) t)
+ ((looking-at "\n")
+ (vm-insert-char ?\n 1 nil work-buffer)
+ (forward-char))
+ (t ;; looking at =
+ (forward-char)
+ (cond ((looking-at "[0-9A-F][0-9A-F]")
+ (vm-insert-char (+ (* (cdr (assq (char-after (point))
+ hex-digit-alist))
+ 16)
+ (cdr (assq (char-after
+ (1+ (point)))
+ hex-digit-alist)))
+ 1 nil work-buffer)
+ (forward-char 2))
+ ((looking-at "\n") ; soft line break
+ (forward-char))
+ ((looking-at "\r")
+ ;; assume the user's goatfucking
+ ;; delivery software didn't convert
+ ;; from Internet's CRLF newline
+ ;; convention to the local LF
+ ;; convention.
+ (forward-char))
+ ((looking-at "[ \t]")
+ ;; garbage added in transit
+ (skip-chars-forward " \t" end))
+ (t (vm-mime-error "something other than line break or hex digits after = in quoted-printable encoding")))))
+ (setq inputpos (point)))
+ (or (markerp end) (setq end (vm-marker end)))
+ (goto-char start)
+ (insert-buffer-substring work-buffer)
+ (delete-region (point) end))
+ (and work-buffer (kill-buffer work-buffer))))
+ (vm-unsaved-message "Decoding quoted-printable... done"))
+
+(defun vm-mime-qp-encode-region (start end)
+ (vm-unsaved-message "Encoding quoted-printable...")
+ (let ((work-buffer nil)
+ (buf (current-buffer))
+ (cols 0)
+ (hex-digit-alist '((?0 . 0) (?1 . 1) (?2 . 2) (?3 . 3)
+ (?4 . 4) (?5 . 5) (?6 . 6) (?7 . 7)
+ (?8 . 8) (?9 . 9) (?A . 10) (?B . 11)
+ (?C . 12) (?D . 13) (?E . 14) (?F . 15)))
+ char inputpos)
+ (unwind-protect
+ (save-excursion
+ (setq work-buffer (generate-new-buffer " *vm-work*"))
+ (buffer-disable-undo work-buffer)
+ (setq inputpos start)
+ (while (< inputpos end)
+ (setq char (char-after inputpos))
+ (cond ((= char ?\n)
+ (vm-insert-char char 1 nil work-buffer)
+ (setq cols 0))
+ ((and (= char 32) (not (= ?\n (char-after (1+ inputpos)))))
+ (vm-insert-char char 1 nil work-buffer)
+ (vm-increment cols))
+ ((or (< char 33) (> char 126) (= char 61))
+ (vm-insert-char ?= 1 nil work-buffer)
+ (vm-insert-char (car (rassq (lsh char -4) hex-digit-alist))
+ 1 nil work-buffer)
+ (vm-insert-char (car (rassq (logand char 15)
+ hex-digit-alist))
+ 1 nil work-buffer)
+ (setq cols (+ cols 3)))
+ (t (vm-insert-char char 1 nil work-buffer)
+ (vm-increment cols)))
+ (cond ((> cols 70)
+ (vm-insert-char ?= 1 nil work-buffer)
+ (vm-insert-char ?\n 1 nil work-buffer)
+ (setq cols 0)))
+ (vm-increment inputpos))
+ (or (markerp end) (setq end (vm-marker end)))
+ (goto-char start)
+ (insert-buffer-substring work-buffer)
+ (delete-region (point) end))
+ (and work-buffer (kill-buffer work-buffer))))
+ (vm-unsaved-message "Encoding quoted-printable... done"))
+
+(defun vm-decode-mime-message-headers (m)
+ (let ((case-fold-search t)
+ (buffer-read-only nil)
+ charset encoding match-start match-end start end)
+ (save-excursion
+ (goto-char (vm-headers-of m))
+ (while (re-search-forward vm-mime-encoded-word-regexp (vm-text-of m) t)
+ (setq match-start (match-beginning 0)
+ match-end (match-end 0)
+ charset (match-string 1)
+ encoding (match-string 2)
+ start (match-beginning 3)
+ end (vm-marker (match-end 3)))
+ ;; don't change anything if we can't display the
+ ;; character set properly.
+ (if (not (vm-mime-charset-internally-displayable-p charset))
+ nil
+ (delete-region end match-end)
+ (cond ((string-match "B" encoding)
+ (vm-mime-B-decode-region start end))
+ ((string-match "Q" encoding)
+ (vm-mime-Q-decode-region start end))
+ (t (vm-mime-error "unknown encoded word encoding, %s"
+ encoding)))
+ (vm-mime-charset-decode-region charset start end)
+ (delete-region match-start start))))))
+
+(defun vm-decode-mime-encoded-words ()
+ (let ((case-fold-search t)
+ (buffer-read-only nil)
+ charset encoding match-start match-end start end)
+ (save-excursion
+ (goto-char (point-min))
+ (while (re-search-forward vm-mime-encoded-word-regexp nil t)
+ (setq match-start (match-beginning 0)
+ match-end (match-end 0)
+ charset (match-string 1)
+ encoding (match-string 2)
+ start (match-beginning 3)
+ end (vm-marker (match-end 3)))
+ ;; don't change anything if we can't display the
+ ;; character set properly.
+ (if (not (vm-mime-charset-internally-displayable-p charset))
+ nil
+ (delete-region end match-end)
+ (cond ((string-match "B" encoding)
+ (vm-mime-B-decode-region start end))
+ ((string-match "Q" encoding)
+ (vm-mime-Q-decode-region start end))
+ (t (vm-mime-error "unknown encoded word encoding, %s"
+ encoding)))
+ (vm-mime-charset-decode-region charset start end)
+ (delete-region match-start start))))))
+
+(defun vm-decode-mime-encoded-words-maybe (string)
+ (if (and vm-display-using-mime
+ (string-match vm-mime-encoded-word-regexp string))
+ (vm-with-string-as-temp-buffer string 'vm-decode-mime-encoded-words)
+ string ))
+
+(defun vm-mime-parse-content-header (string &optional sepchar)
+ (if (null string)
+ ()
+ (let ((work-buffer nil))
+ (save-excursion
+ (unwind-protect
+ (let ((list nil)
+ (nonspecials "^\"\\( \t\n\r\f")
+ start s char sp+sepchar)
+ (if sepchar
+ (setq nonspecials (concat nonspecials (list sepchar))
+ sp+sepchar (concat "\t\f\n\r " (list sepchar))))
+ (setq work-buffer (generate-new-buffer "*vm-work*"))
+ (buffer-disable-undo work-buffer)
+ (set-buffer work-buffer)
+ (insert string)
+ (goto-char (point-min))
+ (skip-chars-forward "\t\f\n\r ")
+ (setq start (point))
+ (while (not (eobp))
+ (skip-chars-forward nonspecials)
+ (setq char (following-char))
+ (cond ((looking-at "[ \t\n\r\f]")
+ (delete-char 1))
+ ((= char ?\\)
+ (forward-char 1)
+ (if (not (eobp))
+ (forward-char 1)))
+ ((and sepchar (= char sepchar))
+ (setq s (buffer-substring start (point)))
+ (if (or (null (string-match "^[\t\f\n\r ]+$" s))
+ (not (string= s "")))
+ (setq list (cons s list)))
+ (skip-chars-forward sp+sepchar)
+ (setq start (point)))
+ ((looking-at " \t\n\r\f")
+ (skip-chars-forward " \t\n\r\f"))
+ ((= char ?\")
+ (delete-char 1)
+ (cond ((= (char-after (point)) ?\")
+ (delete-char 1))
+ ((re-search-forward "[^\\]\"" nil 0)
+ (delete-char -1))))
+ ((= char ?\()
+ (let ((parens 1)
+ (pos (point)))
+ (forward-char 1)
+ (while (and (not (eobp)) (not (zerop parens)))
+ (re-search-forward "[()]" nil 0)
+ (cond ((or (eobp)
+ (= (char-after (- (point) 2)) ?\\)))
+ ((= (preceding-char) ?\()
+ (setq parens (1+ parens)))
+ (t
+ (setq parens (1- parens)))))
+ (delete-region pos (point))))))
+ (setq s (buffer-substring start (point)))
+ (if (and (null (string-match "^[\t\f\n\r ]+$" s))
+ (not (string= s "")))
+ (setq list (cons s list)))
+ (nreverse list))
+ (and work-buffer (kill-buffer work-buffer)))))))
+
+(defun vm-mime-get-header-contents (header-name-regexp)
+ (let ((contents nil)
+ regexp)
+ (setq regexp (concat "^\\(" header-name-regexp "\\)\\|\\(^$\\)"))
+ (save-excursion
+ (let ((case-fold-search t))
+ (if (and (re-search-forward regexp nil t)
+ (match-beginning 1)
+ (progn (goto-char (match-beginning 0))
+ (vm-match-header)))
+ (vm-matched-header-contents)
+ nil )))))
+
+(defun vm-mime-parse-entity (&optional m default-type default-encoding)
+ (let ((case-fold-search t) version type encoding id description
+ disposition boundary boundary-regexp start
+ multipart-list c-t c-t-e done p returnval)
+ (and m (vm-unsaved-message "Parsing MIME message..."))
+ (prog1
+ (catch 'return-value
+ (save-excursion
+ (if m
+ (progn
+ (setq m (vm-real-message-of m))
+ (set-buffer (vm-buffer-of m))))
+ (save-excursion
+ (save-restriction
+ (if m
+ (progn
+ (setq version (vm-get-header-contents m "MIME-Version:")
+ version (car (vm-mime-parse-content-header version))
+ type (vm-get-header-contents m "Content-Type:")
+ type (vm-mime-parse-content-header type ?\;)
+ encoding (or (vm-get-header-contents
+ m "Content-Transfer-Encoding:")
+ "7bit")
+ encoding (car (vm-mime-parse-content-header encoding))
+ id (vm-get-header-contents m "Content-ID:")
+ id (car (vm-mime-parse-content-header id))
+ description (vm-get-header-contents
+ m "Content-Description:")
+ description (and description
+ (if (string-match "^[ \t\n]$"
+ description)
+ nil
+ description))
+ disposition (vm-get-header-contents
+ m "Content-Disposition:")
+ disposition (and disposition
+ (vm-mime-parse-content-header
+ disposition ?\;)))
+ (widen)
+ (narrow-to-region (vm-headers-of m) (vm-text-end-of m)))
+ (goto-char (point-min))
+ (setq type (vm-mime-get-header-contents "Content-Type:")
+ type (or (vm-mime-parse-content-header type ?\;)
+ default-type)
+ encoding (or (vm-mime-get-header-contents
+ "Content-Transfer-Encoding:")
+ default-encoding)
+ encoding (car (vm-mime-parse-content-header encoding))
+ id (vm-mime-get-header-contents "Content-ID:")
+ id (car (vm-mime-parse-content-header id))
+ description (vm-mime-get-header-contents
+ "Content-Description:")
+ description (and description (if (string-match "^[ \t\n]+$"
+ description)
+ nil
+ description))
+ disposition (vm-mime-get-header-contents
+ "Content-Disposition:")
+ disposition (and disposition
+ (vm-mime-parse-content-header
+ disposition ?\;))))
+ (cond ((null m) t)
+ ((null version)
+ (throw 'return-value 'none))
+ ((string= version "1.0") t)
+ (t (vm-mime-error "Unsupported MIME version: %s" version)))
+ (cond ((and m (null type))
+ (throw 'return-value
+ (vector '("text/plain" "charset=us-ascii")
+ encoding id description disposition
+ (vm-headers-of m)
+ (vm-text-of m)
+ (vm-text-end-of m)
+ nil nil nil )))
+ ((null type)
+ (goto-char (point-min))
+ (or (re-search-forward "^\n\\|\n\\'" nil t)
+ (vm-mime-error "MIME part missing header/body separator line"))
+ (vector default-type encoding id description disposition
+ (vm-marker (point-min))
+ (vm-marker (point))
+ (vm-marker (point-max))
+ nil nil nil ))
+ ((null (string-match "[^/ ]+/[^/ ]+" (car type)))
+ (vm-mime-error "Malformed MIME content type: %s" (car type)))
+ ((and (string-match "^multipart/\\|^message/" (car type))
+ (null (string-match "^\\(7bit\\|8bit\\|binary\\)$"
+ encoding)))
+ (vm-mime-error "Opaque transfer encoding used with multipart or message type: %s, %s" (car type) encoding))
+ ((and (string-match "^message/partial$" (car type))
+ (null (string-match "^7bit$" encoding)))
+ (vm-mime-error "Non-7BIT transfer encoding used with message/partial message: %s" encoding))
+ ((string-match "^multipart/digest" (car type))
+ (setq c-t '("message/rfc822")
+ c-t-e "7bit"))
+ ((string-match "^multipart/" (car type))
+ (setq c-t '("text/plain" "charset=us-ascii")
+ c-t-e "7bit")) ; below
+ ((string-match "^message/rfc822" (car type))
+ (setq c-t '("text/plain" "charset=us-ascii")
+ c-t-e "7bit")
+ (goto-char (point-min))
+ (or (re-search-forward "^\n\\|\n\\'" nil t)
+ (vm-mime-error "MIME part missing header/body separator line"))
+ (throw 'return-value
+ (vector type encoding id description disposition
+ (vm-marker (point-min))
+ (vm-marker (point))
+ (vm-marker (point-max))
+ (list
+ (save-restriction
+ (narrow-to-region (point) (point-max))
+ (vm-mime-parse-entity nil c-t c-t-e)))
+ nil )))
+ (t
+ (goto-char (point-min))
+ (or (re-search-forward "^\n\\|\n\\'" nil t)
+ (vm-mime-error "MIME part missing header/body separator line"))
+ (throw 'return-value
+ (vector type encoding id description disposition
+ (vm-marker (point-min))
+ (vm-marker (point))
+ (vm-marker (point-max))
+ nil nil ))))
+ (setq p (cdr type)
+ boundary nil)
+ (while p
+ (if (string-match "^boundary=" (car p))
+ (setq boundary (car (vm-parse (car p) "=\\(.+\\)"))
+ p nil)
+ (setq p (cdr p))))
+ (or boundary
+ (vm-mime-error
+ "Boundary parameter missing in %s type specification"
+ (car type)))
+ (setq boundary-regexp (regexp-quote boundary)
+ boundary-regexp (concat "^--" boundary-regexp "\\(--\\)?\n"))
+ (goto-char (point-min))
+ (setq start nil
+ multipart-list nil
+ done nil)
+ (while (and (not done) (re-search-forward boundary-regexp nil t))
+ (cond ((null start)
+ (setq start (match-end 0)))
+ (t
+ (and (match-beginning 1)
+ (setq done t))
+ (save-excursion
+ (save-restriction
+ (narrow-to-region start (1- (match-beginning 0)))
+ (setq start (match-end 0))
+ (setq multipart-list
+ (cons (vm-mime-parse-entity-safe nil c-t c-t-e)
+ multipart-list)))))))
+ (if (not done)
+ (vm-mime-error "final %s boundary missing" boundary))
+ (goto-char (point-min))
+ (or (re-search-forward "^\n\\|\n\\'" nil t)
+ (vm-mime-error "MIME part missing header/body separator line"))
+ (vector type encoding id description disposition
+ (vm-marker (point-min))
+ (vm-marker (point))
+ (vm-marker (point-max))
+ (nreverse multipart-list)
+ nil )))))
+ (and m (vm-unsaved-message "Parsing MIME message... done"))
+ )))
+
+(defun vm-mime-parse-entity-safe (&optional m c-t c-t-e)
+ (or c-t (setq c-t '("text/plain" "charset=us-ascii")))
+ ;; don't let subpart parse errors make the whole parse fail. use default
+ ;; type if the parse fails.
+ (condition-case error-data
+ (vm-mime-parse-entity nil c-t c-t-e)
+ (vm-mime-error
+ (let ((header (if m
+ (vm-headers-of m)
+ (vm-marker (point-min))))
+ (text (if m
+ (vm-text-of m)
+ (save-excursion
+ (re-search-forward "^\n\\|\n\\'"
+ nil 0)
+ (vm-marker (point)))))
+ (text-end (if m
+ (vm-text-end-of m)
+ (vm-marker (point-max)))))
+ (vector c-t
+ (vm-determine-proper-content-transfer-encoding text text-end)
+ nil
+ ;; cram the error message into the description slot
+ (car error-data)
+ ;; mark as an attachment to improve the chance that the user
+ ;; will see the description.
+ '("attachment")
+ header
+ text
+ text-end)))))
+
+(defun vm-mime-get-xxx-parameter (layout name param-list)
+ (let ((match-end (1+ (length name)))
+ (name-regexp (concat (regexp-quote name) "="))
+ (case-fold-search t)
+ (done nil))
+ (while (and param-list (not done))
+ (if (and (string-match name-regexp (car param-list))
+ (= (match-end 0) match-end))
+ (setq done t)
+ (setq param-list (cdr param-list))))
+ (and (car param-list) (car (vm-parse (car param-list) "=\\(.*\\)")))))
+
+(defun vm-mime-get-parameter (layout name)
+ (vm-mime-get-xxx-parameter layout name (cdr (vm-mm-layout-type layout))))
+
+(defun vm-mime-get-disposition-parameter (layout name)
+ (vm-mime-get-xxx-parameter layout name
+ (cdr (vm-mm-layout-disposition layout))))
+
+(defun vm-mime-insert-mime-body (layout)
+ (vm-insert-region-from-buffer (marker-buffer (vm-mm-layout-body-start layout))
+ (vm-mm-layout-body-start layout)
+ (vm-mm-layout-body-end layout)))
+
+(defun vm-mime-insert-mime-headers (layout)
+ (vm-insert-region-from-buffer (marker-buffer (vm-mm-layout-body-start layout))
+ (vm-mm-layout-header-start layout)
+ (vm-mm-layout-body-start layout))
+ (if (and (not (bobp)) (char-equal (char-after (1- (point))) ?\n))
+ (delete-char -1)))
+
+(defun vm-make-presentation-copy (m)
+ (let ((mail-buffer (current-buffer))
+ b mm
+ (real-m (vm-real-message-of m))
+ (modified (buffer-modified-p)))
+ (cond ((or (null vm-presentation-buffer-handle)
+ (null (buffer-name vm-presentation-buffer-handle)))
+ (setq b (generate-new-buffer (concat (buffer-name)
+ " Presentation")))
+ (save-excursion
+ (set-buffer b)
+ (if (fboundp 'buffer-disable-undo)
+ (buffer-disable-undo (current-buffer))
+ ;; obfuscation to make the v19 compiler not whine
+ ;; about obsolete functions.
+ (let ((x 'buffer-flush-undo))
+ (funcall x (current-buffer))))
+ (setq mode-name "VM Presentation"
+ major-mode 'vm-presentation-mode
+ vm-message-pointer (list nil)
+ vm-mail-buffer mail-buffer
+ mode-popup-menu (and vm-use-menus vm-popup-menu-on-mouse-3
+ (vm-menu-support-possible-p)
+ (vm-menu-mode-menu))
+ buffer-read-only t
+ mode-line-format vm-mode-line-format)
+ (cond ((vm-fsfemacs-19-p)
+ ;; need to do this outside the let because
+ ;; loading disp-table initializes
+ ;; standard-display-table.
+ (require 'disp-table)
+ (let* ((standard-display-table
+ (copy-sequence standard-display-table)))
+ (standard-display-european t)
+ (setq buffer-display-table standard-display-table))))
+ (if vm-frame-per-folder
+ (vm-set-hooks-for-frame-deletion))
+ (use-local-map vm-mode-map)
+ (and (vm-toolbar-support-possible-p) vm-use-toolbar
+ (vm-toolbar-install-toolbar))
+ (and (vm-menu-support-possible-p)
+ (vm-menu-install-menus)))
+ (setq vm-presentation-buffer-handle b)))
+ ;; do this (widen) outside save-restricton intentionally. since
+ ;; we're using the presentation buffer, make the folder
+ ;; buffer unpretty so maybe the user gets the idea.
+ ;;(widen)
+ ;; widening isn't enough. users just complain that "I'm
+ ;; looking at the wrong message." Curse their miserable hides.
+ ;; bury the buffer so they'll have a tough time finding it.
+ (bury-buffer (current-buffer))
+ (setq b vm-presentation-buffer-handle
+ vm-presentation-buffer vm-presentation-buffer-handle
+ vm-mime-decoded nil)
+ (save-excursion
+ (set-buffer (vm-buffer-of real-m))
+ (save-restriction
+ (widen)
+ ;; must reference this now so that headers will be in
+ ;; their final position before the message is copied.
+ ;; otherwise the vheader offset computed below will be
+ ;; wrong.
+ (vm-vheaders-of real-m)
+ (set-buffer b)
+ (widen)
+ (let ((buffer-read-only nil)
+ (modified (buffer-modified-p)))
+ (unwind-protect
+ (progn
+ (erase-buffer)
+ (insert-buffer-substring (vm-buffer-of real-m)
+ (vm-start-of real-m)
+ (vm-end-of real-m)))
+ (set-buffer-modified-p modified)))
+ (setq mm (copy-sequence m))
+ (vm-set-location-data-of mm (vm-copy (vm-location-data-of m)))
+ (set-marker (vm-start-of mm) (point-min))
+ (set-marker (vm-headers-of mm) (+ (vm-start-of mm)
+ (- (vm-headers-of real-m)
+ (vm-start-of real-m))))
+ (set-marker (vm-vheaders-of mm) (+ (vm-start-of mm)
+ (- (vm-vheaders-of real-m)
+ (vm-start-of real-m))))
+ (set-marker (vm-text-of mm) (+ (vm-start-of mm)
+ (- (vm-text-of real-m)
+ (vm-start-of real-m))))
+ (set-marker (vm-text-end-of mm) (+ (vm-start-of mm)
+ (- (vm-text-end-of real-m)
+ (vm-start-of real-m))))
+ (set-marker (vm-end-of mm) (+ (vm-start-of mm)
+ (- (vm-end-of real-m)
+ (vm-start-of real-m))))
+ (setcar vm-message-pointer mm)))))
+
+(fset 'vm-presentation-mode 'vm-mode)
+(put 'vm-presentation-mode 'mode-class 'special)
+
+(defun vm-determine-proper-charset (beg end)
+ (save-excursion
+ (save-restriction
+ (narrow-to-region beg end)
+ (catch 'done
+ (goto-char (point-min))
+ (and (re-search-forward "[^\000-\177]" nil t)
+ (throw 'done (or vm-mime-8bit-composition-charset "iso-8859-1")))
+ (throw 'done "us-ascii")))))
+
+(defun vm-determine-proper-content-transfer-encoding (beg end)
+ (save-excursion
+ (save-restriction
+ (narrow-to-region beg end)
+ (catch 'done
+ (goto-char (point-min))
+ (and (re-search-forward "[\000\015]" nil t)
+ (throw 'done "binary"))
+
+ (let ((toolong nil) bol)
+ (goto-char (point-min))
+ (setq bol (point))
+ (while (and (not (eobp)) (not toolong))
+ (forward-line)
+ (setq toolong (> (- (point) bol) 998)
+ bol (point)))
+ (and toolong (throw 'done "binary")))
+
+ (goto-char (point-min))
+ (and (re-search-forward "[\200-\377]" nil t)
+ (throw 'done "8bit"))
+
+ "7bit"))))
+
+(defun vm-mime-types-match (type type/subtype)
+ (let ((case-fold-search t))
+ (cond ((string-match "/" type)
+ (if (and (string-match (regexp-quote type) type/subtype)
+ (equal 0 (match-beginning 0))
+ (equal (length type/subtype) (match-end 0)))
+ t
+ nil ))
+ ((and (string-match (regexp-quote type) type/subtype)
+ (equal 0 (match-beginning 0))
+ (equal (save-match-data
+ (string-match "/" type/subtype (match-end 0)))
+ (match-end 0)))))))
+
+(defvar native-sound-only-on-console)
+
+(defun vm-mime-can-display-internal (layout)
+ (let ((type (car (vm-mm-layout-type layout))))
+ (cond ((vm-mime-types-match "image/jpeg" type)
+ (and (vm-xemacs-p)
+ (featurep 'jpeg)
+ (eq (device-type) 'x)))
+ ((vm-mime-types-match "image/gif" type)
+ (and (vm-xemacs-p)
+ (featurep 'gif)
+ (eq (device-type) 'x)))
+ ((vm-mime-types-match "image/png" type)
+ (and (vm-xemacs-p)
+ (featurep 'png)
+ (eq (device-type) 'x)))
+ ((vm-mime-types-match "image/tiff" type)
+ (and (vm-xemacs-p)
+ (featurep 'tiff)
+ (eq (device-type) 'x)))
+ ((vm-mime-types-match "audio/basic" type)
+ (and (vm-xemacs-p)
+ (or (featurep 'native-sound)
+ (featurep 'nas-sound))
+ (or (device-sound-enabled-p)
+ (and (featurep 'native-sound)
+ (not native-sound-only-on-console)
+ (eq (device-type) 'x)))))
+ ((vm-mime-types-match "multipart" type) t)
+ ((vm-mime-types-match "message/external-body" type) nil)
+ ((vm-mime-types-match "message" type) t)
+ ((or (vm-mime-types-match "text/plain" type)
+ (vm-mime-types-match "text/enriched" type))
+ (let ((charset (or (vm-mime-get-parameter layout "charset")
+ "us-ascii")))
+ (vm-mime-charset-internally-displayable-p charset)))
+ ((vm-mime-types-match "text/html" type)
+ (condition-case ()
+ (progn (require 'w3)
+ (fboundp 'w3-region))
+ (error nil)))
+ (t nil))))
+
+(defun vm-mime-can-convert (type)
+ (let ((alist vm-mime-type-converter-alist)
+ ;; fake layout. make it the wrong length so an error will
+ ;; be signaled if vm-mime-can-display-internal ever asks
+ ;; for one of the other fields
+ (fake-layout (make-vector 1 (list nil)))
+ (done nil))
+ (while (and alist (not done))
+ (cond ((and (vm-mime-types-match (car (car alist)) type)
+ (or (progn
+ (setcar (aref fake-layout 0) (nth 1 (car alist)))
+ (vm-mime-can-display-internal fake-layout))
+ (vm-mime-find-external-viewer (nth 1 (car alist)))))
+ (setq done t))
+ (t (setq alist (cdr alist)))))
+ (and alist (car alist))))
+
+(defun vm-mime-convert-undisplayable-layout (layout)
+ (let ((ooo (vm-mime-can-convert (car (vm-mm-layout-type layout)))))
+ (vm-unsaved-message "Converting %s to %s..."
+ (car (vm-mm-layout-type layout))
+ (nth 1 ooo))
+ (save-excursion
+ (set-buffer (generate-new-buffer " *mime object*"))
+ (setq vm-message-garbage-alist
+ (cons (cons (current-buffer) 'kill-buffer)
+ vm-message-garbage-alist))
+ (vm-mime-insert-mime-body layout)
+ (vm-mime-transfer-decode-region layout (point-min) (point-max))
+ (call-process-region (point-min) (point-max) shell-file-name
+ t t nil shell-command-switch (nth 2 ooo))
+ (goto-char (point-min))
+ (insert "Content-Type: " (nth 1 ooo) "\n")
+ (insert "Content-Transfer-Encoding: binary\n\n")
+ (set-buffer-modified-p nil)
+ (vm-unsaved-message "Converting %s to %s... done"
+ (car (vm-mm-layout-type layout))
+ (nth 1 ooo))
+ (vector (list (nth 1 ooo))
+ "binary"
+ (vm-mm-layout-id layout)
+ (vm-mm-layout-description layout)
+ (vm-mm-layout-disposition layout)
+ (vm-marker (point-min))
+ (vm-marker (point))
+ (vm-marker (point-max))
+ nil
+ nil ))))
+
+(defun vm-mime-should-display-button (layout dont-honor-content-disposition)
+ (if (and vm-honor-mime-content-disposition
+ (not dont-honor-content-disposition)
+ (vm-mm-layout-disposition layout))
+ (let ((case-fold-search t))
+ (string-match "^attachment$" (car (vm-mm-layout-disposition layout))))
+ (let ((i-list vm-auto-displayed-mime-content-types)
+ (type (car (vm-mm-layout-type layout)))
+ (matched nil))
+ (if (eq i-list t)
+ nil
+ (while (and i-list (not matched))
+ (if (vm-mime-types-match (car i-list) type)
+ (setq matched t)
+ (setq i-list (cdr i-list))))
+ (not matched) ))))
+
+(defun vm-mime-should-display-internal (layout dont-honor-content-disposition)
+ (if (and vm-honor-mime-content-disposition
+ (not dont-honor-content-disposition)
+ (vm-mm-layout-disposition layout))
+ (let ((case-fold-search t))
+ (string-match "^inline$" (car (vm-mm-layout-disposition layout))))
+ (let ((i-list vm-mime-internal-content-types)
+ (type (car (vm-mm-layout-type layout)))
+ (matched nil))
+ (if (eq i-list t)
+ t
+ (while (and i-list (not matched))
+ (if (vm-mime-types-match (car i-list) type)
+ (setq matched t)
+ (setq i-list (cdr i-list))))
+ matched ))))
+
+(defun vm-mime-find-external-viewer (type)
+ (let ((e-alist vm-mime-external-content-types-alist)
+ (matched nil))
+ (while (and e-alist (not matched))
+ (if (and (vm-mime-types-match (car (car e-alist)) type)
+ (cdr (car e-alist)))
+ (setq matched (cdr (car e-alist)))
+ (setq e-alist (cdr e-alist))))
+ matched ))
+(fset 'vm-mime-should-display-external 'vm-mime-find-external-viewer)
+
+(defun vm-mime-delete-button-maybe (extent)
+ (let ((buffer-read-only))
+ ;; if displayed MIME object should replace the button
+ ;; remove the button now.
+ (cond ((vm-extent-property extent 'vm-mime-disposable)
+ (delete-region (vm-extent-start-position extent)
+ (vm-extent-end-position extent))
+ (vm-detach-extent extent)))))
+
+(defun vm-decode-mime-message ()
+ "Decode the MIME objects in the current message.
+
+The first time this command is run on a message, decoding is done.
+The second time, buttons for all the objects are displayed instead.
+The third time, the raw, undecoded data is displayed.
+
+If decoding, the decoded objects might be displayed immediately, or
+buttons might be displayed that you need to activate to view the
+object. See the documentation for the variables
+
+ vm-auto-displayed-mime-content-types
+ vm-mime-internal-content-types
+ vm-mime-external-content-types-alist
+
+to see how to control whether you see buttons or objects.
+
+If the variable vm-mime-display-function is set, then its value
+is called as a function with no arguments, and none of the
+actions mentioned in the preceding paragraphs are done. At the
+time of the call, the current buffer will be the presentation
+buffer for the folder and a copy of the current message will be
+in the buffer. The function is expected to make the message
+`MIME presentable' to the user in whatever manner it sees fit."
+ (interactive)
+ (vm-follow-summary-cursor)
+ (vm-select-folder-buffer)
+ (vm-check-for-killed-summary)
+ (vm-check-for-killed-presentation)
+ (vm-error-if-folder-empty)
+ (if (and (not vm-display-using-mime)
+ (null vm-mime-display-function))
+ (error "MIME display disabled, set vm-display-using-mime non-nil to enable."))
+ (if vm-mime-display-function
+ (progn
+ (vm-make-presentation-copy (car vm-message-pointer))
+ (set-buffer vm-presentation-buffer)
+ (funcall vm-mime-display-function))
+ (if vm-mime-decoded
+ (if (eq vm-mime-decoded 'decoded)
+ (let ((vm-preview-read-messages nil)
+ (vm-auto-decode-mime-messages t)
+ (vm-honor-mime-content-disposition nil)
+ (vm-auto-displayed-mime-content-types '("multipart")))
+ (setq vm-mime-decoded nil)
+ (intern (buffer-name) vm-buffers-needing-display-update)
+ (save-excursion
+ (vm-preview-current-message))
+ (setq vm-mime-decoded 'buttons))
+ (let ((vm-preview-read-messages nil)
+ (vm-auto-decode-mime-messages nil))
+ (intern (buffer-name) vm-buffers-needing-display-update)
+ (vm-preview-current-message)))
+ (let ((layout (vm-mm-layout (car vm-message-pointer)))
+ (m (car vm-message-pointer)))
+ (vm-unsaved-message "Decoding MIME message...")
+ (cond ((stringp layout)
+ (error "Invalid MIME message: %s" layout)))
+ (if (vm-mime-plain-message-p m)
+ (error "Message needs no decoding."))
+ (or vm-presentation-buffer
+ ;; maybe user killed it
+ (error "No presentation buffer."))
+ (set-buffer vm-presentation-buffer)
+ (setq m (car vm-message-pointer))
+ (vm-save-restriction
+ (widen)
+ (goto-char (vm-text-of m))
+ (let ((buffer-read-only nil)
+ (modified (buffer-modified-p)))
+ (unwind-protect
+ (save-excursion
+ (and (not (eq (vm-mm-encoded-header m) 'none))
+ (vm-decode-mime-message-headers m))
+ (if (vectorp layout)
+ (progn
+ (vm-decode-mime-layout layout)
+ (delete-region (point) (point-max)))))
+ (set-buffer-modified-p modified))))
+ (save-excursion (set-buffer vm-mail-buffer)
+ (setq vm-mime-decoded 'decoded))
+ (intern (buffer-name vm-mail-buffer) vm-buffers-needing-display-update)
+ (vm-update-summary-and-mode-line)
+ (vm-unsaved-message "Decoding MIME message... done"))))
+ (vm-display nil nil '(vm-decode-mime-message)
+ '(vm-decode-mime-message reading-message)))
+
+(defun vm-decode-mime-layout (layout &optional dont-honor-c-d)
+ (let ((modified (buffer-modified-p)) type type-no-subtype (extent nil))
+ (unwind-protect
+ (progn
+ (if (not (vectorp layout))
+ (progn
+ (setq extent layout
+ layout (vm-extent-property extent 'vm-mime-layout))
+ (goto-char (vm-extent-start-position extent))))
+ (setq type (downcase (car (vm-mm-layout-type layout)))
+ type-no-subtype (car (vm-parse type "\\([^/]+\\)")))
+ (cond ((and (vm-mime-should-display-button layout dont-honor-c-d)
+ (or (condition-case nil
+ (funcall (intern
+ (concat "vm-mime-display-button-"
+ type))
+ layout)
+ (void-function nil))
+ (condition-case nil
+ (funcall (intern
+ (concat "vm-mime-display-button-"
+ type-no-subtype))
+ layout)
+ (void-function nil)))))
+ ((and (vm-mime-should-display-internal layout dont-honor-c-d)
+ (condition-case nil
+ (funcall (intern
+ (concat "vm-mime-display-internal-"
+ type))
+ layout)
+ (void-function nil))))
+ ((vm-mime-types-match "multipart" type)
+ (or (condition-case nil
+ (funcall (intern
+ (concat "vm-mime-display-internal-"
+ type))
+ layout)
+ (void-function nil))
+ (vm-mime-display-internal-multipart/mixed layout)))
+ ((and (vm-mime-should-display-external type)
+ (vm-mime-display-external-generic layout))
+ (and extent (vm-set-extent-property
+ extent 'vm-mime-disposable nil)))
+ ((vm-mime-can-convert type)
+ (vm-decode-mime-layout
+ (vm-mime-convert-undisplayable-layout layout)))
+ ((and (or (vm-mime-types-match "message" type)
+ (vm-mime-types-match "text" type))
+ ;; display unmatched message and text types as
+ ;; text/plain.
+ (vm-mime-display-internal-text/plain layout)))
+ (t (vm-mime-display-internal-application/octet-stream
+ (or extent layout))))
+ (and extent (vm-mime-delete-button-maybe extent)))
+ (set-buffer-modified-p modified)))
+ t )
+
+(defun vm-mime-display-button-text (layout)
+ (vm-mime-display-button-xxxx layout t))
+
+(defun vm-mime-display-internal-text/html (layout)
+ (let ((buffer-read-only nil)
+ (work-buffer nil))
+ (vm-unsaved-message "Inlining text/html, be patient...")
+ ;; w3-region is not as tame as we would like.
+ ;; make sure the yoke is firmly attached.
+ (unwind-protect
+ (progn
+ (save-excursion
+ (set-buffer (setq work-buffer
+ (generate-new-buffer " *workbuf*")))
+ (vm-mime-insert-mime-body layout)
+ (vm-mime-transfer-decode-region layout (point-min) (point-max))
+ (save-excursion
+ (save-window-excursion
+ (w3-region (point-min) (point-max)))))
+ (insert-buffer-substring work-buffer))
+ (and work-buffer (kill-buffer work-buffer)))
+ (vm-unsaved-message "Inlining text/html... done")
+ t ))
+
+(defun vm-mime-display-internal-text/plain (layout &optional ignore-urls)
+ (let ((start (point)) end
+ (buffer-read-only nil)
+ (charset (or (vm-mime-get-parameter layout "charset") "us-ascii")))
+ (if (not (vm-mime-charset-internally-displayable-p charset))
+ nil
+ (vm-mime-insert-mime-body layout)
+ (setq end (point-marker))
+ (vm-mime-transfer-decode-region layout start end)
+ (vm-mime-charset-decode-region charset start end)
+ (or ignore-urls (vm-energize-urls-in-message-region start end))
+ t )))
+
+(defun vm-mime-display-internal-text/enriched (layout)
+ (require 'enriched)
+ (let ((start (point)) end
+ (buffer-read-only nil)
+ (enriched-verbose t))
+ (vm-unsaved-message "Decoding text/enriched, be patient...")
+ (vm-mime-insert-mime-body layout)
+ (setq end (point-marker))
+ (vm-mime-transfer-decode-region layout start end)
+ ;; enriched-decode expects a couple of headers at the top of
+ ;; the region and will remove anything that looks like a
+ ;; header. Put a header section here for it to eat so it
+ ;; won't eat message text instead.
+ (goto-char start)
+ (insert "Comment: You should not see this header\n\n")
+ (enriched-decode start end)
+ (vm-energize-urls-in-message-region start end)
+ (goto-char end)
+ (vm-unsaved-message "Decoding text/enriched... done")
+ t ))
+
+(defun vm-mime-display-external-generic (layout)
+ (let ((program-list (vm-mime-find-external-viewer
+ (car (vm-mm-layout-type layout))))
+ (process (nth 0 (vm-mm-layout-cache layout)))
+ (tempfile (nth 1 (vm-mm-layout-cache layout)))
+ (buffer-read-only nil)
+ (start (point))
+ end)
+ (if (and (processp process) (eq (process-status process) 'run))
+ nil
+ (cond ((or (null tempfile) (null (file-exists-p tempfile)))
+ (vm-mime-insert-mime-body layout)
+ (setq end (point-marker))
+ (vm-mime-transfer-decode-region layout start end)
+ (setq tempfile (vm-make-tempfile-name))
+ ;; Tell DOS/Windows NT whether the file is binary
+ (setq buffer-file-type (not (vm-mime-text-type-p layout)))
+ (write-region start end tempfile nil 0)
+ (delete-region start end)
+ (save-excursion
+ (vm-select-folder-buffer)
+ (setq vm-folder-garbage-alist
+ (cons (cons tempfile 'delete-file)
+ vm-folder-garbage-alist)))))
+ (vm-unsaved-message "Launching %s..." (mapconcat 'identity
+ program-list
+ " "))
+ (setq process
+ (apply 'start-process
+ (format "view %25s" (vm-mime-layout-description layout))
+ nil (append program-list (list tempfile))))
+ (process-kill-without-query process t)
+ (vm-unsaved-message "Launching %s... done" (mapconcat 'identity
+ program-list
+ " "))
+ (save-excursion
+ (vm-select-folder-buffer)
+ (setq vm-message-garbage-alist
+ (cons (cons process 'delete-process)
+ vm-message-garbage-alist)))
+ (vm-set-mm-layout-cache layout (list process tempfile))))
+ t )
+
+(defun vm-mime-display-internal-application/octet-stream (layout)
+ (if (vectorp layout)
+ (let ((buffer-read-only nil)
+ (description (vm-mm-layout-description layout)))
+ (vm-mime-insert-button
+ (format "%-35s [%s to save to a file]"
+ (vm-mime-layout-description layout)
+ (if (vm-mouse-support-possible-p)
+ "Click mouse-2"
+ "Press RETURN"))
+ (function
+ (lambda (layout)
+ (save-excursion
+ (vm-mime-display-internal-application/octet-stream layout))))
+ layout nil))
+ (goto-char (vm-extent-start-position layout))
+ (setq layout (vm-extent-property layout 'vm-mime-layout))
+ ;; support old "name" paramater for application/octet-stream
+ ;; but don't override the "filename" parameter extracted from
+ ;; Content-Disposition, if any.
+ (let ((default-filename
+ (if (vm-mime-get-disposition-parameter layout "filename")
+ nil
+ (vm-mime-get-parameter layout "name"))))
+ (vm-mime-send-body-to-file layout default-filename)))
+ t )
+(fset 'vm-mime-display-button-application
+ 'vm-mime-display-internal-application/octet-stream)
+
+(defun vm-mime-display-button-image (layout)
+ (vm-mime-display-button-xxxx layout t))
+
+(defun vm-mime-display-button-audio (layout)
+ (vm-mime-display-button-xxxx layout nil))
+
+(defun vm-mime-display-button-video (layout)
+ (vm-mime-display-button-xxxx layout t))
+
+(defun vm-mime-display-button-message (layout)
+ (vm-mime-display-button-xxxx layout t))
+
+(defun vm-mime-display-button-multipart (layout)
+ (vm-mime-display-button-xxxx layout t))
+
+(defun vm-mime-display-internal-multipart/mixed (layout)
+ (let ((part-list (vm-mm-layout-parts layout)))
+ (while part-list
+ (vm-decode-mime-layout (car part-list))
+ (setq part-list (cdr part-list)))
+ t ))
+
+(defun vm-mime-display-internal-multipart/alternative (layout)
+ (let (best-layout)
+ (cond ((eq vm-mime-alternative-select-method 'best)
+ (let ((done nil)
+ (best nil)
+ part-list type)
+ (setq part-list (vm-mm-layout-parts layout)
+ part-list (nreverse (copy-sequence part-list)))
+ (while (and part-list (not done))
+ (setq type (car (vm-mm-layout-type (car part-list))))
+ (if (or (vm-mime-can-display-internal (car part-list))
+ (vm-mime-find-external-viewer type))
+ (setq best (car part-list)
+ done t)
+ (setq part-list (cdr part-list))))
+ (setq best-layout (or best (car (vm-mm-layout-parts layout))))))
+ ((eq vm-mime-alternative-select-method 'best-internal)
+ (let ((done nil)
+ (best nil)
+ (second-best nil)
+ part-list type)
+ (setq part-list (vm-mm-layout-parts layout)
+ part-list (nreverse (copy-sequence part-list)))
+ (while (and part-list (not done))
+ (setq type (car (vm-mm-layout-type (car part-list))))
+ (cond ((vm-mime-can-display-internal (car part-list))
+ (setq best (car part-list)
+ done t))
+ ((and (null second-best)
+ (vm-mime-find-external-viewer type))
+ (setq second-best (car part-list))))
+ (setq part-list (cdr part-list)))
+ (setq best-layout (or best second-best
+ (car (vm-mm-layout-parts layout)))))))
+ (vm-decode-mime-layout best-layout)))
+
+(defun vm-mime-display-button-multipart/parallel (layout)
+ (vm-mime-insert-button
+ (format "%-35s [%s to display in parallel]"
+ (vm-mime-layout-description layout)
+ (if (vm-mouse-support-possible-p)
+ "Click mouse-2"
+ "Press RETURN"))
+ (function
+ (lambda (layout)
+ (save-excursion
+ (let ((vm-auto-displayed-mime-content-types t))
+ (vm-decode-mime-layout layout t)))))
+ layout t))
+
+(fset 'vm-mime-display-internal-multipart/parallel
+ 'vm-mime-display-internal-multipart/mixed)
+
+(defun vm-mime-display-internal-multipart/digest (layout)
+ (if (vectorp layout)
+ (let ((buffer-read-only nil))
+ (vm-mime-insert-button
+ (format "%-35s [%s to display]"
+ (vm-mime-layout-description layout)
+ (if (vm-mouse-support-possible-p)
+ "Click mouse-2"
+ "Press RETURN"))
+ (function
+ (lambda (layout)
+ (save-excursion
+ (vm-mime-display-internal-multipart/digest layout))))
+ layout nil))
+ (goto-char (vm-extent-start-position layout))
+ (setq layout (vm-extent-property layout 'vm-mime-layout))
+ (set-buffer (generate-new-buffer (format "digest from %s/%s"
+ (buffer-name vm-mail-buffer)
+ (vm-number-of
+ (car vm-message-pointer)))))
+ (setq vm-folder-type vm-default-folder-type)
+ (vm-mime-burst-layout layout nil)
+ (vm-save-buffer-excursion
+ (vm-goto-new-folder-frame-maybe 'folder)
+ (vm-mode))
+ ;; temp buffer, don't offer to save it.
+ (setq buffer-offer-save nil)
+ (vm-display nil nil (list this-command) '(vm-mode startup)))
+ t )
+(fset 'vm-mime-display-button-multipart/digest
+ 'vm-mime-display-internal-multipart/digest)
+
+(defun vm-mime-display-internal-message/rfc822 (layout)
+ (if (vectorp layout)
+ (let ((buffer-read-only nil))
+ (vm-mime-insert-button
+ (format "%-35s [%s to display]"
+ (vm-mime-layout-description layout)
+ (if (vm-mouse-support-possible-p)
+ "Click mouse-2"
+ "Press RETURN"))
+ (function
+ (lambda (layout)
+ (save-excursion
+ (vm-mime-display-internal-message/rfc822 layout))))
+ layout nil))
+ (goto-char (vm-extent-start-position layout))
+ (setq layout (vm-extent-property layout 'vm-mime-layout))
+ (set-buffer (generate-new-buffer
+ (format "message from %s/%s"
+ (buffer-name vm-mail-buffer)
+ (vm-number-of
+ (car vm-message-pointer)))))
+ (setq vm-folder-type vm-default-folder-type)
+ (vm-mime-burst-layout layout nil)
+ (set-buffer-modified-p nil)
+ (vm-save-buffer-excursion
+ (vm-goto-new-folder-frame-maybe 'folder)
+ (vm-mode))
+ ;; temp buffer, don't offer to save it.
+ (setq buffer-offer-save nil)
+ (vm-display (or vm-presentation-buffer (current-buffer)) t
+ (list this-command) '(vm-mode startup)))
+ t )
+(fset 'vm-mime-display-button-message/rfc822
+ 'vm-mime-display-internal-message/rfc822)
+
+(defun vm-mime-display-internal-message/partial (layout)
+ (if (vectorp layout)
+ (let ((buffer-read-only nil)
+ (number (vm-mime-get-parameter layout "number"))
+ (total (vm-mime-get-parameter layout "total")))
+ (vm-mime-insert-button
+ (format "%-35s [%s to attempt assembly]"
+ (concat (vm-mime-layout-description layout)
+ (and number (concat ", part " number))
+ (and number total (concat " of " total)))
+ (if (vm-mouse-support-possible-p)
+ "Click mouse-2"
+ "Press RETURN"))
+ (function
+ (lambda (layout)
+ (save-excursion
+ (vm-mime-display-internal-message/partial layout))))
+ layout nil))
+ (vm-unsaved-message "Assembling message...")
+ (let ((parts nil)
+ (missing nil)
+ (work-buffer nil)
+ extent id o number total m i prev part-header-pos
+ p-id p-number p-total p-list)
+ (setq extent layout
+ layout (vm-extent-property extent 'vm-mime-layout)
+ id (vm-mime-get-parameter layout "id"))
+ (if (null id)
+ (vm-mime-error
+ "message/partial message missing id parameter"))
+ (save-excursion
+ (set-buffer (marker-buffer (vm-mm-layout-body-start layout)))
+ (save-excursion
+ (save-restriction
+ (widen)
+ (goto-char (point-min))
+ (while (and (search-forward id nil t)
+ (setq m (vm-message-at-point)))
+ (setq o (vm-mm-layout m))
+ (if (not (vectorp o))
+ nil
+ (setq p-list (vm-mime-find-message/partials o id))
+ (while p-list
+ (setq p-id (vm-mime-get-parameter (car p-list) "id"))
+ (setq p-total (vm-mime-get-parameter (car p-list) "total"))
+ (if (null p-total)
+ nil
+ (setq p-total (string-to-int p-total))
+ (if (< p-total 1)
+ (vm-mime-error "message/partial specified part total < 0, %d" p-total))
+ (if total
+ (if (not (= total p-total))
+ (vm-mime-error "message/partial speificed total differs between parts, (%d != %d)" p-total total))
+ (setq total p-total)))
+ (setq p-number (vm-mime-get-parameter (car p-list) "number"))
+ (if (null p-number)
+ (vm-mime-error
+ "message/partial message missing number parameter"))
+ (setq p-number (string-to-int p-number))
+ (if (< p-number 1)
+ (vm-mime-error "message/partial part number < 0, %d"
+ p-number))
+ (if (and total (> p-number total))
+ (vm-mime-error "message/partial part number greater than expected number of parts, (%d > %d)" p-number total))
+ (setq parts (cons (list p-number (car p-list)) parts)
+ p-list (cdr p-list))))
+ (goto-char (vm-mm-layout-body-end o))))))
+ (if (null total)
+ (vm-mime-error "total number of parts not specified in any message/partial part"))
+ (setq parts (sort parts
+ (function
+ (lambda (p q)
+ (< (car p)
+ (car q))))))
+ (setq i 0
+ p-list parts)
+ (while p-list
+ (cond ((< i (car (car p-list)))
+ (vm-increment i)
+ (cond ((not (= i (car (car p-list))))
+ (setq missing (cons i missing)))
+ (t (setq prev p-list
+ p-list (cdr p-list)))))
+ (t
+ ;; remove duplicate part
+ (setcdr prev (cdr p-list))
+ (setq p-list (cdr p-list)))))
+ (while (< i total)
+ (vm-increment i)
+ (setq missing (cons i missing)))
+ (if missing
+ (vm-mime-error "part%s %s%s missing"
+ (if (cdr missing) "s" "")
+ (mapconcat
+ (function identity)
+ (nreverse (mapcar 'int-to-string
+ (or (cdr missing) missing)))
+ ", ")
+ (if (cdr missing)
+ (concat " and " (car missing))
+ "")))
+ (set-buffer (generate-new-buffer "assembled message"))
+ (setq vm-folder-type vm-default-folder-type)
+ (vm-mime-insert-mime-headers (car (cdr (car parts))))
+ (goto-char (point-min))
+ (vm-reorder-message-headers
+ nil nil
+"\\(Encrypted\\|Content-\\|MIME-Version\\|Message-ID\\|Subject\\|X-VM-\\|Status\\)")
+ (goto-char (point-max))
+ (setq part-header-pos (point))
+ (while parts
+ (vm-mime-insert-mime-body (car (cdr (car parts))))
+ (setq parts (cdr parts)))
+ (goto-char part-header-pos)
+ (vm-reorder-message-headers
+ nil '("Subject" "MIME-Version" "Content-" "Message-ID" "Encrypted") nil)
+ (vm-munge-message-separators vm-folder-type (point-min) (point-max))
+ (goto-char (point-min))
+ (insert (vm-leading-message-separator))
+ (goto-char (point-max))
+ (insert (vm-trailing-message-separator))
+ (set-buffer-modified-p nil)
+ (vm-unsaved-message "Assembling message... done")
+ (vm-save-buffer-excursion
+ (vm-goto-new-folder-frame-maybe 'folder)
+ (vm-mode))
+ ;; temp buffer, don't offer to save it.
+ (setq buffer-offer-save nil)
+ (vm-display (or vm-presentation-buffer (current-buffer)) t
+ (list this-command) '(vm-mode startup)))
+ t ))
+(fset 'vm-mime-display-button-message/partial
+ 'vm-mime-display-internal-message/partial)
+
+(defun vm-mime-display-internal-image-xxxx (layout feature name)
+ (if (and (vm-xemacs-p)
+ (featurep feature)
+ (eq (device-type) 'x))
+ (let ((start (point)) end tempfile g e
+ (buffer-read-only nil))
+ (if (vm-mm-layout-cache layout)
+ (setq g (vm-mm-layout-cache layout))
+ (vm-mime-insert-mime-body layout)
+ (setq end (point-marker))
+ (vm-mime-transfer-decode-region layout start end)
+ (setq tempfile (vm-make-tempfile-name))
+ (write-region start end tempfile nil 0)
+ (vm-unsaved-message "Creating %s glyph..." name)
+ (setq g (make-glyph
+ (list (vector feature ':file tempfile)
+ (vector 'string
+ ':data
+ (format "[Unknown %s image encoding]\n"
+ name)))))
+ (vm-unsaved-message "")
+ (vm-set-mm-layout-cache layout g)
+ (save-excursion
+ (vm-select-folder-buffer)
+ (setq vm-folder-garbage-alist
+ (cons (cons tempfile 'delete-file)
+ vm-folder-garbage-alist)))
+ (delete-region start end))
+ (if (not (bolp))
+ (insert-char ?\n 2)
+ (insert-char ?\n 1))
+ (setq e (vm-make-extent (1- (point)) (point)))
+ (vm-set-extent-property e 'begin-glyph g)
+ t )))
+
+(defun vm-mime-display-internal-image/gif (layout)
+ (vm-mime-display-internal-image-xxxx layout 'gif "GIF"))
+
+(defun vm-mime-display-internal-image/jpeg (layout)
+ (vm-mime-display-internal-image-xxxx layout 'jpeg "JPEG"))
+
+(defun vm-mime-display-internal-image/png (layout)
+ (vm-mime-display-internal-image-xxxx layout 'png "PNG"))
+
+(defun vm-mime-display-internal-image/tiff (layout)
+ (vm-mime-display-internal-image-xxxx layout 'tiff "TIFF"))
+
+(defun vm-mime-display-internal-audio/basic (layout)
+ (if (and (vm-xemacs-p)
+ (or (featurep 'native-sound)
+ (featurep 'nas-sound))
+ (or (device-sound-enabled-p)
+ (and (featurep 'native-sound)
+ (not native-sound-only-on-console)
+ (eq (device-type) 'x))))
+ (let ((start (point)) end tempfile
+ (buffer-read-only nil))
+ (if (vm-mm-layout-cache layout)
+ (setq tempfile (vm-mm-layout-cache layout))
+ (vm-mime-insert-mime-body layout)
+ (setq end (point-marker))
+ (vm-mime-transfer-decode-region layout start end)
+ (setq tempfile (vm-make-tempfile-name))
+ (write-region start end tempfile nil 0)
+ (vm-set-mm-layout-cache layout tempfile)
+ (save-excursion
+ (vm-select-folder-buffer)
+ (setq vm-folder-garbage-alist
+ (cons (cons tempfile 'delete-file)
+ vm-folder-garbage-alist)))
+ (delete-region start end))
+ (start-itimer "audioplayer"
+ (list 'lambda nil (list 'play-sound-file tempfile))
+ 1)
+ t )
+ nil ))
+
+(defun vm-mime-display-button-xxxx (layout disposable)
+ (let ((description (vm-mime-layout-description layout)))
+ (vm-mime-insert-button
+ (format "%-35s [%s to display]"
+ description
+ (if (vm-mouse-support-possible-p) "Click mouse-2" "Press RETURN"))
+ (function
+ (lambda (layout)
+ (save-excursion
+ (let ((vm-auto-displayed-mime-content-types t))
+ (vm-decode-mime-layout layout t)))))
+ layout disposable)
+ t ))
+
+(defun vm-mime-run-display-function-at-point (&optional function)
+ (interactive)
+ ;; save excursion to keep point from moving. its motion would
+ ;; drag window point along, to a place arbitrarily far from
+ ;; where it was when the user triggered the button.
+ (save-excursion
+ (cond ((vm-fsfemacs-19-p)
+ (let (o-list o (found nil))
+ (setq o-list (overlays-at (point)))
+ (while (and o-list (not found))
+ (cond ((overlay-get (car o-list) 'vm-mime-layout)
+ (setq found t)
+ (funcall (or function (overlay-get (car o-list)
+ 'vm-mime-function))
+ (car o-list))))
+ (setq o-list (cdr o-list)))))
+ ((vm-xemacs-p)
+ (let ((e (extent-at (point) nil 'vm-mime-layout)))
+ (funcall (or function (extent-property e 'vm-mime-function))
+ e))))))
+
+;; for the karking compiler
+(defvar vm-menu-mime-dispose-menu)
+
+(defun vm-mime-insert-button (caption action layout disposable)
+ (let ((start (point)) e
+ (keymap (make-sparse-keymap))
+ (buffer-read-only nil))
+ (if (fboundp 'set-keymap-parents)
+ (set-keymap-parents keymap (list (current-local-map)))
+ (setq keymap (nconc keymap (current-local-map))))
+ (define-key keymap "\r" 'vm-mime-run-display-function-at-point)
+ (if (and (vm-mouse-xemacs-mouse-p) vm-popup-menu-on-mouse-3)
+ (define-key keymap 'button3 'vm-menu-popup-mime-dispose-menu))
+ (if (not (bolp))
+ (insert "\n"))
+ (insert caption "\n")
+ ;; we MUST have the five arg make-overlay. overlays must
+ ;; advance when text is inserted at their start position or
+ ;; inline text and graphics will seep into the button
+ ;; overlay and then be removed when the button is removed.
+ (if (fboundp 'make-overlay)
+ (setq e (make-overlay start (point) nil t nil))
+ (setq e (make-extent start (point)))
+ (set-extent-property e 'start-open t)
+ (set-extent-property e 'end-open t))
+ ;; for emacs
+ (vm-set-extent-property e 'mouse-face 'highlight)
+ (vm-set-extent-property e 'local-map keymap)
+ ;; for xemacs
+ (vm-set-extent-property e 'highlight t)
+ (vm-set-extent-property e 'keymap keymap)
+ (vm-set-extent-property e 'balloon-help 'vm-mouse-3-help)
+ ;; for all
+ (vm-set-extent-property e 'vm-mime-disposable disposable)
+ (vm-set-extent-property e 'face vm-mime-button-face)
+ (vm-set-extent-property e 'vm-mime-layout layout)
+ (vm-set-extent-property e 'vm-mime-function action)))
+
+(defun vm-mime-send-body-to-file (layout &optional default-filename)
+ (if (not (vectorp layout))
+ (setq layout (vm-extent-property layout 'vm-mime-layout)))
+ (or default-filename
+ (setq default-filename
+ (vm-mime-get-disposition-parameter layout "filename")))
+ (and default-filename
+ (setq default-filename (file-name-nondirectory default-filename)))
+ (let ((work-buffer nil)
+ ;; evade the XEmacs dialox box, yeccch.
+ (should-use-dialog-box nil)
+ file)
+ (setq file
+ (read-file-name
+ (if default-filename
+ (format "Write MIME body to file (default %s): "
+ default-filename)
+ "Write MIME body to file: ")
+ vm-mime-attachment-save-directory default-filename)
+ file (expand-file-name file vm-mime-attachment-save-directory))
+ (save-excursion
+ (unwind-protect
+ (progn
+ (setq work-buffer (generate-new-buffer " *vm-work*"))
+ (buffer-disable-undo work-buffer)
+ (set-buffer work-buffer)
+ ;; Tell DOS/Windows NT whether the file is binary
+ (setq buffer-file-type (not (vm-mime-text-type-p layout)))
+ (vm-mime-insert-mime-body layout)
+ (vm-mime-transfer-decode-region layout (point-min) (point-max))
+ (or (not (file-exists-p file))
+ (y-or-n-p "File exists, overwrite? ")
+ (error "Aborted"))
+ (write-region (point-min) (point-max) file nil nil))
+ (and work-buffer (kill-buffer work-buffer))))))
+
+(defun vm-mime-pipe-body-to-command (layout &optional discard-output)
+ (if (not (vectorp layout))
+ (setq layout (vm-extent-property layout 'vm-mime-layout)))
+ (let ((command-line (read-string "Pipe to command: "))
+ (output-buffer (if discard-output
+ 0
+ (get-buffer-create "*Shell Command Output*")))
+ (work-buffer nil))
+ (save-excursion
+ (if (bufferp output-buffer)
+ (progn
+ (set-buffer output-buffer)
+ (erase-buffer)))
+ (unwind-protect
+ (progn
+ (setq work-buffer (generate-new-buffer " *vm-work*"))
+ (buffer-disable-undo work-buffer)
+ (set-buffer work-buffer)
+ (vm-mime-insert-mime-body layout)
+ (vm-mime-transfer-decode-region layout (point-min) (point-max))
+ (let ((pop-up-windows (and pop-up-windows
+ (eq vm-mutable-windows t)))
+ ;; Tell DOS/Windows NT whether the input is binary
+ (binary-process-input (not (vm-mime-text-type-p layout))))
+ (call-process-region (point-min) (point-max)
+ (or shell-file-name "sh")
+ nil output-buffer nil
+ shell-command-switch command-line)))
+ (and work-buffer (kill-buffer work-buffer)))
+ (if (bufferp output-buffer)
+ (progn
+ (set-buffer output-buffer)
+ (if (not (zerop (buffer-size)))
+ (vm-display output-buffer t (list this-command)
+ '(vm-pipe-message-to-command))
+ (vm-display nil nil (list this-command)
+ '(vm-pipe-message-to-command)))))))
+ t )
+
+(defun vm-mime-pipe-body-to-command-discard-output (layout)
+ (vm-mime-pipe-body-to-command layout t))
+
+(defun vm-mime-scrub-description (string)
+ (let ((work-buffer nil))
+ (save-excursion
+ (unwind-protect
+ (progn
+ (setq work-buffer (generate-new-buffer " *vm-work*"))
+ (buffer-disable-undo work-buffer)
+ (set-buffer work-buffer)
+ (insert string)
+ (while (re-search-forward "[ \t\n]+" nil t)
+ (replace-match " "))
+ (buffer-string))
+ (and work-buffer (kill-buffer work-buffer))))))
+
+(defun vm-mime-layout-description (layout)
+ (if (vm-mm-layout-description layout)
+ (vm-mime-scrub-description (vm-mm-layout-description layout))
+ (let ((type (car (vm-mm-layout-type layout)))
+ name)
+ (cond ((vm-mime-types-match "multipart/digest" type)
+ (let ((n (length (vm-mm-layout-parts layout))))
+ (format "digest (%d message%s)" n (if (= n 1) "" "s"))))
+ ((vm-mime-types-match "multipart/alternative" type)
+ "multipart alternative")
+ ((vm-mime-types-match "multipart" type)
+ (let ((n (length (vm-mm-layout-parts layout))))
+ (format "multipart message (%d part%s)" n (if (= n 1) "" "s"))))
+ ((vm-mime-types-match "text/plain" type)
+ (format "plain text%s"
+ (let ((charset (vm-mime-get-parameter layout "charset")))
+ (if charset
+ (concat ", " charset)
+ ""))))
+ ((vm-mime-types-match "text/enriched" type)
+ "enriched text")
+ ((vm-mime-types-match "text/html" type)
+ "HTML")
+ ((vm-mime-types-match "image/gif" type)
+ "GIF image")
+ ((vm-mime-types-match "image/jpeg" type)
+ "JPEG image")
+ ((and (vm-mime-types-match "application/octet-stream" type)
+ (setq name (vm-mime-get-parameter layout "name"))
+ (save-match-data (not (string-match "^[ \t]*$" name))))
+ name)
+ (t type)))))
+
+(defun vm-mime-layout-contains-type (layout type)
+ (if (vm-mime-types-match type (car (vm-mm-layout-type layout)))
+ layout
+ (let ((p (vm-mm-layout-parts layout))
+ (result nil)
+ (done nil))
+ (while (and p (not done))
+ (if (setq result (vm-mime-layout-contains-type (car p) type))
+ (setq done t)
+ (setq p (cdr p))))
+ result )))
+
+(defun vm-mime-plain-message-p (m)
+ (save-match-data
+ (let ((o (vm-mm-layout m))
+ (case-fold-search t))
+ (and (eq (vm-mm-encoded-header m) 'none)
+ (or (not (vectorp o))
+ (and (vm-mime-types-match "text/plain"
+ (car (vm-mm-layout-type o)))
+ (string-match "^\\(us-ascii\\|iso-8859-1\\)$"
+ (or (vm-mime-get-parameter o "charset")
+ "us-ascii"))
+ (string-match "^\\(7bit\\|8bit\\|binary\\)$"
+ (vm-mm-layout-encoding o))))))))
+
+(defun vm-mime-text-type-p (layout)
+ (or (vm-mime-types-match "text" (car (vm-mm-layout-type layout)))
+ (vm-mime-types-match "message" (car (vm-mm-layout-type layout)))))
+
+(defun vm-mime-charset-internally-displayable-p (name)
+ (cond ((and (vm-xemacs-mule-p) (eq (device-type) 'x))
+ (cdr (assoc (downcase name) vm-mime-xemacs-mule-charset-alist)))
+ ((vm-xemacs-p)
+ (vm-member (downcase name) '("us-ascii" "iso-8859-1")))
+ ((vm-fsfemacs-19-p)
+ (vm-member (downcase name) '("us-ascii" "iso-8859-1")))))
+
+(defun vm-mime-find-message/partials (layout id)
+ (let ((list nil)
+ (type (vm-mm-layout-type layout)))
+ (cond ((vm-mime-types-match "multipart" (car type))
+ (let ((parts (vm-mm-layout-parts layout)) o)
+ (while parts
+ (setq o (vm-mime-find-message/partials (car parts) id))
+ (if o
+ (setq list (nconc o list)))
+ (setq parts (cdr parts)))))
+ ((vm-mime-types-match "message/partial" (car type))
+ (if (equal (vm-mime-get-parameter layout "id") id)
+ (setq list (cons layout list)))))
+ list ))
+
+(defun vm-message-at-point ()
+ (let ((mp vm-message-list)
+ (point (point))
+ (done nil))
+ (while (and mp (not done))
+ (if (and (>= point (vm-start-of (car mp)))
+ (<= point (vm-end-of (car mp))))
+ (setq done t)
+ (setq mp (cdr mp))))
+ (car mp)))
+
+(defun vm-mime-make-multipart-boundary ()
+ (let ((boundary (make-string 40 ?a))
+ (i 0))
+ (random t)
+ (while (< i (length boundary))
+ (aset boundary i (aref vm-mime-base64-alphabet
+ (% (vm-abs (lsh (random) -8))
+ (length vm-mime-base64-alphabet))))
+ (vm-increment i))
+ boundary ))
+
+(defun vm-mime-attach-file (file type &optional charset)
+ "Attach a file to a VM composition buffer to be sent along with the message.
+The file is not inserted into the buffer and MIME encoded until
+you execute vm-mail-send or vm-mail-send-and-exit. A visible tag
+indicating the existence of the attachment is placed in the
+composition buffer. You can move the attachment around or remove
+it entirely with normal text editing commands. If you remove the
+attachment tag, the attachment will not be sent.
+
+First argument, FILE, is the name of the file to attach. Second
+argument, TYPE, is the MIME Content-Type of the file. Optional
+third argument CHARSET is the character set of the attached
+document. This argument is only used for text types, and it
+is ignored for other types.
+
+When called interactively all arguments are read from the
+minibuffer.
+
+This command is for attaching files that do not have a MIME
+header section at the top. For files with MIME headers, you
+should use vm-mime-attach-mime-file to attach such a file. VM
+will extract the content type information from the headers in
+this case and not prompt you for it in the minibuffer."
+ (interactive
+ ;; protect value of last-command and this-command
+ (let ((last-command last-command)
+ (this-command this-command)
+ (charset nil)
+ file default-type type)
+ (if (null vm-send-using-mime)
+ (error "MIME attachments disabled, set vm-send-using-mime non-nil to enable."))
+ (setq file (vm-read-file-name "Attach file: " nil nil t)
+ default-type (or (vm-mime-default-type-from-filename file)
+ "application/octet-stream")
+ type (completing-read
+ (format "Content type (default %s): "
+ default-type)
+ vm-mime-type-completion-alist)
+ type (if (> (length type) 0) type default-type))
+ (if (vm-mime-types-match "text" type)
+ (setq charset (completing-read "Character set (default US-ASCII): "
+ vm-mime-charset-completion-alist)
+ charset (if (> (length charset) 0) charset)))
+ (list file type charset)))
+ (if (null vm-send-using-mime)
+ (error "MIME attachments disabled, set vm-send-using-mime non-nil to enable."))
+ (if (file-directory-p file)
+ (error "%s is a directory, cannot attach" file))
+ (if (not (file-exists-p file))
+ (error "No such file: %s" file))
+ (if (not (file-readable-p file))
+ (error "You don't have permission to read %s" file))
+ (and charset (setq charset (list (concat "charset=" charset))))
+ (vm-mime-attach-object file type charset nil))
+
+(defun vm-mime-attach-mime-file (file)
+ "Attach a MIME encoded file to a VM composition buffer to be sent
+along with the message.
+
+The file is not inserted into the buffer until you execute
+vm-mail-send or vm-mail-send-and-exit. A visible tag indicating
+the existence of the attachment is placed in the composition
+buffer. You can move the attachment around or remove it entirely
+with normal text editing commands. If you remove the attachment
+tag, the attachment will not be sent.
+
+The sole argument, FILE, is the name of the file to attach.
+When called interactively the FILE argument is read from the
+minibuffer.
+
+This command is for attaching files that have a MIME
+header section at the top. For files without MIME headers, you
+should use vm-mime-attach-file to attach such a file. VM
+will interactively query you for the file type information."
+ (interactive
+ ;; protect value of last-command and this-command
+ (let ((last-command last-command)
+ (this-command this-command)
+ file)
+ (if (null vm-send-using-mime)
+ (error "MIME attachments disabled, set vm-send-using-mime non-nil to enable."))
+ (setq file (vm-read-file-name "Attach file: " nil nil t))
+ (list file)))
+ (if (null vm-send-using-mime)
+ (error "MIME attachments disabled, set vm-send-using-mime non-nil to enable."))
+ (if (file-directory-p file)
+ (error "%s is a directory, cannot attach" file))
+ (if (not (file-exists-p file))
+ (error "No such file: %s" file))
+ (if (not (file-readable-p file))
+ (error "You don't have permission to read %s" file))
+ (vm-mime-attach-object file "MIME file" nil t))
+
+(defun vm-mime-attach-object (object type params mimed)
+ (if (not (eq major-mode 'mail-mode))
+ (error "Command must be used in a VM Mail mode buffer."))
+ (let ((start (point))
+ e tag-string)
+ (setq tag-string (format "[ATTACHMENT %s, %s]" object type))
+ (insert tag-string "\n")
+ (cond ((fboundp 'make-overlay)
+ (setq e (make-overlay start (point) nil t nil))
+ (overlay-put e 'face vm-mime-button-face))
+ ((fboundp 'make-extent)
+ (setq e (make-extent start (1- (point))))
+ (set-extent-property e 'start-open t)
+ (set-extent-property e 'face vm-mime-button-face)))
+ (vm-set-extent-property e 'duplicable t)
+;; crashes XEmacs
+;; (vm-set-extent-property e 'replicating t)
+ (vm-set-extent-property e 'vm-mime-type type)
+ (vm-set-extent-property e 'vm-mime-object object)
+ (vm-set-extent-property e 'vm-mime-params params)
+ (vm-set-extent-property e 'vm-mime-encoded mimed)))
+
+(defun vm-mime-default-type-from-filename (file)
+ (let ((alist vm-mime-attachment-auto-type-alist)
+ (case-fold-search t)
+ (done nil))
+ (while (and alist (not done))
+ (if (string-match (car (car alist)) file)
+ (setq done t)
+ (setq alist (cdr alist))))
+ (and alist (cdr (car alist)))))
+
+(defun vm-remove-mail-mode-header-separator ()
+ (save-excursion
+ (goto-char (point-min))
+ (if (re-search-forward (concat "^" mail-header-separator "$") nil t)
+ (progn
+ (delete-region (match-beginning 0) (match-end 0))
+ t )
+ nil )))
+
+(defun vm-add-mail-mode-header-separator ()
+ (save-excursion
+ (goto-char (point-min))
+ (if (re-search-forward "^$" nil t)
+ (replace-match mail-header-separator t t))))
+
+(defun vm-mime-transfer-encode-region (encoding beg end crlf)
+ (let ((case-fold-search t))
+ (cond ((string-match "^binary$" encoding)
+ (vm-mime-base64-encode-region beg end crlf)
+ (setq encoding "base64"))
+ ((string-match "^7bit$" encoding) t)
+ ((string-match "^base64$" encoding) t)
+ ((string-match "^quoted-printable$" encoding) t)
+ ;; must be 8bit
+ ((eq vm-mime-8bit-text-transfer-encoding 'quoted-printable)
+ (vm-mime-qp-encode-region beg end)
+ (setq encoding "quoted-printable"))
+ ((eq vm-mime-8bit-text-transfer-encoding 'base64)
+ (vm-mime-base64-encode-region beg end crlf)
+ (setq encoding "base64"))
+ ((eq vm-mime-8bit-text-transfer-encoding 'send) t))
+ encoding ))
+
+(defun vm-mime-transfer-encode-layout (layout)
+ (if (vm-mime-text-type-p layout)
+ (vm-mime-transfer-encode-region (vm-mm-layout-encoding layout)
+ (vm-mm-layout-body-start layout)
+ (vm-mm-layout-body-end layout)
+ t)
+ (vm-mime-transfer-encode-region (vm-mm-layout-encoding layout)
+ (vm-mm-layout-body-start layout)
+ (vm-mm-layout-body-end layout)
+ nil)))
+(defun vm-mime-encode-composition ()
+ "MIME encode the current buffer.
+Attachment tags added to the buffer with vm-mime-attach-file are expanded
+and the approriate content-type and boundary markup information is added."
+ (interactive)
+ (save-restriction
+ (widen)
+ (if (not (eq major-mode 'mail-mode))
+ (error "Command must be used in a VM Mail mode buffer."))
+ (or (null (vm-mail-mode-get-header-contents "MIME-Version:"))
+ (error "Message is already MIME encoded."))
+ (let ((8bit nil)
+ (just-one nil)
+ (boundary-positions nil)
+ already-mimed layout e e-list boundary
+ type encoding charset params object opoint-min)
+ (mail-text)
+ (setq e-list (if (fboundp 'extent-list)
+ (extent-list nil (point) (point-max))
+ (overlays-in (point) (point-max)))
+ e-list (vm-delete (function
+ (lambda (e)
+ (vm-extent-property e 'vm-mime-object)))
+ e-list t)
+ e-list (sort e-list (function
+ (lambda (e1 e2)
+ (< (vm-extent-end-position e1)
+ (vm-extent-end-position e2))))))
+ ;; If there's just one attachment and no other readable
+ ;; text in the buffer then make the message type just be
+ ;; the attachment type rather than sending a multipart
+ ;; message with one attachment
+ (setq just-one (and (= (length e-list) 1)
+ (looking-at "[ \t\n]*")
+ (= (match-end 0)
+ (vm-extent-start-position (car e-list)))
+ (save-excursion
+ (goto-char (vm-extent-end-position (car e-list)))
+ (looking-at "[ \t\n]*\\'"))))
+ (if (null e-list)
+ (progn
+ (narrow-to-region (point) (point-max))
+ (setq charset (vm-determine-proper-charset (point-min)
+ (point-max)))
+ (setq encoding (vm-determine-proper-content-transfer-encoding
+ (point-min)
+ (point-max))
+ encoding (vm-mime-transfer-encode-region encoding
+ (point-min)
+ (point-max)
+ t))
+ (widen)
+ (vm-remove-mail-mode-header-separator)
+ (goto-char (point-min))
+ (vm-reorder-message-headers
+ nil nil "\\(Content-Type:\\|Content-Transfer-Encoding\\|MIME-Version:\\)")
+ (insert "MIME-Version: 1.0\n")
+ (insert "Content-Type: text/plain; charset=" charset "\n")
+ (insert "Content-Transfer-Encoding: " encoding "\n")
+ (vm-add-mail-mode-header-separator))
+ (while e-list
+ (setq e (car e-list))
+ (if (or just-one (= (point) (vm-extent-start-position e)))
+ nil
+ (narrow-to-region (point) (vm-extent-start-position e))
+ (setq charset (vm-determine-proper-charset (point-min)
+ (point-max)))
+ (setq encoding (vm-determine-proper-content-transfer-encoding
+ (point-min)
+ (point-max))
+ encoding (vm-mime-transfer-encode-region encoding
+ (point-min)
+ (point-max)
+ t))
+ (setq boundary-positions (cons (point-marker) boundary-positions))
+ (insert "Content-Type: text/plain; charset=" charset "\n")
+ (insert "Content-Transfer-Encoding: " encoding "\n\n")
+ (widen))
+ (goto-char (vm-extent-end-position e))
+ (narrow-to-region (point) (point))
+ (setq object (vm-extent-property e 'vm-mime-object))
+ (cond ((bufferp object)
+ (insert-buffer-substring object))
+ ((stringp object)
+ (insert-file-contents-literally object)))
+ (if (setq already-mimed (vm-extent-property e 'vm-mime-encoded))
+ (setq layout (vm-mime-parse-entity
+ nil (list "text/plain" "charset=us-ascii")
+ "7bit")
+ type (car (vm-mm-layout-type layout))
+ params (cdr (vm-mm-layout-type layout)))
+ (setq type (vm-extent-property e 'vm-mime-type)
+ params (vm-extent-property e 'vm-mime-parameters)))
+ (cond ((vm-mime-types-match "text" type)
+ (setq encoding
+ (vm-determine-proper-content-transfer-encoding
+ (if already-mimed
+ (vm-mm-layout-body-start layout)
+ (point-min))
+ (point-max))
+ encoding (vm-mime-transfer-encode-region
+ encoding
+ (if already-mimed
+ (vm-mm-layout-body-start layout)
+ (point-min))
+ (point-max)
+ t))
+ (setq 8bit (or 8bit (equal encoding "8bit"))))
+ ((or (vm-mime-types-match "message/rfc822" type)
+ (vm-mime-types-match "multipart" type))
+ (setq opoint-min (point-min))
+ (if (not already-mimed)
+ (setq layout (vm-mime-parse-entity
+ nil (list "text/plain" "charset=us-ascii")
+ "7bit")))
+ ;; MIME messages of type "message" and
+ ;; "multipart" are required to have a non-opaque
+ ;; content transfer encoding. This means that
+ ;; if the user only wants to send out 7bit data,
+ ;; then any subpart that contains 8bit data must
+ ;; have an opaque (qp or base64) 8->7bit
+ ;; conversion performed on it so that the
+ ;; enclosing entity can use an non-opqaue
+ ;; encoding.
+ ;;
+ ;; message/partial requires a "7bit" encoding so
+ ;; force 8->7 conversion in that case.
+ (let ((vm-mime-8bit-text-transfer-encoding
+ (if (vm-mime-types-match "message/partial" type)
+ 'quoted-printable
+ vm-mime-8bit-text-transfer-encoding)))
+ (vm-mime-map-atomic-layouts 'vm-mime-transfer-encode-layout
+ (vm-mm-layout-parts layout)))
+ ;; now figure out a proper content trasnfer
+ ;; encoding value for the enclosing entity.
+ (re-search-forward "^\n" nil t)
+ (save-restriction
+ (narrow-to-region (point) (point-max))
+ (setq encoding
+ (vm-determine-proper-content-transfer-encoding
+ (point-min)
+ (point-max))))
+ (setq 8bit (or 8bit (equal encoding "8bit")))
+ (goto-char (point-max))
+ (widen)
+ (narrow-to-region opoint-min (point)))
+ (t
+ (vm-mime-base64-encode-region
+ (if already-mimed
+ (vm-mm-layout-body-start layout)
+ (point-min))
+ (point-max))
+ (setq encoding "base64")))
+ (if just-one
+ nil
+ (goto-char (point-min))
+ (setq boundary-positions (cons (point-marker) boundary-positions))
+ (if (not already-mimed)
+ nil
+ ;; trim headers
+ (vm-reorder-message-headers
+ nil '("Content-Description:" "Content-ID:") nil)
+ ;; remove header/text separator
+ (goto-char (1- (vm-mm-layout-body-start layout)))
+ (if (looking-at "\n")
+ (delete-char 1)))
+ (insert "Content-Type: " type)
+ (if params
+ (if vm-mime-avoid-folding-content-type
+ (insert "; " (mapconcat 'identity params "; ") "\n")
+ (insert ";\n\t" (mapconcat 'identity params ";\n\t") "\n"))
+ (insert "\n"))
+ (insert "Content-Transfer-Encoding: " encoding "\n\n"))
+ (goto-char (point-max))
+ (widen)
+ (delete-region (vm-extent-start-position e)
+ (vm-extent-end-position e))
+ (vm-detach-extent e)
+ (setq e-list (cdr e-list)))
+ ;; handle the remaining chunk of text after the last
+ ;; extent, if any.
+ (if (or just-one (= (point) (point-max)))
+ nil
+ (setq charset (vm-determine-proper-charset (point)
+ (point-max)))
+ (setq encoding (vm-determine-proper-content-transfer-encoding
+ (point)
+ (point-max))
+ encoding (vm-mime-transfer-encode-region encoding
+ (point)
+ (point-max)
+ t))
+ (setq 8bit (or 8bit (equal encoding "8bit")))
+ (setq boundary-positions (cons (point-marker) boundary-positions))
+ (insert "Content-Type: text/plain; charset=" charset "\n")
+ (insert "Content-Transfer-Encoding: " encoding "\n\n")
+ (goto-char (point-max)))
+ (setq boundary (vm-mime-make-multipart-boundary))
+ (mail-text)
+ (while (re-search-forward (concat "^--"
+ (regexp-quote boundary)
+ "\\(--\\)?$")
+ nil t)
+ (setq boundary (vm-mime-make-multipart-boundary))
+ (mail-text))
+ (goto-char (point-max))
+ (or just-one (insert "\n--" boundary "--\n"))
+ (while boundary-positions
+ (goto-char (car boundary-positions))
+ (insert "\n--" boundary "\n")
+ (setq boundary-positions (cdr boundary-positions)))
+ (if (and just-one already-mimed)
+ (progn
+ (goto-char (vm-mm-layout-header-start layout))
+ ;; trim headers
+ (vm-reorder-message-headers
+ nil '("Content-Description:" "Content-ID:") nil)
+ ;; remove header/text separator
+ (goto-char (1- (vm-mm-layout-body-start layout)))
+ (if (looking-at "\n")
+ (delete-char 1))
+ ;; copy remainder to enclosing entity's header section
+ (insert-buffer-substring (current-buffer)
+ (vm-mm-layout-header-start layout)
+ (vm-mm-layout-body-start layout))
+ (delete-region (vm-mm-layout-header-start layout)
+ (vm-mm-layout-body-start layout))))
+ (goto-char (point-min))
+ (vm-remove-mail-mode-header-separator)
+ (vm-reorder-message-headers
+ nil nil "\\(Content-Type:\\|MIME-Version:\\|Content-Transfer-Encoding\\)")
+ (vm-add-mail-mode-header-separator)
+ (insert "MIME-Version: 1.0\n")
+ (if (not just-one)
+ (insert (if vm-mime-avoid-folding-content-type
+ "Content-Type: multipart/mixed; boundary=\""
+ "Content-Type: multipart/mixed;\n\tboundary=\"")
+ boundary "\"\n")
+ (insert "Content-Type: " type)
+ (if params
+ (if vm-mime-avoid-folding-content-type
+ (insert "; " (mapconcat 'identity params "; ") "\n")
+ (insert ";\n\t" (mapconcat 'identity params ";\n\t"))))
+ (insert "\n"))
+ (if just-one
+ (insert "Content-Transfer-Encoding: " encoding "\n")
+ (if 8bit
+ (insert "Content-Transfer-Encoding: 8bit\n")
+ (insert "Content-Transfer-Encoding: 7bit\n")))))))
+
+(defun vm-mime-fragment-composition (size)
+ (save-restriction
+ (widen)
+ (vm-unsaved-message "Fragmenting message...")
+ (let ((buffers nil)
+ (id (vm-mime-make-multipart-boundary))
+ (n 1)
+ (the-end nil)
+ b header-start header-end master-buffer start end)
+ (vm-remove-mail-mode-header-separator)
+ ;; message/partial must have "7bit" content transfer
+ ;; encoding, so verify that everything has been encoded for
+ ;; 7bit transmission.
+ (let ((vm-mime-8bit-text-transfer-encoding
+ (if (eq vm-mime-8bit-text-transfer-encoding 'send)
+ 'quoted-printable
+ vm-mime-8bit-text-transfer-encoding)))
+ (vm-mime-map-atomic-layouts
+ 'vm-mime-transfer-encode-layout
+ (list (vm-mime-parse-entity nil (list "text/plain" "charset=us-ascii")
+ "7bit"))))
+ (goto-char (point-min))
+ (setq header-start (point))
+ (search-forward "\n\n")
+ (setq header-end (1- (point)))
+ (setq master-buffer (current-buffer))
+ (goto-char (point-min))
+ (setq start (point))
+ (while (not (eobp))
+ (condition-case nil
+ (progn
+ (forward-char (max (- size 150) 2000))
+ (beginning-of-line))
+ (end-of-buffer (setq the-end t)))
+ (setq end (point))
+ (setq b (generate-new-buffer (concat (buffer-name) " part "
+ (int-to-string n))))
+ (setq buffers (cons b buffers))
+ (set-buffer b)
+ (make-local-variable 'vm-send-using-mime)
+ (setq vm-send-using-mime nil)
+ (insert-buffer-substring master-buffer header-start header-end)
+ (goto-char (point-min))
+ (vm-reorder-message-headers nil nil
+ "\\(Content-Type:\\|MIME-Version:\\|Content-Transfer-Encoding\\)")
+ (insert "MIME-Version: 1.0\n")
+ (insert (format
+ (if vm-mime-avoid-folding-content-type
+ "Content-Type: message/partial; id=%s; number=%d"
+ "Content-Type: message/partial;\n\tid=%s;\n\tnumber=%d")
+ id n))
+ (if the-end
+ (if vm-mime-avoid-folding-content-type
+ (insert (format "; total=%d\n" n))
+ (insert (format ";\n\ttotal=%d\n" n)))
+ (insert "\n"))
+ (insert "Content-Transfer-Encoding: 7bit\n")
+ (goto-char (point-max))
+ (insert mail-header-separator "\n")
+ (insert-buffer-substring master-buffer start end)
+ (vm-increment n)
+ (set-buffer master-buffer)
+ (setq start (point)))
+ (vm-unsaved-message "Fragmenting message... done")
+ (nreverse buffers))))
+
+(defun vm-mime-preview-composition ()
+ "Show how the current composition buffer might be displayed
+in a MIME-aware mail reader. VM copies and encodes the current
+mail composition buffer and displays it as a mail folder.
+Type `q' to quit this temp folder and return to composing your
+message."
+ (interactive)
+ (if (not (eq major-mode 'mail-mode))
+ (error "Command must be used in a VM Mail mode buffer."))
+ (let ((temp-buffer nil)
+ (mail-buffer (current-buffer))
+ e-list)
+ (unwind-protect
+ (progn
+ (mail-text)
+ (setq e-list (if (fboundp 'extent-list)
+ (extent-list nil (point) (point-max))
+ (overlays-in (point) (point-max)))
+ e-list (vm-delete (function
+ (lambda (e)
+ (vm-extent-property e 'vm-mime-object)))
+ e-list t)
+ e-list (sort e-list (function
+ (lambda (e1 e2)
+ (< (vm-extent-end-position e1)
+ (vm-extent-end-position e2))))))
+ (setq temp-buffer (generate-new-buffer "composition preview"))
+ (set-buffer temp-buffer)
+ ;; so vm-mime-encode-composition won't complain
+ (setq major-mode 'mail-mode)
+ (vm-insert-region-from-buffer mail-buffer)
+ (mapcar 'vm-copy-extent e-list)
+ (goto-char (point-min))
+ (or (vm-mail-mode-get-header-contents "From")
+ (insert "From: " (or user-mail-address (user-login-name)) "\n"))
+ (or (vm-mail-mode-get-header-contents "Message-ID")
+ (insert "Message-ID: \n"))
+ (or (vm-mail-mode-get-header-contents "Date")
+ (insert "Date: "
+ (format-time-string "%a, %d %b %Y %H%M%S %Z"
+ (current-time))
+ "\n"))
+ (and vm-send-using-mime
+ (null (vm-mail-mode-get-header-contents "MIME-Version:"))
+ (vm-mime-encode-composition))
+ (goto-char (point-min))
+ (insert (vm-leading-message-separator 'From_))
+ (goto-char (point-max))
+ (insert (vm-trailing-message-separator 'From_))
+ (set-buffer-modified-p nil)
+ ;; point of no return, don't kill it if the user quits
+ (setq temp-buffer nil)
+ (let ((vm-auto-decode-mime-messages t)
+ (vm-auto-displayed-mime-content-types t))
+ (vm-save-buffer-excursion
+ (vm-goto-new-folder-frame-maybe 'folder)
+ (vm-mode)))
+ (message
+ (substitute-command-keys
+ "Type \\[vm-quit] to continue composing your message"))
+ ;; temp buffer, don't offer to save it.
+ (setq buffer-offer-save nil)
+ (vm-display (or vm-presentation-buffer (current-buffer)) t
+ (list this-command) '(vm-mode startup)))
+ (and temp-buffer (kill-buffer temp-buffer)))))
+
+(defun vm-mime-composite-type-p (type)
+ (or (vm-mime-types-match "message" type)
+ (vm-mime-types-match "multipart" type)))
+
+(defun vm-mime-map-atomic-layouts (function list)
+ (while list
+ (if (vm-mime-composite-type-p (car (vm-mm-layout-type (car list))))
+ (vm-mime-map-atomic-layouts function (vm-mm-layout-parts (car list)))
+ (funcall function (car list)))
+ (setq list (cdr list))))
diff -r ac1f612d5250 -r 859a2309aef8 lisp/vm/vm-minibuf.el
--- a/lisp/vm/vm-minibuf.el Mon Aug 13 08:49:44 2007 +0200
+++ b/lisp/vm/vm-minibuf.el Mon Aug 13 08:50:05 2007 +0200
@@ -182,18 +182,14 @@
(setq keymap (car keymaps))
(cond ((vm-mouse-xemacs-mouse-p)
(define-key keymap 'button1 command)
- (define-key keymap 'button2 command)
- (define-key keymap 'button3 command))
+ (define-key keymap 'button2 command))
((vm-mouse-fsfemacs-mouse-p)
(define-key keymap [down-mouse-1] 'ignore)
(define-key keymap [drag-mouse-1] 'ignore)
(define-key keymap [mouse-1] command)
(define-key keymap [drag-mouse-2] 'ignore)
(define-key keymap [down-mouse-2] 'ignore)
- (define-key keymap [mouse-2] command)
- (define-key keymap [drag-mouse-3] 'ignore)
- (define-key keymap [down-mouse-3] 'ignore)
- (define-key keymap [mouse-3] command)))
+ (define-key keymap [mouse-2] command)))
(setq keymaps (cdr keymaps)))))
(setq w (vm-get-buffer-window (current-buffer)))
(setq q list
@@ -266,7 +262,9 @@
(if (not multi-word)
(define-key minibuffer-local-map "\r"
'vm-minibuffer-complete-word-and-exit))
- (read-string prompt)))
+ ;; evade the XEmacs dialox box, yeccch.
+ (let ((should-use-dialog-box nil))
+ (read-string prompt))))
(defvar last-nonmenu-event)
@@ -362,7 +360,9 @@
(defun vm-keyboard-read-file-name (prompt &optional dir default
must-match initial history)
"Like read-file-name, except HISTORY's value is unaltered."
- (let ((oldvalue (symbol-value history)))
+ (let ((oldvalue (symbol-value history))
+ ;; evade the XEmacs dialox box, yeccch.
+ (should-use-dialog-box nil))
(unwind-protect
(condition-case nil
(read-file-name prompt dir default must-match initial history)
diff -r ac1f612d5250 -r 859a2309aef8 lisp/vm/vm-misc.el
--- a/lisp/vm/vm-misc.el Mon Aug 13 08:49:44 2007 +0200
+++ b/lisp/vm/vm-misc.el Mon Aug 13 08:50:05 2007 +0200
@@ -1,5 +1,5 @@
;;; Miscellaneous functions for VM
-;;; Copyright (C) 1989, 1990, 1991, 1993, 1994 Kyle E. Jones
+;;; Copyright (C) 1989-1997 Kyle E. Jones
;;;
;;; This program is free software; you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
@@ -131,6 +131,13 @@
(vm-set-su-end-of (car mp) nil)
(setq mp (cdr mp))))))
+(defun vm-check-for-killed-presentation ()
+ (and (bufferp vm-presentation-buffer-handle)
+ (null (buffer-name vm-presentation-buffer-handle))
+ (progn
+ (setq vm-presentation-buffer-handle nil
+ vm-presentation-buffer nil))))
+
(defun vm-check-for-killed-folder ()
(and (bufferp vm-mail-buffer) (null (buffer-name vm-mail-buffer))
(setq vm-mail-buffer nil)))
@@ -237,6 +244,15 @@
(setq prev p p (cdr p))))
list ))
+(defun vm-delete-directory-file-names (list)
+ (vm-delete 'file-directory-p list))
+
+(defun vm-delete-backup-file-names (list)
+ (vm-delete 'backup-file-name-p list))
+
+(defun vm-delete-auto-save-file-names (list)
+ (vm-delete 'auto-save-file-name-p list))
+
(defun vm-delete-duplicates (list &optional all hack-addresses)
"Delete duplicate equivalent strings from the list.
If ALL is t, then if there is more than one occurrence of a string in the list,
@@ -317,12 +333,18 @@
return-value ))
((vectorp object) (apply 'vector (mapcar 'vm-copy object)))
((stringp object) (copy-sequence object))
+ ((markerp object) (copy-marker object))
(t object)))
(defun vm-xemacs-p ()
(let ((case-fold-search nil))
(string-match "XEmacs" emacs-version)))
+(defun vm-xemacs-mule-p ()
+ (and (vm-xemacs-p)
+ (fboundp 'set-file-coding-system)
+ (fboundp 'decode-coding-region)))
+
(defun vm-fsfemacs-19-p ()
(and (string-match "^19" emacs-version)
(not (string-match "XEmacs\\|Lucid" emacs-version))))
@@ -490,3 +512,100 @@
(defun vm-buffer-string-no-properties ()
(vm-buffer-substring-no-properties (point-min) (point-max)))
+
+(defun vm-insert-region-from-buffer (buffer &optional start end)
+ (let ((target-buffer (current-buffer)))
+ (set-buffer buffer)
+ (save-restriction
+ (widen)
+ (or start (setq start (point-min)))
+ (or end (setq end (point-max)))
+ (set-buffer target-buffer)
+ (insert-buffer-substring buffer start end)
+ (set-buffer buffer))
+ (set-buffer target-buffer)))
+
+(if (fboundp 'overlay-get)
+ (fset 'vm-extent-property 'overlay-get)
+ (fset 'vm-extent-property 'extent-property))
+
+(if (fboundp 'overlay-put)
+ (fset 'vm-set-extent-property 'overlay-put)
+ (fset 'vm-set-extent-property 'set-extent-property))
+
+(if (fboundp 'make-overlay)
+ (fset 'vm-make-extent 'make-overlay)
+ (fset 'vm-make-extent 'make-extent))
+
+(if (fboundp 'overlay-end)
+ (fset 'vm-extent-end-position 'overlay-end)
+ (fset 'vm-extent-end-position 'extent-end-position))
+
+(if (fboundp 'overlay-start)
+ (fset 'vm-extent-start-position 'overlay-start)
+ (fset 'vm-extent-start-position 'extent-start-position))
+
+(if (fboundp 'delete-overlay)
+ (fset 'vm-detach-extent 'delete-overlay)
+ (fset 'vm-detach-extent 'detach-extent))
+
+(if (fboundp 'overlay-properties)
+ (fset 'vm-extent-properties 'overlay-properties)
+ (fset 'vm-extent-properties 'extent-properties))
+
+(defun vm-copy-extent (e)
+ (let ((props (vm-extent-properties e))
+ (ee (vm-make-extent (vm-extent-start-position e)
+ (vm-extent-end-position e))))
+ (while props
+ (vm-set-extent-property ee (car props) (car (cdr props)))
+ (setq props (cdr props)))))
+
+(defun vm-make-tempfile-name ()
+ (let ((done nil) (pid (emacs-pid)) filename)
+ (while (not done)
+ (setq filename (format "%s/vm%d.%d" vm-temp-file-directory pid
+ vm-tempfile-counter)
+ vm-tempfile-counter (1+ vm-tempfile-counter)
+ done (not (file-exists-p filename))))
+ filename ))
+
+(defun vm-insert-char (char &optional count ignored buffer)
+ (condition-case nil
+ (progn
+ (insert-char char count ignored buffer)
+ (fset 'vm-insert-char 'insert-char))
+ (wrong-number-of-arguments
+ (fset 'vm-insert-char 'vm-xemacs-compatible-insert-char)
+ (vm-insert-char char count ignored buffer))))
+
+(defun vm-xemacs-compatible-insert-char (char &optional count ignored buffer)
+ (if (and buffer (eq buffer (current-buffer)))
+ (insert-char char count)
+ (save-excursion
+ (set-buffer buffer)
+ (insert-char char count))))
+
+(defun vm-symbol-lists-intersect-p (list1 list2)
+ (catch 'done
+ (while list1
+ (and (memq (car list1) list2)
+ (throw 'done t))
+ (setq list1 (cdr list1)))
+ nil ))
+
+(defun vm-set-buffer-variable (buffer var value)
+ (save-excursion
+ (set-buffer buffer)
+ (set var value)))
+
+(defsubst vm-with-string-as-temp-buffer (string function)
+ (let ((work-buffer nil))
+ (unwind-protect
+ (save-excursion
+ (setq work-buffer (generate-new-buffer " *work*"))
+ (set-buffer work-buffer)
+ (insert string)
+ (funcall function)
+ (buffer-string))
+ (and work-buffer (kill-buffer work-buffer)))))
diff -r ac1f612d5250 -r 859a2309aef8 lisp/vm/vm-motion.el
--- a/lisp/vm/vm-motion.el Mon Aug 13 08:49:44 2007 +0200
+++ b/lisp/vm/vm-motion.el Mon Aug 13 08:50:05 2007 +0200
@@ -1,5 +1,5 @@
;;; Commands to move around in a VM folder
-;;; Copyright (C) 1989, 1990, 1993, 1994 Kyle E. Jones
+;;; Copyright (C) 1989-1997 Kyle E. Jones
;;;
;;; This program is free software; you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
@@ -19,6 +19,7 @@
(defun vm-record-and-change-message-pointer (old new)
(intern (buffer-name) vm-buffers-needing-display-update)
+ (vm-garbage-collect-message)
(setq vm-last-message-pointer old
vm-message-pointer new
vm-need-summary-pointer-update t))
@@ -275,7 +276,8 @@
(if (interactive-p)
(vm-follow-summary-cursor))
(vm-select-folder-buffer)
- (vm-display nil nil '(vm-Next-message) '(vm-Next-message))
+ (vm-display nil nil '(vm-next-message-no-skip)
+ '(vm-next-message-no-skip))
(let ((vm-skip-deleted-messages nil)
(vm-skip-read-messages nil))
(vm-next-message count nil t)))
@@ -288,7 +290,8 @@
(if (interactive-p)
(vm-follow-summary-cursor))
(vm-select-folder-buffer)
- (vm-display nil nil '(vm-Previous-message) '(vm-Previous-message))
+ (vm-display nil nil '(vm-previous-message-no-skip)
+ '(vm-previous-message-no-skip))
(let ((vm-skip-deleted-messages nil)
(vm-skip-read-messages nil))
(vm-previous-message count)))
diff -r ac1f612d5250 -r 859a2309aef8 lisp/vm/vm-mouse.el
--- a/lisp/vm/vm-mouse.el Mon Aug 13 08:49:44 2007 +0200
+++ b/lisp/vm/vm-mouse.el Mon Aug 13 08:50:05 2007 +0200
@@ -1,5 +1,5 @@
;;; Mouse related functions and commands
-;;; Copyright (C) 1995 Kyle E. Jones
+;;; Copyright (C) 1995-1997 Kyle E. Jones
;;;
;;; This program is free software; you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
@@ -48,14 +48,11 @@
(beginning-of-line)
(if (let ((vm-follow-summary-cursor t))
(vm-follow-summary-cursor))
- (progn
- (vm-select-folder-buffer)
- (vm-preview-current-message))
+ nil
(setq this-command 'vm-scroll-forward)
(call-interactively 'vm-scroll-forward)))
- ((memq major-mode '(vm-mode vm-virtual-mode))
- (cond ((and (vm-mouse-fsfemacs-mouse-p) vm-url-browser)
- (vm-mouse-popup-or-select event))))))
+ ((memq major-mode '(vm-mode vm-virtual-mode vm-presentation-mode))
+ (vm-mouse-popup-or-select event))))
(defun vm-mouse-button-3 (event)
(interactive "e")
@@ -73,12 +70,15 @@
(vm-menu-popup-mode-menu event))
((eq major-mode 'vm-mode)
(vm-menu-popup-context-menu event))
+ ((eq major-mode 'vm-presentation-mode)
+ (vm-menu-popup-context-menu event))
((eq major-mode 'vm-virtual-mode)
(vm-menu-popup-context-menu event))
((eq major-mode 'mail-mode)
(vm-menu-popup-mode-menu event))))))
(defun vm-mouse-3-help (object)
+ nil
"Use mouse button 3 to see a menu of options.")
(defun vm-mouse-get-mouse-track-string (event)
@@ -114,25 +114,33 @@
(cond ((vm-mouse-fsfemacs-mouse-p)
(set-buffer (window-buffer (posn-window (event-start event))))
(goto-char (posn-point (event-start event)))
- (let (o-list o menu (found nil))
+ (let (o-list (found nil))
(setq o-list (overlays-at (point)))
(while (and o-list (not found))
(cond ((overlay-get (car o-list) 'vm-url)
(setq found t)
- (vm-mouse-send-url-at-event event)))
+ (vm-mouse-send-url-at-event event))
+ ((overlay-get (car o-list) 'vm-mime-function)
+ (setq found t)
+ (funcall (overlay-get (car o-list) 'vm-mime-function)
+ (car o-list))))
(setq o-list (cdr o-list)))
(and (not found) (vm-menu-popup-context-menu event))))
;; The XEmacs code is not actually used now, since all
;; selectable objects are handled by an extent keymap
;; binding that points to a more specific function. But
;; this might come in handy later if I want selectable
- ;; objects that don't have an extent attached.
+ ;; objects that don't have an extent or extent keymap
+ ;; attached.
((vm-mouse-xemacs-mouse-p)
(set-buffer (window-buffer (event-window event)))
(and (event-point event) (goto-char (event-point event)))
- (if (extent-at (point) (current-buffer) 'vm-url)
- (vm-mouse-send-url-at-event event)
- (vm-menu-popup-context-menu event)))))
+ (let (e)
+ (cond ((extent-at (point) (current-buffer) 'vm-url)
+ (vm-mouse-send-url-at-event event))
+ ((setq e (extent-at (point) nil 'vm-mime-function))
+ (funcall (extent-property e 'vm-mime-function) e))
+ (t (vm-menu-popup-context-menu event)))))))
(defun vm-mouse-send-url-at-event (event)
(interactive "e")
@@ -146,35 +154,39 @@
(vm-mouse-send-url-at-position (posn-point (event-start event))))))
(defun vm-mouse-send-url-at-position (pos &optional browser)
- (cond ((vm-mouse-xemacs-mouse-p)
- (let ((e (extent-at pos (current-buffer) 'vm-url))
- url)
- (if (null e)
- nil
- (setq url (buffer-substring (extent-start-position e)
- (extent-end-position e)))
- (vm-mouse-send-url url browser))))
- ((vm-mouse-fsfemacs-mouse-p)
- (let (o-list url o)
- (setq o-list (overlays-at pos))
- (while (and o-list (null (overlay-get (car o-list) 'vm-url)))
- (setq o-list (cdr o-list)))
- (if (null o-list)
- nil
- (setq o (car o-list))
- (setq url (vm-buffer-substring-no-properties
- (overlay-start o)
- (overlay-end o)))
- (vm-mouse-send-url url browser))))))
+ (save-restriction
+ (widen)
+ (cond ((vm-mouse-xemacs-mouse-p)
+ (let ((e (extent-at pos (current-buffer) 'vm-url))
+ url)
+ (if (null e)
+ nil
+ (setq url (buffer-substring (extent-start-position e)
+ (extent-end-position e)))
+ (vm-mouse-send-url url browser))))
+ ((vm-mouse-fsfemacs-mouse-p)
+ (let (o-list url o)
+ (setq o-list (overlays-at pos))
+ (while (and o-list (null (overlay-get (car o-list) 'vm-url)))
+ (setq o-list (cdr o-list)))
+ (if (null o-list)
+ nil
+ (setq o (car o-list))
+ (setq url (vm-buffer-substring-no-properties
+ (overlay-start o)
+ (overlay-end o)))
+ (vm-mouse-send-url url browser)))))))
(defun vm-mouse-send-url (url &optional browser)
- (let ((browser (or browser vm-url-browser)))
- (cond ((symbolp browser)
- (funcall browser url))
- ((stringp browser)
- (vm-unsaved-message "Sending URL to %s..." browser)
- (vm-run-background-command browser url)
- (vm-unsaved-message "Sending URL to %s... done" browser)))))
+ (if (string-match "^mailto:" url)
+ (vm-mail-to-mailto-url url)
+ (let ((browser (or browser vm-url-browser)))
+ (cond ((symbolp browser)
+ (funcall browser url))
+ ((stringp browser)
+ (vm-unsaved-message "Sending URL to %s..." browser)
+ (vm-run-background-command browser url)
+ (vm-unsaved-message "Sending URL to %s... done" browser))))))
(defun vm-mouse-send-url-to-netscape (url &optional new-netscape new-window)
(vm-unsaved-message "Sending URL to Netscape...")
@@ -221,7 +233,7 @@
((vm-mouse-fsfemacs-mouse-p)
(if (null (lookup-key vm-mode-map [mouse-2]))
(define-key vm-mode-map [mouse-2] 'vm-mouse-button-2))
- (if (null (lookup-key vm-mode-map [down-mouse-3]))
+ (if vm-popup-menu-on-mouse-3
(progn
(define-key vm-mode-map [mouse-3] 'ignore)
(define-key vm-mode-map [down-mouse-3] 'vm-mouse-button-3))))))
@@ -232,6 +244,31 @@
(defun vm-run-command (command &rest arg-list)
(apply (function call-process) command nil nil nil arg-list))
+;; return t on zero exit status
+;; return (exit-status . stderr-string) on nonzero exit status
+(defun vm-run-command-on-region (start end output-buffer command
+ &rest arg-list)
+ (let ((tempfile nil) status errstring)
+ (unwind-protect
+ (progn
+ (setq tempfile (vm-make-tempfile-name))
+ (setq status
+ (apply 'call-process-region
+ start end command nil
+ (list output-buffer tempfile)
+ nil arg-list))
+ (cond ((equal status 0) t)
+ ((zerop (save-excursion
+ (set-buffer (find-file-noselect tempfile))
+ (buffer-size)))
+ t)
+ (t (save-excursion
+ (set-buffer (find-file-noselect tempfile))
+ (setq errstring (buffer-string))
+ (kill-buffer nil)
+ (cons status errstring)))))
+ (vm-error-free-call 'delete-file tempfile))))
+
;; stupid yammering compiler
(defvar vm-mouse-read-file-name-prompt)
(defvar vm-mouse-read-file-name-dir)
@@ -266,8 +303,9 @@
(setq vm-mouse-read-file-name-history history)
(setq vm-mouse-read-file-name-prompt prompt)
(setq vm-mouse-read-file-name-return-value nil)
- (save-excursion
- (vm-goto-new-frame 'completion))
+ (if (and vm-frame-per-completion (vm-multiple-frames-possible-p))
+ (save-excursion
+ (vm-goto-new-frame 'completion)))
(switch-to-buffer (current-buffer))
(vm-mouse-read-file-name-event-handler)
(save-excursion
@@ -321,7 +359,9 @@
(vm-mouse-set-mouse-track-highlight start (point))
(vm-set-region-face start (point) 'italic)
(insert ?\n ?\n)
- (setq list (directory-files default-directory))
+ (setq list (vm-delete-backup-file-names
+ (vm-delete-auto-save-file-names
+ (directory-files default-directory))))
(vm-show-list list 'vm-mouse-read-file-name-event-handler)
(setq buffer-read-only t)))
@@ -351,8 +391,9 @@
(setq vm-mouse-read-string-completion-list completion-list)
(setq vm-mouse-read-string-multi-word multi-word)
(setq vm-mouse-read-string-return-value nil)
- (save-excursion
- (vm-goto-new-frame 'completion))
+ (if (and vm-frame-per-completion (vm-multiple-frames-possible-p))
+ (save-excursion
+ (vm-goto-new-frame 'completion)))
(switch-to-buffer (current-buffer))
(vm-mouse-read-string-event-handler)
(save-excursion
@@ -369,7 +410,7 @@
(defun vm-mouse-read-string-event-handler (&optional string)
(let ((key-doc "Click here for keyboard interface.")
(bs-doc " .... to go back one word.")
- (done-doc " .... to when you're done.")
+ (done-doc " .... when you're done.")
start list)
(if string
(cond ((equal string key-doc)
diff -r ac1f612d5250 -r 859a2309aef8 lisp/vm/vm-page.el
--- a/lisp/vm/vm-page.el Mon Aug 13 08:49:44 2007 +0200
+++ b/lisp/vm/vm-page.el Mon Aug 13 08:50:05 2007 +0200
@@ -1,5 +1,5 @@
;;; Commands to move around within a VM message
-;;; Copyright (C) 1989, 1990, 1991, 1993, 1994 Kyle E. Jones
+;;; Copyright (C) 1989-1997 Kyle E. Jones
;;;
;;; This program is free software; you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
@@ -28,18 +28,24 @@
(was-invisible nil))
(vm-select-folder-buffer)
(vm-check-for-killed-summary)
+ (vm-check-for-killed-presentation)
(vm-error-if-folder-empty)
- (if (null (vm-get-visible-buffer-window (current-buffer)))
- (let ((point (point)))
- (vm-display (current-buffer) t
- '(vm-scroll-forward vm-scroll-backward)
- (list this-command 'reading-message))
- ;; window start sticks to end of clip region when clip
- ;; region moves back past it in the buffer. fix it.
- (let ((w (vm-get-visible-buffer-window (current-buffer))))
+ (and vm-presentation-buffer
+ (set-buffer vm-presentation-buffer))
+ (let ((point (point))
+ (w (vm-get-visible-buffer-window (current-buffer))))
+ (if (or (null w)
+ (not (vm-frame-totally-visible-p (vm-window-frame w))))
+ (progn
+ (vm-display (current-buffer) t
+ '(vm-scroll-forward vm-scroll-backward)
+ (list this-command 'reading-message))
+ ;; window start sticks to end of clip region when clip
+ ;; region moves back past it in the buffer. fix it.
+ (setq w (vm-get-visible-buffer-window (current-buffer)))
(if (= (window-start w) (point-max))
- (set-window-start w (point-min))))
- (setq was-invisible t)))
+ (set-window-start w (point-min)))
+ (setq was-invisible t))))
(if (or mp-changed was-invisible
(and (eq vm-system-state 'previewing)
(pos-visible-in-window-p
@@ -103,14 +109,20 @@
(t
(and (> (prefix-numeric-value arg) 0)
(vm-howl-if-eom)))))))
- (if (not (or vm-startup-message-displayed vm-inhibit-startup-message))
+ (if (not vm-startup-message-displayed)
(vm-display-startup-message)))
(defun vm-scroll-forward-internal (arg)
(let ((direction (prefix-numeric-value arg))
(w (selected-window)))
(condition-case error-data
- (progn (scroll-up arg) nil)
+ (progn
+ (if (and (> direction 0)
+ (pos-visible-in-window-p
+ (vm-text-end-of (car vm-message-pointer))))
+ (signal 'end-of-buffer nil)
+ (scroll-up arg))
+ nil )
(error
(if (or (and (< direction 0)
(> (point-min) (vm-text-of (car vm-message-pointer))))
@@ -237,7 +249,7 @@
;; large, search just the head and the tail of the region since
;; they tend to contain the interesting text.
(let ((search-limit vm-url-search-limit)
- (search-pairs))
+ search-pairs n)
(if (and search-limit (> (- (point-max) (point-min)) search-limit))
(setq search-pairs (list (cons (point-min)
(+ (point-min) (/ search-limit 2)))
@@ -256,14 +268,18 @@
(while search-pairs
(goto-char (car (car search-pairs)))
(while (re-search-forward vm-url-regexp (cdr (car search-pairs)) t)
- (setq e (make-extent (match-beginning 0) (match-end 0)))
+ (setq n 1)
+ (while (null (match-beginning n))
+ (vm-increment n))
+ (setq e (make-extent (match-beginning n) (match-end n)))
(set-extent-property e 'vm-url t)
(if vm-highlight-url-face
(set-extent-property e 'face vm-highlight-url-face))
(if vm-url-browser
(let ((keymap (make-sparse-keymap)))
(define-key keymap 'button2 'vm-mouse-send-url-at-event)
- (define-key keymap 'button3 'vm-menu-popup-url-browser-menu)
+ (if vm-popup-menu-on-mouse-3
+ (define-key keymap 'button3 'vm-menu-popup-url-browser-menu))
(define-key keymap "\r"
(function (lambda () (interactive)
(vm-mouse-send-url-at-position (point)))))
@@ -288,12 +304,21 @@
(while search-pairs
(goto-char (car (car search-pairs)))
(while (re-search-forward vm-url-regexp (cdr (car search-pairs)) t)
- (setq o (make-overlay (match-beginning 0) (match-end 0)))
+ (setq n 1)
+ (while (null (match-beginning n))
+ (vm-increment n))
+ (setq o (make-overlay (match-beginning n) (match-end n)))
(overlay-put o 'vm-url t)
(if vm-highlight-url-face
(overlay-put o 'face vm-highlight-url-face))
(if vm-url-browser
- (overlay-put o 'mouse-face 'highlight)))
+ (let ((keymap (make-sparse-keymap)))
+ (overlay-put o 'mouse-face 'highlight)
+ (setq keymap (nconc keymap (current-local-map)))
+ (define-key keymap "\r"
+ (function (lambda () (interactive)
+ (vm-mouse-send-url-at-position (point)))))
+ (overlay-put o 'local-map keymap))))
(setq search-pairs (cdr search-pairs))))))))
(defun vm-energize-headers ()
@@ -324,9 +349,10 @@
(define-key keymap 'button2
(list 'lambda () '(interactive)
(list 'popup-menu (list 'quote menu))))
- (define-key keymap 'button3
- (list 'lambda () '(interactive)
- (list 'popup-menu (list 'quote menu))))
+ (if vm-popup-menu-on-mouse-3
+ (define-key keymap 'button3
+ (list 'lambda () '(interactive)
+ (list 'popup-menu (list 'quote menu)))))
(set-extent-property e 'keymap keymap)
(set-extent-property e 'balloon-help 'vm-mouse-3-help)
(set-extent-property e 'highlight t))
@@ -410,10 +436,48 @@
"Netscape")
(t (symbol-name vm-url-browser)))))
-(defun vm-preview-current-message ()
- (setq vm-system-state 'previewing)
- (if vm-real-buffers
- (vm-make-virtual-copy (car vm-message-pointer)))
+(defun vm-energize-urls-in-message-region (&optional start end)
+ (save-excursion
+ (or start (setq start (vm-headers-of (car vm-message-pointer))))
+ (or end (setq end (vm-text-end-of (car vm-message-pointer))))
+ ;; energize the URLs
+ (if (or vm-highlight-url-face vm-url-browser)
+ (save-restriction
+ (widen)
+ (narrow-to-region start
+ end)
+ (vm-energize-urls)))))
+
+(defun vm-highlight-headers-maybe ()
+ ;; highlight the headers
+ (if (or vm-highlighted-header-regexp
+ (and (vm-xemacs-p) vm-use-lucid-highlighting))
+ (save-restriction
+ (widen)
+ (narrow-to-region (vm-headers-of (car vm-message-pointer))
+ (vm-text-end-of (car vm-message-pointer)))
+ (vm-highlight-headers))))
+
+(defun vm-energize-headers-and-xfaces ()
+ ;; energize certain headers
+ (if (and vm-use-menus (vm-menu-support-possible-p))
+ (save-restriction
+ (widen)
+ (narrow-to-region (vm-headers-of (car vm-message-pointer))
+ (vm-text-of (car vm-message-pointer)))
+ (vm-energize-headers)))
+ ;; display xfaces, if we can
+ (if (and vm-display-xfaces
+ (vm-xemacs-p)
+ (vm-multiple-frames-possible-p)
+ (featurep 'xface))
+ (save-restriction
+ (widen)
+ (narrow-to-region (vm-headers-of (car vm-message-pointer))
+ (vm-text-of (car vm-message-pointer)))
+ (vm-display-xface))))
+
+(defun vm-narrow-for-preview ()
(widen)
;; hide as much of the message body as vm-preview-lines specifies
(narrow-to-region
@@ -425,86 +489,104 @@
(goto-char (vm-text-of (car vm-message-pointer)))
(forward-line (if (natnump vm-preview-lines) vm-preview-lines 0))
(point))))
- (t (vm-text-end-of (car vm-message-pointer)))))
- ;; highlight the headers
- (if (or vm-highlighted-header-regexp
- (and (vm-xemacs-p) vm-use-lucid-highlighting))
- (save-restriction
- (widen)
- (narrow-to-region (vm-headers-of (car vm-message-pointer))
- (vm-text-end-of (car vm-message-pointer)))
- (vm-highlight-headers)))
- ;; energize the URLs
- (if (or vm-highlight-url-face vm-url-browser)
- (save-restriction
- (widen)
- (narrow-to-region (vm-headers-of (car vm-message-pointer))
- (vm-text-end-of (car vm-message-pointer)))
- (vm-energize-urls)))
- ;; energize certain headers
- (if (and vm-use-menus (vm-menu-support-possible-p))
- (save-restriction
- (widen)
- (narrow-to-region (vm-headers-of (car vm-message-pointer))
- (vm-text-of (car vm-message-pointer)))
- (vm-energize-headers)))
+ (t (vm-text-end-of (car vm-message-pointer))))))
+
+(defun vm-preview-current-message ()
+ (vm-save-buffer-excursion
+ (setq vm-system-state 'previewing)
+ (if vm-real-buffers
+ (vm-make-virtual-copy (car vm-message-pointer)))
+
+ ;; run the message select hooks.
+ (save-excursion
+ (vm-select-folder-buffer)
+ (vm-run-message-hook (car vm-message-pointer) 'vm-select-message-hook)
+ (and vm-select-new-message-hook (vm-new-flag (car vm-message-pointer))
+ (vm-run-message-hook (car vm-message-pointer)
+ 'vm-select-new-message-hook))
+ (and vm-select-unread-message-hook
+ (vm-unread-flag (car vm-message-pointer))
+ (vm-run-message-hook (car vm-message-pointer)
+ 'vm-select-unread-message-hook)))
- ;; display xfaces, if we can
- (if (and vm-display-xfaces
- (vm-xemacs-p)
- (vm-multiple-frames-possible-p)
- (featurep 'xface))
- (save-restriction
- (widen)
- (narrow-to-region (vm-headers-of (car vm-message-pointer))
- (vm-text-of (car vm-message-pointer)))
- (vm-display-xface)))
+ (vm-narrow-for-preview)
+ (if (or vm-mime-display-function
+ (and vm-display-using-mime
+ (not (vm-mime-plain-message-p (car vm-message-pointer)))))
+ (let ((layout (vm-mm-layout (car vm-message-pointer))))
+ (vm-make-presentation-copy (car vm-message-pointer))
+ (vm-save-buffer-excursion
+ (vm-replace-buffer-in-windows (current-buffer)
+ vm-presentation-buffer))
+ (set-buffer vm-presentation-buffer)
+ (setq vm-system-state 'previewing)
+ (vm-narrow-for-preview))
+ (setq vm-presentation-buffer nil)
+ (and vm-presentation-buffer-handle
+ (vm-replace-buffer-in-windows vm-presentation-buffer-handle
+ (current-buffer))))
- (vm-run-message-hook (car vm-message-pointer) 'vm-select-message-hook)
- (and vm-select-new-message-hook (vm-new-flag (car vm-message-pointer))
- (vm-run-message-hook (car vm-message-pointer)
- 'vm-select-new-message-hook))
- (and vm-select-unread-message-hook (vm-unread-flag (car vm-message-pointer))
- (vm-run-message-hook (car vm-message-pointer)
- 'vm-select-unread-message-hook))
+ ;; at this point the current buffer is the presentation buffer
+ ;; if we're using one for this message.
+
+ (vm-energize-urls-in-message-region)
+ (vm-highlight-headers-maybe)
+ (vm-energize-headers-and-xfaces)
- (if vm-honor-page-delimiters
- (vm-narrow-to-page))
- (goto-char (vm-text-of (car vm-message-pointer)))
- ;; If we have a window, set window start appropriately.
- (let ((w (vm-get-visible-buffer-window (current-buffer))))
- (if w
- (progn (set-window-start w (point-min))
- (set-window-point w (vm-text-of (car vm-message-pointer))))))
- (if (or (null vm-preview-lines)
- (and (not vm-preview-read-messages)
- (not (vm-new-flag (car vm-message-pointer)))
- (not (vm-unread-flag (car vm-message-pointer)))))
- (vm-show-current-message)
- (vm-update-summary-and-mode-line)))
+ (if vm-honor-page-delimiters
+ (vm-narrow-to-page))
+ (goto-char (vm-text-of (car vm-message-pointer)))
+ ;; If we have a window, set window start appropriately.
+ (let ((w (vm-get-visible-buffer-window (current-buffer))))
+ (if w
+ (progn (set-window-start w (point-min))
+ (set-window-point w (vm-text-of (car vm-message-pointer))))))
+ (if (or (null vm-preview-lines)
+ (and (not vm-preview-read-messages)
+ (not (vm-new-flag (car vm-message-pointer)))
+ (not (vm-unread-flag (car vm-message-pointer)))))
+ (vm-show-current-message)
+ (vm-update-summary-and-mode-line))))
(defun vm-show-current-message ()
- (save-excursion
- (save-excursion
- (goto-char (point-min))
- (widen)
- (narrow-to-region (point) (vm-text-end-of (car vm-message-pointer))))
- (if vm-honor-page-delimiters
- (progn
- (if (looking-at page-delimiter)
- (forward-page 1))
- (vm-narrow-to-page))))
- ;; don't mark the message as read if the user can't see it!
- (if (vm-get-visible-buffer-window (current-buffer))
- (progn
- (setq vm-system-state 'showing)
- (cond ((vm-new-flag (car vm-message-pointer))
- (vm-set-new-flag (car vm-message-pointer) nil)))
- (cond ((vm-unread-flag (car vm-message-pointer))
- (vm-set-unread-flag (car vm-message-pointer) nil)))
- (vm-update-summary-and-mode-line)
- (vm-howl-if-eom))
- (vm-update-summary-and-mode-line)))
+ (and vm-display-using-mime
+ vm-auto-decode-mime-messages
+ (not vm-mime-decoded)
+ (not (vm-mime-plain-message-p (car vm-message-pointer)))
+ (vm-decode-mime-message))
+ (vm-save-buffer-excursion
+ (save-excursion
+ (save-excursion
+ (goto-char (point-min))
+ (widen)
+ (narrow-to-region (point) (vm-text-end-of (car vm-message-pointer))))
+ (if vm-honor-page-delimiters
+ (progn
+ (if (looking-at page-delimiter)
+ (forward-page 1))
+ (vm-narrow-to-page))))
+ ;; don't mark the message as read if the user can't see it!
+ (if (vm-get-visible-buffer-window (current-buffer))
+ (progn
+ (save-excursion
+ (setq vm-system-state 'showing)
+ (if vm-mail-buffer
+ (vm-set-buffer-variable vm-mail-buffer 'vm-system-state
+ 'showing))
+ ;; We could be in the presentation buffer here. Since
+ ;; the presentation buffer's message pointer and sole
+ ;; message are a mockup, they will cause trouble if
+ ;; passed into the undo/update system. So we switch
+ ;; into the real message buffer to do attribute
+ ;; updates.
+ (vm-select-folder-buffer)
+ (cond ((vm-new-flag (car vm-message-pointer))
+ (vm-set-new-flag (car vm-message-pointer) nil)))
+ (cond ((vm-unread-flag (car vm-message-pointer))
+ (vm-set-unread-flag (car vm-message-pointer) nil))))
+ (vm-update-summary-and-mode-line)
+ (vm-howl-if-eom))
+ (vm-update-summary-and-mode-line))))
(defun vm-expose-hidden-headers ()
"Toggle exposing and hiding message headers that are normally not visible."
@@ -512,7 +594,10 @@
(vm-follow-summary-cursor)
(vm-select-folder-buffer)
(vm-check-for-killed-summary)
+ (vm-check-for-killed-presentation)
(vm-error-if-folder-empty)
+ (and vm-presentation-buffer
+ (set-buffer vm-presentation-buffer))
(vm-display (current-buffer) t '(vm-expose-hidden-headers)
'(vm-expose-hidden-headers reading-message))
(let* ((exposed (= (point-min) (vm-start-of (car vm-message-pointer)))))
@@ -561,7 +646,10 @@
(vm-follow-summary-cursor)
(vm-select-folder-buffer)
(vm-check-for-killed-summary)
+ (vm-check-for-killed-presentation)
(vm-error-if-folder-empty)
+ (and vm-presentation-buffer
+ (set-buffer vm-presentation-buffer))
(vm-widen-page)
(push-mark)
(vm-display (current-buffer) t '(vm-beginning-of-message)
@@ -583,7 +671,10 @@
(vm-follow-summary-cursor)
(vm-select-folder-buffer)
(vm-check-for-killed-summary)
+ (vm-check-for-killed-presentation)
(vm-error-if-folder-empty)
+ (and vm-presentation-buffer
+ (set-buffer vm-presentation-buffer))
(if (eq vm-system-state 'previewing)
(vm-show-current-message))
(setq vm-system-state 'reading)
diff -r ac1f612d5250 -r 859a2309aef8 lisp/vm/vm-pop.el
--- a/lisp/vm/vm-pop.el Mon Aug 13 08:49:44 2007 +0200
+++ b/lisp/vm/vm-pop.el Mon Aug 13 08:50:05 2007 +0200
@@ -235,7 +235,13 @@
(vm-convert-folder-type-headers nil vm-folder-type)
(goto-char end)
(insert-before-markers (vm-trailing-message-separator))))
- (write-region start end crash t 0)
+ ;; Set file type to binary for DOS/Windows. I don't know if
+ ;; this is correct to do or not; it depends on whether the
+ ;; the CRLF or the LF newline convention is used on the inbox
+ ;; associated with this crashbox. This setting assumes the LF
+ ;; newline convention is used.
+ (let ((buffer-file-type t))
+ (write-region start end crash t 0))
(delete-region start end)
t ))
@@ -262,7 +268,7 @@
(insert string)
(call-process-region (point-min) (point-max)
"/bin/sh" t buffer nil
- "-c" vm-pop-md5-program)
+ shell-command-switch vm-pop-md5-program)
;; MD5 digest is 32 chars long
;; mddriver adds a newline to make neaten output for tty
;; viewing, make sure we leave it behind.
diff -r ac1f612d5250 -r 859a2309aef8 lisp/vm/vm-reply.el
--- a/lisp/vm/vm-reply.el Mon Aug 13 08:49:44 2007 +0200
+++ b/lisp/vm/vm-reply.el Mon Aug 13 08:50:05 2007 +0200
@@ -1,5 +1,5 @@
;;; Mailing, forwarding, and replying commands for VM
-;;; Copyright (C) 1989, 1990, 1991, 1993, 1994, 1995 Kyle E. Jones
+;;; Copyright (C) 1989-1997 Kyle E. Jones
;;;
;;; This program is free software; you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
@@ -29,11 +29,12 @@
((eq mlist mp)
(cond ((setq to
(let ((reply-to
- (vm-get-header-contents (car mp) "Reply-To:")))
+ (vm-get-header-contents (car mp) "Reply-To:"
+ ", ")))
(if (vm-ignored-reply-to reply-to)
nil
reply-to ))))
- ((setq to (vm-get-header-contents (car mp) "From:")))
+ ((setq to (vm-get-header-contents (car mp) "From:" ", ")))
;; bad, but better than nothing for some
((setq to (vm-grok-From_-author (car mp))))
(t (error "No From: or Reply-To: header in message")))
@@ -51,9 +52,11 @@
subject)
0)))
(setq subject (concat vm-reply-subject-prefix subject))))
- (t (cond ((setq tmp (vm-get-header-contents (car mp) "Reply-To:"))
+ (t (cond ((setq tmp (vm-get-header-contents (car mp) "Reply-To:"
+ ", "))
(setq to (concat to "," tmp)))
- ((setq tmp (vm-get-header-contents (car mp) "From:"))
+ ((setq tmp (vm-get-header-contents (car mp) "From:"
+ ", "))
(setq to (concat to "," tmp)))
;; bad, but better than nothing for some
((setq tmp (vm-grok-From_-author (car mp)))
@@ -61,8 +64,10 @@
(t (error "No From: or Reply-To: header in message")))))
(if to-all
(progn
- (setq tmp (vm-get-header-contents (car mp) "To:"))
- (setq tmp2 (vm-get-header-contents (car mp) "Cc:"))
+ (setq tmp (vm-get-header-contents (car mp) "To:"
+ ", "))
+ (setq tmp2 (vm-get-header-contents (car mp) "Cc:"
+ ", "))
(if tmp
(if cc
(setq cc (concat cc "," tmp))
@@ -72,13 +77,14 @@
(setq cc (concat cc "," tmp2))
(setq cc tmp2)))))
(setq references
- (cons (vm-get-header-contents (car mp) "References:")
- (cons (vm-get-header-contents (car mp) "In-reply-to:")
- (cons (vm-get-header-contents (car mp) "Message-ID:")
+ (cons (vm-get-header-contents (car mp) "References:" " ")
+ (cons (vm-get-header-contents (car mp) "In-reply-to:" " ")
+ (cons (vm-get-header-contents (car mp) "Message-ID:"
+ " ")
references))))
(setq newsgroups
- (cons (or (and to-all (vm-get-header-contents (car mp) "Followup-To:"))
- (vm-get-header-contents (car mp) "Newsgroups:"))
+ (cons (or (and to-all (vm-get-header-contents (car mp) "Followup-To:" ","))
+ (vm-get-header-contents (car mp) "Newsgroups:" ","))
newsgroups))
(setq mp (cdr mp)))
(if vm-strip-reply-headers
@@ -192,6 +198,8 @@
(setq newbuf (current-buffer))
(if (not (eq major-mode 'vm-mode))
(vm-mode))
+ (if vm-presentation-buffer-handle
+ (vm-bury-buffer vm-presentation-buffer-handle))
(if (null vm-message-pointer)
(error "No messages in folder %s" folder))
(setq default (vm-number-of (car vm-message-pointer)))
@@ -275,12 +283,34 @@
(save-restriction
(widen)
(save-excursion
- (set-buffer (vm-buffer-of message))
- (save-restriction
- (widen)
- (append-to-buffer b (vm-headers-of message) (vm-text-end-of message))
- (setq end (vm-marker (+ start (- (vm-text-end-of message)
- (vm-headers-of message))) b))))
+ (if (vectorp (vm-mm-layout message))
+ (let* ((o (vm-mm-layout message))
+ (type (car (vm-mm-layout-type o)))
+ parts)
+ (vm-insert-region-from-buffer (vm-buffer-of message)
+ (vm-headers-of message)
+ (vm-text-of message))
+ (cond ((vm-mime-types-match "multipart" type)
+ (setq parts (vm-mm-layout-parts o)))
+ (t (setq parts (list o))))
+ (while parts
+ (cond ((vm-mime-text-type-p (car parts))
+ (if (vm-mime-display-internal-text/plain (car parts) t)
+ nil
+ ;; charset problems probably
+ ;; just dump the raw bits
+ (vm-mime-insert-mime-body (car parts))
+ (vm-mime-transfer-decode-region (car parts)
+ start (point)))))
+ (setq parts (cdr parts)))
+ (setq end (point-marker)))
+ (set-buffer (vm-buffer-of message))
+ (save-restriction
+ (widen)
+ (append-to-buffer b (vm-headers-of message)
+ (vm-text-end-of message))
+ (setq end (vm-marker (+ start (- (vm-text-end-of message)
+ (vm-headers-of message))) b)))))
(push-mark end)
(cond (mail-citation-hook (run-hooks 'mail-citation-hook))
(mail-yank-hooks (run-hooks 'mail-yank-hooks))
@@ -290,11 +320,14 @@
"Just like mail-send-and-exit except that VM flags the appropriate message(s)
as having been replied to, if appropriate."
(interactive "P")
+ (vm-check-for-killed-folder)
(let ((b (current-buffer)))
(vm-mail-send)
(cond ((null (buffer-name b)) ;; dead buffer
(vm-display nil nil '(vm-mail-send-and-exit)
- '(vm-mail-send-and-exit reading-message startup)))
+ '(vm-mail-send-and-exit
+ reading-message
+ startup)))
(t
(vm-display b nil '(vm-mail-send-and-exit)
'(vm-mail-send-and-exit reading-message startup))
@@ -337,27 +370,78 @@
(interactive)
(if vm-tale-is-an-idiot
(vm-help-tale))
- (if (and vm-confirm-mail-send
- (not (y-or-n-p "Send the message? ")))
- (error "Message not sent."))
+ ;; protect value of this-command from minibuffer read
+ (let ((this-command this-command))
+ (if (and vm-confirm-mail-send
+ (not (y-or-n-p "Send the message? ")))
+ (error "Message not sent.")))
+ ;; send mail using MIME if user requests it and if the buffer
+ ;; has not already been MIME encoded.
+ (if (and vm-send-using-mime
+ (null (vm-mail-mode-get-header-contents "MIME-Version:")))
+ (vm-mime-encode-composition))
;; this to prevent Emacs 19 from asking whether a message that
;; has already been sent should be sent again. VM renames mail
;; buffers after the message has been sent, so the user should
;; already know that the message has been sent.
(set-buffer-modified-p t)
- ;; don't want a buffer change to occur here
- ;; save-excursion to be sure.
- (save-excursion
- (mail-send))
- (vm-rename-current-mail-buffer)
- (cond ((eq vm-system-state 'replying)
- (vm-mail-mark-replied))
- ((eq vm-system-state 'forwarding)
- (vm-mail-mark-forwarded))
- ((eq vm-system-state 'redistributing)
- (vm-mail-mark-redistributed)))
- (vm-keep-mail-buffer (current-buffer))
- (vm-display nil nil '(vm-mail-send) '(vm-mail-send)))
+ (let ((composition-buffer (current-buffer))
+ ;; preserve these in case the composition buffer gets
+ ;; killed.
+ (vm-reply-list vm-reply-list)
+ (vm-forward-list vm-forward-list)
+ (vm-redistribute-list vm-redistribute-list))
+ ;; fragment message using message/partial if it is too big.
+ (if (and vm-send-using-mime
+ (integerp vm-mime-max-message-size)
+ (> (buffer-size) vm-mime-max-message-size))
+ (let (list)
+ (setq list (vm-mime-fragment-composition vm-mime-max-message-size))
+ (while list
+ (save-excursion
+ (set-buffer (car list))
+ (vm-mail-send)
+ (kill-buffer (car list)))
+ (setq list (cdr list)))
+ ;; what mail-send would have done
+ (set-buffer-modified-p nil))
+ ;; don't want a buffer change to occur here
+ ;; save-excursion to be sure.
+ ;;
+ ;; also protect value of this-command from minibuffer reads
+ (let ((this-command this-command))
+ (save-excursion
+ (mail-send))))
+ (cond ((eq vm-system-state 'replying)
+ (vm-mail-mark-replied))
+ ((eq vm-system-state 'forwarding)
+ (vm-mail-mark-forwarded))
+ ((eq vm-system-state 'redistributing)
+ (vm-mail-mark-redistributed)))
+ ;; be careful, something could have killed the composition
+ ;; buffer inside mail-send.
+ (if (eq (current-buffer) composition-buffer)
+ (progn
+ (vm-rename-current-mail-buffer)
+ (vm-keep-mail-buffer (current-buffer))))
+ (vm-display nil nil '(vm-mail-send) '(vm-mail-send))))
+
+(defun vm-mail-mode-get-header-contents (header-name-regexp)
+ (let ((contents nil)
+ regexp)
+ (setq regexp (concat "^\\(" header-name-regexp "\\)\\|\\(^"
+ (regexp-quote mail-header-separator) "$\\)"))
+ (save-excursion
+ (save-restriction
+ (widen)
+ (goto-char (point-min))
+ (let ((case-fold-search t))
+ (if (and (re-search-forward regexp nil t)
+ (match-beginning 1)
+ (progn (goto-char (match-beginning 0))
+ (vm-match-header)))
+ (vm-matched-header-contents)
+ nil ))))))
(defun vm-rename-current-mail-buffer ()
(if vm-rename-current-buffer-function
@@ -503,6 +587,10 @@
(setq this-command 'vm-next-command-uses-marks)
(command-execute 'vm-send-digest))
(let ((dir default-directory)
+ (miming (and vm-send-using-mime
+ (equal vm-forwarding-digest-type "mime")))
+ mail-buffer
+ header-end boundary
(mp vm-message-pointer))
(save-restriction
(widen)
@@ -518,10 +606,33 @@
(setq vm-system-state 'forwarding
vm-forward-list (list (car mp))
default-directory dir)
- (goto-char (point-min))
- (re-search-forward
- (concat "^" (regexp-quote mail-header-separator) "\n") nil 0)
- (cond ((equal vm-forwarding-digest-type "rfc934")
+ (if miming
+ (progn
+ (setq mail-buffer (current-buffer))
+ (set-buffer (generate-new-buffer "*vm-forward-buffer*"))
+ (setq header-end (point))
+ (insert "\n"))
+ (goto-char (point-min))
+ (re-search-forward (concat "^" (regexp-quote mail-header-separator)
+ "\n"))
+ (goto-char (match-end 0))
+ (setq header-end (match-beginning 0)))
+ (cond ((equal vm-forwarding-digest-type "mime")
+ (setq boundary (vm-mime-encapsulate-messages
+ (list (car mp)) vm-forwarded-headers
+ vm-unforwarded-header-regexp))
+ (goto-char header-end)
+ (insert "MIME-Version: 1.0\n")
+ (insert (if vm-mime-avoid-folding-content-type
+ "Content-Type: multipart/digest; boundary=\""
+ "Content-Type: multipart/digest;\n\tboundary=\"")
+ boundary "\"\n")
+ (insert "Content-Transfer-Encoding: "
+ (vm-determine-proper-content-transfer-encoding
+ (point)
+ (point-max))
+ "\n"))
+ ((equal vm-forwarding-digest-type "rfc934")
(vm-rfc934-encapsulate-messages
vm-forward-list vm-forwarded-headers
vm-unforwarded-header-regexp))
@@ -533,6 +644,17 @@
(vm-no-frills-encapsulate-message
(car vm-forward-list) vm-forwarded-headers
vm-unforwarded-header-regexp)))
+ (if miming
+ (let ((b (current-buffer)))
+ (set-buffer mail-buffer)
+ (mail-text)
+ (vm-mime-attach-object b "multipart/digest"
+ (list (concat "boundary=\""
+ boundary "\"")) t)
+ (add-hook 'kill-buffer-hook
+ (list 'lambda ()
+ (list 'if (list 'eq mail-buffer '(current-buffer))
+ (list 'kill-buffer b))))))
(mail-position-on-field "To"))
(run-hooks 'vm-forward-message-hook)
(run-hooks 'vm-mail-mode-hook))))
@@ -548,20 +670,25 @@
(vm-error-if-folder-empty)
(let ((b (current-buffer)) start
(dir default-directory)
+ (layout (vm-mm-layout (car vm-message-pointer)))
(lim (vm-text-end-of (car vm-message-pointer))))
(save-restriction
(widen)
- (save-excursion
- (goto-char (vm-text-of (car vm-message-pointer)))
- (let ((case-fold-search t))
- ;; What a wonderful world it would be if mailers used a single
- ;; message encapsulation standard instead all the weird variants
- ;; It is useless to try to cover them all.
- ;; This simple rule should cover the sanest of the formats
- (if (not (re-search-forward "^Received:" lim t))
- (error "This doesn't look like a bounced message."))
- (beginning-of-line)
- (setq start (point))))
+ (if (or (not (vectorp layout))
+ (not (setq layout (vm-mime-layout-contains-type
+ layout "message/rfc822"))))
+ (save-excursion
+ (goto-char (vm-text-of (car vm-message-pointer)))
+ (let ((case-fold-search t))
+ ;; What a wonderful world it would be if mailers
+ ;; used a single message encapsulation standard
+ ;; instead of all the weird variants. It is
+ ;; useless to try to cover them all. This simple
+ ;; rule should cover the sanest of the formats
+ (if (not (re-search-forward "^Received:" lim t))
+ (error "This doesn't look like a bounced message."))
+ (beginning-of-line)
+ (setq start (point)))))
;; briefly nullify vm-mail-header-from to keep vm-mail-internal
;; from inserting another From header.
(let ((vm-mail-header-from nil))
@@ -569,7 +696,12 @@
(format "retry of bounce from %s"
(vm-su-from (car vm-message-pointer)))))
(goto-char (point-min))
- (insert-buffer-substring b start lim)
+ (if (vectorp layout)
+ (progn
+ (setq start (point))
+ (vm-mime-insert-mime-body layout)
+ (vm-mime-transfer-decode-region layout start (point)))
+ (insert-buffer-substring b start lim))
(delete-region (point) (point-max))
(goto-char (point-min))
;; delete all but pertinent headers
@@ -658,13 +790,14 @@
(vm-check-for-killed-summary)
(vm-error-if-folder-empty)
(let ((dir default-directory)
- (mp vm-message-pointer)
+ (miming (and vm-send-using-mime (equal vm-digest-send-type "mime")))
+ mp mail-buffer b
;; prefix arg doesn't have "normal" meaning here, so only call
;; vm-select-marked-or-prefixed-messages if we're using marks.
(mlist (if (eq last-command 'vm-next-command-uses-marks)
(vm-select-marked-or-prefixed-messages 0)
vm-message-list))
- start)
+ start header-end boundary)
(save-restriction
(widen)
(vm-mail-internal (format "digest from %s" (buffer-name)))
@@ -672,14 +805,36 @@
(setq vm-system-state 'forwarding
vm-forward-list mlist
default-directory dir)
- (goto-char (point-min))
- (re-search-forward (concat "^" (regexp-quote mail-header-separator)
- "\n"))
- (goto-char (match-end 0))
- (setq start (point)
- mp mlist)
+ (if miming
+ (progn
+ (setq mail-buffer (current-buffer))
+ (set-buffer (generate-new-buffer "*vm-digest-buffer*"))
+ (setq header-end (point))
+ (insert "\n")
+ (setq start (point-marker)))
+ (goto-char (point-min))
+ (re-search-forward (concat "^" (regexp-quote mail-header-separator)
+ "\n"))
+ (goto-char (match-end 0))
+ (setq start (point-marker)
+ header-end (match-beginning 0)))
(vm-unsaved-message "Building %s digest..." vm-digest-send-type)
- (cond ((equal vm-digest-send-type "rfc934")
+ (cond ((equal vm-digest-send-type "mime")
+ (setq boundary (vm-mime-encapsulate-messages
+ mlist vm-mime-digest-headers
+ vm-mime-digest-discard-header-regexp))
+ (goto-char header-end)
+ (insert "MIME-Version: 1.0\n")
+ (insert (if vm-mime-avoid-folding-content-type
+ "Content-Type: multipart/digest; boundary=\""
+ "Content-Type: multipart/digest;\n\tboundary=\"")
+ boundary "\"\n")
+ (insert "Content-Transfer-Encoding: "
+ (vm-determine-proper-content-transfer-encoding
+ (point)
+ (point-max))
+ "\n"))
+ ((equal vm-digest-send-type "rfc934")
(vm-rfc934-encapsulate-messages
mlist vm-rfc934-digest-headers
vm-rfc934-digest-discard-header-regexp))
@@ -701,6 +856,17 @@
(center-line)
(forward-char 1)))
(setq mp (cdr mp)))))
+ (if miming
+ (let ((b (current-buffer)))
+ (set-buffer mail-buffer)
+ (mail-text)
+ (vm-mime-attach-object b "multipart/digest"
+ (list (concat "boundary=\""
+ boundary "\"")) t)
+ (add-hook 'kill-buffer-hook
+ (list 'lambda ()
+ (list 'if (list 'eq mail-buffer '(current-buffer))
+ (list 'kill-buffer b))))))
(mail-position-on-field "To")
(message "Building %s digest... done" vm-digest-send-type)))
(run-hooks 'vm-send-digest-hook)
@@ -718,6 +884,12 @@
(let ((vm-digest-send-type "rfc1153"))
(vm-send-digest preamble)))
+(defun vm-send-mime-digest (&optional preamble)
+ "Like vm-send-digest but always sends an MIME (multipart/digest) digest."
+ (interactive "P")
+ (let ((vm-digest-send-type "mime"))
+ (vm-send-digest preamble)))
+
(defun vm-continue-composing-message (&optional not-picky)
"Find and select the most recently used mail composition buffer.
If the selected buffer is already a Mail mode buffer then it is
@@ -753,6 +925,14 @@
'(vm-continue-composing-message composing-message)))
(message "No composition buffers found"))))
+(defun vm-mail-to-mailto-url (url)
+ (let ((address (car (vm-parse url "^mailto:\\(.+\\)"))))
+ (vm-select-folder-buffer)
+ (vm-check-for-killed-summary)
+ (vm-mail-internal nil address)
+ (run-hooks 'vm-mail-hook)
+ (run-hooks 'vm-mail-mode-hook)))
+
;; to quiet the v19 byte compiler
(defvar mail-mode-map)
(defvar mail-aliases)
@@ -780,7 +960,7 @@
(nconc vm-mail-mode-map mail-mode-map)
(setq vm-mail-mode-map-parented t))))
(setq vm-mail-buffer folder-buffer
- mode-popup-menu (and vm-use-menus
+ mode-popup-menu (and vm-use-menus vm-popup-menu-on-mouse-3
(vm-menu-support-possible-p)
(vm-menu-mode-menu)))
;; sets up popup menu for FSF Emacs
@@ -852,6 +1032,8 @@
vm-send-rfc934-digest-other-frame
vm-send-rfc1153-digest
vm-send-rfc1153-digest-other-frame
+ vm-send-mime-digest
+ vm-send-mime-digest-other-frame
vm-forward-message
vm-forward-message-other-frame
vm-forward-message-all-headers
@@ -985,3 +1167,14 @@
(vm-send-rfc1153-digest prefix))
(if (vm-multiple-frames-possible-p)
(vm-set-hooks-for-frame-deletion)))
+
+(defun vm-send-mime-digest-other-frame (&optional prefix)
+ "Like vm-send-mime-digest, but run in a newly created frame."
+ (interactive "P")
+ (if (vm-multiple-frames-possible-p)
+ (vm-goto-new-frame 'composition))
+ (let ((vm-frame-per-composition nil)
+ (vm-search-other-frames nil))
+ (vm-send-mime-digest prefix))
+ (if (vm-multiple-frames-possible-p)
+ (vm-set-hooks-for-frame-deletion)))
diff -r ac1f612d5250 -r 859a2309aef8 lisp/vm/vm-save.el
--- a/lisp/vm/vm-save.el Mon Aug 13 08:49:44 2007 +0200
+++ b/lisp/vm/vm-save.el Mon Aug 13 08:50:05 2007 +0200
@@ -142,7 +142,7 @@
(intern (buffer-name) vm-buffers-needing-display-update)
(vm-update-summary-and-mode-line))
(if (zerop archived)
- (message "No messages archived")
+ (message "No messages were archived")
(message "%d message%s archived"
archived (if (= 1 archived) "" "s")))))
@@ -486,7 +486,7 @@
(let ((pop-up-windows (and pop-up-windows (eq vm-mutable-windows t))))
(call-process-region (point-min) (point-max)
(or shell-file-name "sh")
- nil buffer nil "-c" command)))
+ nil buffer nil shell-command-switch command)))
(setq mlist (cdr mlist)))
(set-buffer buffer)
(if (not (zerop (buffer-size)))
diff -r ac1f612d5250 -r 859a2309aef8 lisp/vm/vm-search.el
--- a/lisp/vm/vm-search.el Mon Aug 13 08:49:44 2007 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,121 +0,0 @@
-;;; Incremental search through a mail folder (for Lucid and FSF Emacs 19)
-;;; Copyright (C) 1994 Kyle E. Jones
-;;;
-;;; This program is free software; you can redistribute it and/or modify
-;;; it under the terms of the GNU General Public License as published by
-;;; the Free Software Foundation; either version 1, or (at your option)
-;;; any later version.
-;;;
-;;; This program is distributed in the hope that it will be useful,
-;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;;; GNU General Public License for more details.
-;;;
-;;; You should have received a copy of the GNU General Public License
-;;; along with this program; if not, write to the Free Software
-;;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-(provide 'vm-search)
-
-(defun vm-isearch-forward (&optional arg)
- "Incrementally search forward through the current folder's messages.
-Usage is identical to the standard Emacs incremental search.
-When the search terminates the message containing point will be selected.
-
-If the variable vm-search-using-regexps is non-nil, regular expressions
-are understood; nil means the search will be for the input string taken
-literally. Specifying a prefix ARG interactively toggles the value of
-vm-search-using-regexps for this search."
- (interactive "P")
- (let ((vm-search-using-regexps
- (if arg (not vm-search-using-regexps) vm-search-using-regexps)))
- (vm-isearch t)))
-
-(defun vm-isearch-backward (&optional arg)
- "Incrementally search backward through the current folder's messages.
-Usage is identical to the standard Emacs incremental search.
-When the search terminates the message containing point will be selected.
-
-If the variable vm-search-using-regexps is non-nil, regular expressions
-are understood; nil means the search will be for the input string taken
-literally. Specifying a prefix ARG interactively toggles the value of
-vm-search-using-regexps for this search."
- (interactive "P")
- (let ((vm-search-using-regexps
- (if arg (not vm-search-using-regexps) vm-search-using-regexps)))
- (vm-isearch nil)))
-
-(defun vm-isearch (forward)
- (vm-follow-summary-cursor)
- (vm-select-folder-buffer)
- (vm-check-for-killed-summary)
- (vm-error-if-folder-empty)
- (vm-error-if-virtual-folder)
- (vm-display (current-buffer) t '(vm-isearch-forward vm-isearch-backward)
- (list this-command 'searching-message))
- (let ((clip-head (point-min))
- (clip-tail (point-max))
- (old-vm-message-pointer vm-message-pointer))
- (unwind-protect
- (progn (select-window (vm-get-visible-buffer-window (current-buffer)))
- (widen)
- (add-hook 'pre-command-hook 'vm-isearch-widen)
- ;; order is significant, we want to narrow after
- ;; the update
- (add-hook 'post-command-hook 'vm-isearch-narrow)
- (add-hook 'post-command-hook 'vm-isearch-update)
- (isearch-mode forward vm-search-using-regexps nil t)
- (vm-isearch-update)
- (if (not (eq vm-message-pointer old-vm-message-pointer))
- (progn
- (vm-record-and-change-message-pointer
- old-vm-message-pointer vm-message-pointer)
- (vm-update-summary-and-mode-line)
- ;; vm-show-current-message only adjusts (point-max),
- ;; it doesn't change (point-min).
- (widen)
- (narrow-to-region
- (if (< (point) (vm-vheaders-of (car vm-message-pointer)))
- (vm-start-of (car vm-message-pointer))
- (vm-vheaders-of (car vm-message-pointer)))
- (vm-text-end-of (car vm-message-pointer)))
- (vm-display nil nil
- '(vm-isearch-forward vm-isearch-backward)
- '(reading-message))
- ;; turn the unwinds into a noop
- (setq old-vm-message-pointer vm-message-pointer)
- (setq clip-head (point-min))
- (setq clip-tail (point-max)))))
- (remove-hook 'pre-command-hook 'vm-isearch-widen)
- (remove-hook 'post-command-hook 'vm-isearch-update)
- (remove-hook 'post-command-hook 'vm-isearch-narrow)
- (narrow-to-region clip-head clip-tail)
- (setq vm-message-pointer old-vm-message-pointer))))
-
-(defun vm-isearch-widen ()
- (if (eq major-mode 'vm-mode)
- (widen)))
-
-(defun vm-isearch-narrow ()
- (if (eq major-mode 'vm-mode)
- (narrow-to-region
- (if (< (point) (vm-vheaders-of (car vm-message-pointer)))
- (vm-start-of (car vm-message-pointer))
- (vm-vheaders-of (car vm-message-pointer)))
- (vm-text-end-of (car vm-message-pointer)))))
-
-(defun vm-isearch-update ()
- (if (eq major-mode 'vm-mode)
- (if (and (>= (point) (vm-start-of (car vm-message-pointer)))
- (<= (point) (vm-end-of (car vm-message-pointer))))
- nil
- (let ((mp vm-message-list)
- (point (point)))
- (while mp
- (if (and (>= point (vm-start-of (car mp)))
- (<= point (vm-end-of (car mp))))
- (setq vm-message-pointer mp mp nil)
- (setq mp (cdr mp))))
- (setq vm-need-summary-pointer-update t)
- (intern (buffer-name) vm-buffers-needing-display-update)
- (vm-update-summary-and-mode-line)))))
diff -r ac1f612d5250 -r 859a2309aef8 lisp/vm/vm-startup.el
--- a/lisp/vm/vm-startup.el Mon Aug 13 08:49:44 2007 +0200
+++ b/lisp/vm/vm-startup.el Mon Aug 13 08:50:05 2007 +0200
@@ -1,5 +1,5 @@
;;; Entry points for VM
-;;; Copyright (C) 1994, 1995 Kyle E. Jones
+;;; Copyright (C) 1994-1997 Kyle E. Jones
;;;
;;; This program is free software; you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
@@ -72,6 +72,7 @@
(vm-unsaved-message "Reading %s... done" file))))))))
(set-buffer folder-buffer)
(vm-check-for-killed-summary)
+ (vm-check-for-killed-presentation)
;; If the buffer's not modified then we know that there can be no
;; messages in the folder that are not on disk.
(or (buffer-modified-p) (setq vm-messages-not-on-disk 0))
@@ -85,7 +86,7 @@
;; save file contains information the user might not
;; want overwritten, i.e. recover-file might be
;; desired. What we want to avoid is an auto-save.
- ;; Making the folder read only will keep it
+ ;; Making the folder read only will keep
;; subsequent actions from modifying the buffer in a
;; way that triggers an auto save.
;;
@@ -120,26 +121,20 @@
;; make a new frame if the user wants one. reuse an
;; existing frame that is showing this folder.
(if (and full-startup
- vm-frame-per-folder
- (vm-multiple-frames-possible-p)
;; this so that "emacs -f vm" doesn't create a frame.
this-command)
- (let ((w (or (vm-get-buffer-window (current-buffer))
- ;; summary == folder for the purpose
- ;; of frame reuse.
- (and vm-summary-buffer
- (vm-get-buffer-window vm-summary-buffer)))))
- (if (null w)
- (progn
- (if folder
- (vm-goto-new-frame 'folder)
- (vm-goto-new-frame 'primary-folder 'folder))
- (vm-set-hooks-for-frame-deletion))
- (save-excursion
- (select-window w)
- (and vm-warp-mouse-to-new-frame
- (vm-warp-mouse-to-frame-maybe (vm-window-frame w)))))))
-
+ (apply 'vm-goto-new-folder-frame-maybe
+ (if folder '(folder) '(primary-folder folder))))
+
+ ;; raise frame if requested and apply startup window
+ ;; configuration.
+ (if full-startup
+ (progn
+ (if vm-raise-frame-at-startup
+ (vm-raise-frame))
+ (vm-display nil nil (list this-command)
+ (list (or this-command 'vm) 'startup))))
+
;; say this NOW, before the non-previewers read a message,
;; alter the new message count and confuse themselves.
(if full-startup
@@ -150,8 +145,6 @@
(if vm-message-list
(vm-preview-current-message)
(vm-update-summary-and-mode-line))
- (if full-startup
- (vm-display (current-buffer) t nil nil))
;; need to do this after any frame creation because the
;; toolbar sets frame-specific height and width specifiers.
(and (vm-toolbar-support-possible-p) vm-use-toolbar
@@ -163,23 +156,29 @@
(vm-menu-install-visited-folders-menu))
(if full-startup
- (save-excursion
- (vm-display (current-buffer) t nil nil)
- (if (and (vm-should-generate-summary)
+ (progn
+ (if (and (vm-should-generate-summary)
;; don't generate a summary if recover-file is
;; likely to happen, since recover-file does
;; nothing useful in a summary buffer.
(not preserve-auto-save-file))
- (vm-summarize t))
- ;; People were confused that (vm) behaved differently
- ;; than M-x vm. We used to list all the various VM
- ;; startup commands here, but now we just accept any
- ;; command and treat it as if it were VM. It's
- ;; probably just as well, since any command that
- ;; calls VM probably does want the window
- ;; configuration to be setup.
- (vm-display nil nil (list this-command)
- (list (or this-command 'vm) 'startup))))
+ (vm-summarize t nil))
+ ;; raise the summary frame if the user wants frames
+ ;; raised and if there is a summary frame.
+ (if (and vm-summary-buffer
+ vm-frame-per-summary
+ vm-raise-frame-at-startup)
+ (vm-raise-frame))
+ ;; if vm-mutable-windows is nil, the startup
+ ;; configuration can't be applied, so do
+ ;; something to get a VM buffer on the screen
+ (if vm-mutable-windows
+ (vm-display nil nil (list this-command)
+ (list (or this-command 'vm) 'startup))
+ (save-excursion
+ (switch-to-buffer (or vm-summary-buffer
+ vm-presentation-buffer
+ (current-buffer)))))))
(run-hooks 'vm-visit-folder-hook)
@@ -213,8 +212,7 @@
;; user says no.
;; Check this-command so we don't make the user wait if
;; they call vm non-interactively from some other program.
- (if (and (not vm-inhibit-startup-message)
- (not vm-startup-message-displayed)
+ (if (and (not vm-startup-message-displayed)
(or (memq this-command '(vm vm-visit-folder))
;; for emacs -f vm
(null last-command)))
@@ -253,7 +251,7 @@
(defun vm-mode (&optional read-only)
"Major mode for reading mail.
-This is VM 5.96 (beta).
+This is VM 6.13.
Commands:
h - summarize folder contents
@@ -293,7 +291,7 @@
@ - digestify and mail entire folder contents (the folder is not modified)
* - burst a digest into individual messages, and append and assimilate these
- message into the current folder.
+ messages into the current folder.
G - sort messages by various keys
@@ -322,14 +320,16 @@
M U - unmark the current message
M m - mark all messages
M u - unmark all messages
- M C - mark messages matches by a virtual folder selector
- M c - unmark messages matches by a virtual folder selector
+ M C - mark messages matched by a virtual folder selector
+ M c - unmark messages matched by a virtual folder selector
M T - mark thread tree rooted at the current message
M t - unmark thread tree rooted at the current message
M S - mark messages with the same subject as the current message
M s - unmark messages with the same subject as the current message
M A - mark messages with the same author as the current message
M a - unmark messages with the same author as the current message
+ M R - mark messages within the point/mark region in the summary
+ M r - unmark messages within the point/mark region in the summary
M ? - partial help for mark commands
@@ -376,17 +376,21 @@
vm-arrived-message-hook
vm-arrived-messages-hook
vm-auto-center-summary
+ vm-auto-decode-mime-messages
+ vm-auto-displayed-mime-content-types
vm-auto-folder-alist
vm-auto-folder-case-fold-search
vm-auto-get-new-mail
vm-auto-next-message
vm-berkeley-mail-compatibility
+ vm-burst-digest-messages-inherit-labels
vm-check-folder-types
- vm-convert-folder-types
vm-circular-folders
vm-confirm-new-folders
vm-confirm-quit
+ vm-convert-folder-types
vm-crash-box
+ vm-crash-box-suffix
vm-default-folder-type
vm-delete-after-archiving
vm-delete-after-bursting
@@ -397,6 +401,7 @@
vm-digest-preamble-format
vm-digest-send-type
vm-display-buffer-hook
+ vm-display-using-mime
vm-edit-message-hook
vm-folder-directory
vm-folder-read-only
@@ -406,8 +411,11 @@
vm-forwarding-digest-type
vm-forwarding-subject-format
vm-frame-parameter-alist
+ vm-frame-per-completion
vm-frame-per-composition
+ vm-frame-per-edit
vm-frame-per-folder
+ vm-frame-per-summary
vm-highlighted-header-face
vm-highlighted-header-regexp
vm-honor-page-delimiters
@@ -416,32 +424,52 @@
vm-included-text-discard-header-regexp
vm-included-text-headers
vm-included-text-prefix
- vm-inhibit-startup-message
vm-invisible-header-regexp
vm-jump-to-new-messages
vm-jump-to-unread-messages
+ vm-keep-crash-boxes
vm-keep-sent-messages
- vm-keep-crash-boxes
vm-mail-header-from
vm-mail-mode-hook
+ vm-make-crash-box-name
+ vm-make-spool-file-name
+ vm-mime-8bit-composition-charset
+ vm-mime-8bit-text-transfer-encoding
+ vm-mime-alternative-select-method
+ vm-mime-attachment-auto-type-alist
+ vm-mime-attachment-save-directory
+ vm-mime-avoid-folding-content-type
+ vm-mime-base64-decoder-program
+ vm-mime-base64-decoder-switches
+ vm-mime-base64-encoder-program
+ vm-mime-base64-encoder-switches
+ vm-mime-button-face
+ vm-mime-digest-discard-header-regexp
+ vm-mime-digest-headers
+ vm-mime-display-function
+ vm-mime-external-content-types-alist
+ vm-mime-internal-content-types
+ vm-mime-max-message-size
vm-mode-hook
vm-mosaic-program
vm-move-after-deleting
+ vm-move-after-killing
vm-move-after-undeleting
vm-move-messages-physically
+ vm-mutable-frames
vm-mutable-windows
- vm-mutable-frames
vm-netscape-program
- vm-options-file
vm-pop-md5-program
+ vm-popup-menu-on-mouse-3
+ vm-preferences-file
vm-preview-lines
vm-preview-read-messages
vm-primary-inbox
vm-quit-hook
vm-recognize-pop-maildrops
vm-reply-hook
+ vm-reply-ignored-addresses
vm-reply-ignored-reply-tos
- vm-reply-ignored-addresses
vm-reply-subject-prefix
vm-resend-bounced-discard-header-regexp
vm-resend-bounced-headers
@@ -459,9 +487,11 @@
vm-select-new-message-hook
vm-select-unread-message-hook
vm-send-digest-hook
+ vm-send-using-mime
vm-skip-deleted-messages
vm-skip-read-messages
vm-spool-files
+ vm-spool-file-suffixes
vm-startup-with-summary
vm-strip-reply-headers
vm-summary-arrow
@@ -470,14 +500,16 @@
vm-summary-mode-hook
vm-summary-redo-hook
vm-summary-show-threads
- vm-summary-subject-no-newlines
vm-summary-thread-indent-level
+ vm-temp-file-directory
+ vm-tale-is-an-idiot
vm-trust-From_-with-Content-Length
vm-undisplay-buffer-hook
vm-unforwarded-header-regexp
vm-url-browser
vm-url-search-limit
vm-use-menus
+ vm-use-toolbar
vm-virtual-folder-alist
vm-virtual-mirror
vm-visible-headers
@@ -633,13 +665,15 @@
(use-local-map vm-mode-map)
(and (vm-menu-support-possible-p)
(vm-menu-install-menus))
+ (add-hook 'kill-buffer-hook 'vm-garbage-collect-folder)
+ (add-hook 'kill-buffer-hook 'vm-garbage-collect-message)
;; save this for last in case the user interrupts.
;; an interrupt anywhere before this point will cause
;; everything to be redone next revisit.
(setq major-mode 'vm-virtual-mode)
(run-hooks 'vm-virtual-mode-hook)
;; must come after the setting of major-mode
- (setq mode-popup-menu (and vm-use-menus
+ (setq mode-popup-menu (and vm-use-menus vm-popup-menu-on-mouse-3
(vm-menu-support-possible-p)
(vm-menu-mode-menu)))
(setq blurb (vm-emit-totals-blurb))
@@ -651,35 +685,37 @@
(message blurb)))
;; make a new frame if the user wants one. reuse an
;; existing frame that is showing this folder.
- (if (and vm-frame-per-folder (vm-multiple-frames-possible-p))
- (let ((w (or (vm-get-buffer-window (current-buffer))
- ;; summary == folder for the purpose
- ;; of frame reuse.
- (and vm-summary-buffer
- (vm-get-buffer-window (current-buffer))))))
- (if (null w)
- (vm-goto-new-frame 'folder)
- (save-excursion
- (select-window w)
- (and vm-warp-mouse-to-new-frame
- (vm-warp-mouse-to-frame-maybe (vm-window-frame w)))))
- (vm-set-hooks-for-frame-deletion)))
- (vm-display (current-buffer) t nil nil)
+ (vm-goto-new-folder-frame-maybe 'folder)
+ (if vm-raise-frame-at-startup
+ (vm-raise-frame))
+ (vm-display nil nil (list this-command) (list this-command 'startup))
(and (vm-toolbar-support-possible-p) vm-use-toolbar
(vm-toolbar-install-toolbar))
(if first-time
- (if (vm-should-generate-summary)
- (progn (vm-summarize t)
- (message blurb))))
- (vm-display nil nil '(vm-visit-virtual-folder
- vm-visit-virtual-folder-other-frame
- vm-visit-virtual-folder-other-window
- vm-create-virtual-folder
- vm-apply-virtual-folder)
- (list this-command 'startup))
+ (progn
+ (if (vm-should-generate-summary)
+ (progn (vm-summarize t nil)
+ (message blurb)))
+ ;; raise the summary frame if the user wants frames
+ ;; raised and if there is a summary frame.
+ (if (and vm-summary-buffer
+ vm-frame-per-summary
+ vm-raise-frame-at-startup)
+ (vm-raise-frame))
+ ;; if vm-mutable-windows is nil, the startup
+ ;; configuration can't be applied, so do
+ ;; something to get a VM buffer on the screen
+ (if vm-mutable-windows
+ (vm-display nil nil (list this-command)
+ (list (or this-command 'vm) 'startup))
+ (save-excursion
+ (switch-to-buffer (or vm-summary-buffer
+ vm-presentation-buffer
+ (current-buffer)))))))
+
;; check interactive-p so as not to bog the user down if they
;; run this function from within another function.
- (and (interactive-p) (not vm-inhibit-startup-message)
+ (and (interactive-p)
(not vm-startup-message-displayed)
(vm-display-startup-message)
(message blurb))))
@@ -768,6 +804,8 @@
'vm-arrived-message-hook
'vm-arrived-messages-hook
'vm-auto-center-summary
+ 'vm-auto-decode-mime-messages
+ 'vm-auto-displayed-mime-content-types
;; don't send this by default, might be personal stuff in here.
;; 'vm-auto-folder-alist
'vm-auto-folder-case-fold-search
@@ -780,6 +818,7 @@
'vm-confirm-quit
'vm-convert-folder-types
'vm-crash-box
+ 'vm-crash-box-suffix
'vm-default-folder-type
'vm-delete-after-archiving
'vm-delete-after-bursting
@@ -791,6 +830,7 @@
'vm-digest-preamble-format
'vm-digest-send-type
'vm-display-buffer-hook
+ 'vm-display-using-mime
'vm-edit-message-hook
'vm-edit-message-mode
'vm-flush-interval
@@ -802,8 +842,11 @@
'vm-forwarding-digest-type
'vm-forwarding-subject-format
'vm-frame-parameter-alist
+ 'vm-frame-per-completion
'vm-frame-per-composition
+ 'vm-frame-per-edit
'vm-frame-per-folder
+ 'vm-frame-per-summary
'vm-highlight-url-face
'vm-highlighted-header-regexp
'vm-honor-page-delimiters
@@ -812,7 +855,6 @@
'vm-included-text-discard-header-regexp
'vm-included-text-headers
'vm-included-text-prefix
- 'vm-inhibit-startup-message
'vm-init-file
'vm-invisible-header-regexp
'vm-jump-to-new-messages
@@ -821,7 +863,26 @@
'vm-keep-sent-messages
'vm-mail-header-from
'vm-mail-hook
+ 'vm-make-crash-box-name
+ 'vm-make-spool-file-name
'vm-mail-mode-hook
+ 'vm-mime-8bit-composition-charset
+ 'vm-mime-8bit-text-transfer-encoding
+ 'vm-mime-alternative-select-method
+ 'vm-mime-attachment-auto-type-alist
+ 'vm-mime-attachment-save-directory
+ 'vm-mime-avoid-folding-content-type
+ 'vm-mime-base64-decoder-program
+ 'vm-mime-base64-decoder-switches
+ 'vm-mime-base64-encoder-program
+ 'vm-mime-base64-encoder-switches
+ 'vm-mime-button-face
+ 'vm-mime-digest-discard-header-regexp
+ 'vm-mime-digest-headers
+ 'vm-mime-display-function
+ 'vm-mime-external-content-types-alist
+ 'vm-mime-internal-content-types
+ 'vm-mime-max-message-size
'vm-mode-hook
'vm-mode-hooks
'vm-mosaic-program
@@ -832,8 +893,9 @@
'vm-mutable-frames
'vm-mutable-windows
'vm-netscape-program
- 'vm-options-file
'vm-pop-md5-program
+ 'vm-popup-menu-on-mouse-3
+ 'vm-preferences-file
'vm-preview-lines
'vm-preview-read-messages
'vm-primary-inbox
@@ -859,10 +921,12 @@
'vm-select-new-message-hook
'vm-select-unread-message-hook
'vm-send-digest-hook
+ 'vm-send-using-mime
'vm-skip-deleted-messages
'vm-skip-read-messages
;; don't send vm-spool-files by default, might contain passwords
;; 'vm-spool-files
+ 'vm-spool-file-suffixes
'vm-startup-with-summary
'vm-strip-reply-headers
'vm-summary-format
@@ -871,17 +935,18 @@
'vm-summary-mode-hooks
'vm-summary-redo-hook
'vm-summary-show-threads
- 'vm-summary-subject-no-newlines
'vm-summary-thread-indent-level
'vm-summary-uninteresting-senders
'vm-summary-uninteresting-senders-arrow
'vm-tale-is-an-idiot
+ 'vm-temp-file-directory
'vm-trust-From_-with-Content-Length
'vm-undisplay-buffer-hook
'vm-unforwarded-header-regexp
'vm-url-browser
'vm-url-search-limit
'vm-use-menus
+ 'vm-use-toolbar
'vm-virtual-folder-alist
'vm-virtual-mirror
'vm-visible-headers
@@ -909,7 +974,22 @@
(setq vm-init-file-loaded t)
(vm-display nil nil '(vm-load-init-file) '(vm-load-init-file)))
+(defun vm-check-emacs-version ()
+ (cond ((and (vm-xemacs-p)
+ (or (< emacs-major-version 19)
+ (and (= emacs-major-version 19)
+ (< emacs-minor-version 14))))
+ (error "VM %s must be run on XEmacs 19.14 or a later version."
+ vm-version))
+ ((and (vm-fsfemacs-19-p)
+ (or (< emacs-major-version 19)
+ (and (= emacs-major-version 19)
+ (< emacs-minor-version 34))))
+ (error "VM %s must be run on Emacs 19.34 or a later version."
+ vm-version))))
+
(defun vm-session-initialization ()
+ (vm-check-emacs-version)
;; If this is the first time VM has been run in this Emacs session,
;; do some necessary preparations.
(if (or (not (boundp 'vm-session-beginning))
diff -r ac1f612d5250 -r 859a2309aef8 lisp/vm/vm-summary.el
--- a/lisp/vm/vm-summary.el Mon Aug 13 08:49:44 2007 +0200
+++ b/lisp/vm/vm-summary.el Mon Aug 13 08:50:05 2007 +0200
@@ -1,5 +1,5 @@
;;; Summary gathering and formatting routines for VM
-;;; Copyright (C) 1989, 1990, 1993, 1994, 1995 Kyle E. Jones
+;;; Copyright (C) 1989-1995 Kyle E. Jones
;;;
;;; This program is free software; you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
@@ -22,7 +22,7 @@
major-mode 'vm-summary-mode
mode-line-format vm-mode-line-format
;; must come after the setting of major-mode
- mode-popup-menu (and vm-use-menus
+ mode-popup-menu (and vm-use-menus vm-popup-menu-on-mouse-3
(vm-menu-support-possible-p)
(vm-menu-mode-menu))
buffer-read-only t
@@ -38,7 +38,8 @@
(use-local-map vm-summary-mode-map)
(and (vm-menu-support-possible-p)
(vm-menu-install-menus))
- (and (vm-mouse-support-possible-p)
+ (and vm-mouse-track-summary
+ (vm-mouse-support-possible-p)
(vm-mouse-xemacs-mouse-p)
(add-hook 'mode-motion-hook 'mode-motion-highlight-line))
(if (or vm-frame-per-folder vm-frame-per-summary)
@@ -50,12 +51,12 @@
(fset 'vm-summary-mode 'vm-mode)
(put 'vm-summary-mode 'mode-class 'special)
-(defun vm-summarize (&optional display)
+(defun vm-summarize (&optional display raise)
"Summarize the contents of the folder in a summary buffer.
The format is as described by the variable vm-summary-format. Generally
one line per message is most pleasing to the eye but this is not
mandatory."
- (interactive "p")
+ (interactive "p\np")
(vm-select-folder-buffer)
(vm-check-for-killed-summary)
(if (null vm-summary-buffer)
@@ -79,20 +80,11 @@
(vm-set-summary-redo-start-point t)))
(if display
(save-excursion
- (if vm-frame-per-summary
- (let ((w (vm-get-buffer-window vm-summary-buffer)))
- (if (null w)
- (progn
- (vm-goto-new-frame 'summary)
- (vm-set-hooks-for-frame-deletion))
- (save-excursion
- (select-window w)
- (and vm-warp-mouse-to-new-frame
- (vm-warp-mouse-to-frame-maybe (vm-window-frame w)))))))
+ (vm-goto-new-summary-frame-maybe)
(vm-display vm-summary-buffer t
'(vm-summarize
vm-summarize-other-frame)
- (list this-command))
+ (list this-command) (not raise))
;; need to do this after any frame creation because the
;; toolbar sets frame-specific height and width specifiers.
(set-buffer vm-summary-buffer)
@@ -118,7 +110,8 @@
;; Just for laughs, make the update interval vary.
(modulus (+ (% (vm-abs (random)) 11) 10))
(mouse-track-func
- (and (vm-mouse-support-possible-p)
+ (and vm-mouse-track-summary
+ (vm-mouse-support-possible-p)
(vm-mouse-fsfemacs-mouse-p)
(function vm-mouse-set-mouse-track-highlight)))
summary)
@@ -188,7 +181,8 @@
(marker-buffer (vm-su-start-of m)))
(let ((modified (buffer-modified-p))
(mouse-track-func
- (and (vm-mouse-support-possible-p)
+ (and vm-mouse-track-summary
+ (vm-mouse-support-possible-p)
(vm-mouse-fsfemacs-mouse-p)
(function vm-mouse-set-mouse-track-highlight)))
summary)
@@ -203,7 +197,7 @@
(goto-char (vm-su-start-of m))
(setq selected (not (looking-at vm-summary-no-=>)))
;; We do a little dance to update the text in
- ;; order to make the markets in the text do
+ ;; order to make the markers in the text do
;; what we want.
;;
;; 1. We need to avoid having the su-start-of
@@ -244,7 +238,8 @@
(if vm-summary-buffer
(let ((w (vm-get-visible-buffer-window vm-summary-buffer))
(mouse-track-func
- (and (vm-mouse-support-possible-p)
+ (and vm-mouse-track-summary
+ (vm-mouse-support-possible-p)
(vm-mouse-fsfemacs-mouse-p)
(function vm-mouse-set-mouse-track-highlight)))
(old-window nil))
@@ -299,6 +294,13 @@
(if (and vm-summary-overlay (extent-end-position vm-summary-overlay))
(set-extent-endpoints vm-summary-overlay start end)
(setq vm-summary-overlay (make-extent start end))
+ ;; the reason this isn't needed under FSF Emacs is
+ ;; that insert-before-marker also inserts before
+ ;; overlays! so a summary update of an entry just
+ ;; before this overlay in the summary buffer won't
+ ;; leak into the overlay, but it _will_ leak into an
+ ;; XEmacs extent.
+ (set-extent-property vm-summary-overlay 'start-open t)
(set-extent-property vm-summary-overlay 'detachable nil)
(set-extent-property vm-summary-overlay 'face face)))))
@@ -493,7 +495,7 @@
(put format-variable 'vm-compiled-format format)
(put format-variable 'vm-format-sexp (if list (cons 'list list) sexp))))
-(defun vm-get-header-contents (message header-name-regexp)
+(defun vm-get-header-contents (message header-name-regexp &optional clump-sep)
(let ((contents nil)
regexp)
(setq regexp (concat "^\\(" header-name-regexp "\\)")
@@ -504,12 +506,13 @@
(widen)
(goto-char (vm-headers-of message))
(let ((case-fold-search t))
- (while (and (re-search-forward regexp (vm-text-of message) t)
+ (while (and (or (null contents) clump-sep)
+ (re-search-forward regexp (vm-text-of message) t)
(save-excursion (goto-char (match-beginning 0))
(vm-match-header)))
(if contents
(setq contents
- (concat contents ", " (vm-matched-header-contents)))
+ (concat contents clump-sep (vm-matched-header-contents)))
(setq contents (vm-matched-header-contents))))))
contents )))
@@ -612,18 +615,19 @@
nil
(save-excursion
(set-buffer (vm-buffer-of (vm-real-message-of message)))
- (save-restriction
- (widen)
- (goto-char (vm-start-of message))
- (let ((case-fold-search nil))
- (if (or (looking-at
- ;; special case this so that the "remote from blah"
- ;; isn't included.
- "From [^ \t\n]*[ \t]+\\([^ \t\n].*\\) remote from .*")
- (looking-at "From [^ \t\n]*[ \t]+\\([^ \t\n].*\\)"))
- (vm-buffer-substring-no-properties
- (match-beginning 1)
- (match-end 1))))))))
+ (save-excursion
+ (save-restriction
+ (widen)
+ (goto-char (vm-start-of message))
+ (let ((case-fold-search nil))
+ (if (or (looking-at
+ ;; special case this so that the "remote from blah"
+ ;; isn't included.
+ "From [^ \t\n]*[ \t]+\\([^ \t\n].*\\) remote from .*")
+ (looking-at "From [^ \t\n]*[ \t]+\\([^ \t\n].*\\)"))
+ (vm-buffer-substring-no-properties
+ (match-beginning 1)
+ (match-end 1)))))))))
(defun vm-parse-date (date)
(let ((weekday "")
@@ -779,20 +783,21 @@
nil
(save-excursion
(set-buffer (vm-buffer-of message))
- (save-restriction
- (widen)
- (goto-char (vm-start-of message))
- (let ((case-fold-search nil))
- (if (looking-at "From \\([^ \t\n]+\\)")
- (vm-buffer-substring-no-properties
- (match-beginning 1)
- (match-end 1))))))))
+ (save-excursion
+ (save-restriction
+ (widen)
+ (goto-char (vm-start-of message))
+ (let ((case-fold-search nil))
+ (if (looking-at "From \\([^ \t\n]+\\)")
+ (vm-buffer-substring-no-properties
+ (match-beginning 1)
+ (match-end 1)))))))))
(defun vm-su-do-author (m)
(let ((full-name (vm-get-header-contents m "Full-Name:"))
- (from (or (vm-get-header-contents m "From:")
+ (from (or (vm-get-header-contents m "From:" ", ")
(vm-grok-From_-author m)))
- pair)
+ pair i)
(if (and full-name (string-match "^[ \t]*$" full-name))
(setq full-name nil))
(if (null from)
@@ -806,6 +811,9 @@
(if (string-match "\\`\"\\([^\"]+\\)\"\\'" full-name)
(setq full-name
(substring full-name (match-beginning 1) (match-end 1))))
+ (setq full-name (vm-decode-mime-encoded-words-maybe full-name))
+ (while (setq i (string-match "\n" full-name i))
+ (aset full-name i ?\ ))
(vm-set-full-name-of m full-name)
(vm-set-from-of m from)))
@@ -862,37 +870,29 @@
(funcall vm-chop-full-name-function address)))
(defun vm-su-do-recipients (m)
- (let ((mail-use-rfc822 t) names addresses to cc all list)
- (setq to (or (vm-get-header-contents m "To:")
- (vm-get-header-contents m "Apparently-To:")
+ (let ((mail-use-rfc822 t) i names addresses to cc all list full-name)
+ (setq to (or (vm-get-header-contents m "To:" ", ")
+ (vm-get-header-contents m "Apparently-To:" ", ")
;; desperation....
(user-login-name))
- cc (vm-get-header-contents m "Cc:")
+ cc (vm-get-header-contents m "Cc:" ", ")
all to
all (if all (concat all ", " cc) cc)
addresses (rfc822-addresses all))
(setq list (vm-parse-addresses all))
(while list
- (cond ((string= (car list) ""))
- ((string-match "^\\(\"?\\([^<]+[^ \t\n\"]\\)\"?[ \t\n]+\\)?<\\([^>]+\\)>"
- (car list))
- (if (match-beginning 2)
- (setq names
- (cons
- (substring (car list) (match-beginning 2)
- (match-end 2))
- names))
- (setq names
- (cons
- (substring (car list) (match-beginning 3)
- (match-end 3))
- names))))
- ((string-match "[\000-\177]*(\\([^)]+\\))[\000-\177]*" (car list))
- (setq names
- (cons (substring (car list) (match-beginning 1)
- (match-end 1))
- names)))
- (t (setq names (cons (car list) names))))
+ ;; Just like vm-su-do-author:
+ (setq full-name (or (nth 0 (funcall vm-chop-full-name-function
+ (car list)))
+ (car list)))
+ ;; If double quoted are around the full name, fish the name out.
+ (if (string-match "\\`\"\\([^\"]+\\)\"\\'" full-name)
+ (setq full-name
+ (substring full-name (match-beginning 1) (match-end 1))))
+ (setq full-name (vm-decode-mime-encoded-words-maybe full-name))
+ (while (setq i (string-match "\n" full-name i))
+ (aset full-name i ?\ ))
+ (setq names (cons full-name names))
(setq list (cdr list)))
(setq names (nreverse names)) ; added by jwz for fixed vm-parse-addresses
(vm-set-to-of m (mapconcat 'identity addresses ", "))
@@ -941,11 +941,11 @@
(or (vm-subject-of m)
(vm-set-subject-of
m
- (let ((subject (or (vm-get-header-contents m "Subject:") ""))
+ (let ((subject (or (vm-get-header-contents m "Subject:" " ") ""))
(i nil))
- (if vm-summary-subject-no-newlines
- (while (setq i (string-match "\n" subject i))
- (aset subject i ?\ )))
+ (setq subject (vm-decode-mime-encoded-words-maybe subject))
+ (while (setq i (string-match "\n" subject i))
+ (aset subject i ?\ ))
subject ))))
(defun vm-su-summary (m)
@@ -971,8 +971,8 @@
(while mp
(vm-set-summary-of (car mp) nil)
(vm-mark-for-summary-update (car mp))
- (vm-stuff-attributes (car mp))
(setq mp (cdr mp)))
+ (vm-stuff-folder-attributes nil)
(set-buffer-modified-p t)
(vm-update-summary-and-mode-line))
(vm-unsaved-message "Fixing your summary... done"))
diff -r ac1f612d5250 -r 859a2309aef8 lisp/vm/vm-thread.el
--- a/lisp/vm/vm-thread.el Mon Aug 13 08:49:44 2007 +0200
+++ b/lisp/vm/vm-thread.el Mon Aug 13 08:50:05 2007 +0200
@@ -122,8 +122,7 @@
(setq loop-sym (intern (symbol-name id-sym) vm-thread-loop-obarray))
(if (boundp loop-sym)
;; loop detected, bail...
- (setq done t
- thread-list (cdr thread-list))
+ (setq done t)
(set loop-sym t)
(if (and (boundp id-sym) (symbol-value id-sym))
(progn
@@ -212,12 +211,12 @@
(vm-set-parent-of
m
(or (let (references)
- (setq references (vm-get-header-contents m "References:"))
+ (setq references (vm-get-header-contents m "References:" " "))
(and references
(car (vm-last
(vm-parse references "[^<]*\\(<[^>]+>\\)")))))
(let (in-reply-to)
- (setq in-reply-to (vm-get-header-contents m "In-Reply-To:"))
+ (setq in-reply-to (vm-get-header-contents m "In-Reply-To:" " "))
(and in-reply-to
(car (vm-parse in-reply-to "[^<]*\\(<[^>]+>\\)"))))))))
diff -r ac1f612d5250 -r 859a2309aef8 lisp/vm/vm-toolbar.el
--- a/lisp/vm/vm-toolbar.el Mon Aug 13 08:49:44 2007 +0200
+++ b/lisp/vm/vm-toolbar.el Mon Aug 13 08:50:05 2007 +0200
@@ -1,5 +1,5 @@
;;; Toolbar related functions and commands
-;;; Copyright (C) 1995 Kyle E. Jones
+;;; Copyright (C) 1995-1997 Kyle E. Jones
;;;
;;; This program is free software; you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
@@ -118,6 +118,24 @@
(or (fboundp 'vm-toolbar-compose-command)
(fset 'vm-toolbar-compose-command 'vm-mail))
+(defvar vm-toolbar-decode-mime-button
+ [vm-toolbar-decode-mime-icon vm-toolbar-decode-mime-command
+ (vm-toolbar-can-decode-mime-p)
+ "Decode the MIME objects in the current message.\n
+The objects might be displayed immediately, or buttons might be
+displayed that you need to click on to view the object. See the
+documentation for the variables vm-mime-internal-content-types
+and vm-mime-external-content-types-alist to see how to control
+whether you see buttons or objects.\n
+The command `vm-toolbar-decode-mime-command' is run, which is normally
+bound to `vm-decode-mime-messages'.
+You can make this button run some other command by using a Lisp
+s-expression like this one in your .vm file:
+ (fset 'vm-toolbar-decode-mime-command 'some-other-command)"])
+(defvar vm-toolbar-decode-mime-icon nil)
+(or (fboundp 'vm-toolbar-decode-mime-command)
+ (fset 'vm-toolbar-decode-mime-command 'vm-decode-mime-message))
+
(defvar vm-toolbar-delete-icon nil)
(defvar vm-toolbar-undelete-icon nil)
@@ -138,7 +156,8 @@
(make-variable-buffer-local 'vm-toolbar-helper-icon)
(defvar vm-toolbar-help-button
- [vm-toolbar-helper-icon vm-toolbar-helper-command t
+ [vm-toolbar-helper-icon vm-toolbar-helper-command
+ (vm-toolbar-can-help-p)
"Don't Panic.\n
VM uses this button to offer help if you're in trouble.
Under normal circumstances, this button runs `vm-help'.\n
@@ -154,7 +173,8 @@
(call-interactively vm-toolbar-helper-command))
(defvar vm-toolbar-quit-button
- [vm-toolbar-quit-icon vm-toolbar-quit-command t
+ [vm-toolbar-quit-icon vm-toolbar-quit-command
+ (vm-toolbar-can-quit-p)
"Quit visiting this folder.\n
The command `vm-toolbar-quit-command' is run, which is normally
bound to `vm-quit'.
@@ -217,6 +237,25 @@
buffer-auto-save-file-name
buffer-file-name))))
+(defun vm-toolbar-can-decode-mime-p ()
+ (save-excursion
+ (vm-check-for-killed-folder)
+ (vm-select-folder-buffer)
+ (and
+ vm-display-using-mime
+ vm-message-pointer
+ vm-presentation-buffer
+ (not vm-mime-decoded)
+ (not (vm-mime-plain-message-p (car vm-message-pointer))))))
+
+(defun vm-toolbar-can-quit-p ()
+ (save-excursion
+ (vm-check-for-killed-folder)
+ (vm-select-folder-buffer)
+ (memq major-mode '(vm-mode vm-virtual-mode))))
+
+(fset 'vm-toolbar-can-help-p 'vm-toolbar-can-quit-p)
+
(defun vm-toolbar-update-toolbar ()
(if (and vm-message-pointer (vm-deleted-flag (car vm-message-pointer)))
(setq vm-toolbar-delete/undelete-icon vm-toolbar-undelete-icon)
@@ -224,6 +263,9 @@
(cond ((vm-toolbar-can-recover-p)
(setq vm-toolbar-helper-command 'recover-file
vm-toolbar-helper-icon vm-toolbar-recover-icon))
+ ((vm-toolbar-can-decode-mime-p)
+ (setq vm-toolbar-helper-command 'vm-decode-mime-message
+ vm-toolbar-helper-icon vm-toolbar-decode-mime-icon))
(t
(setq vm-toolbar-helper-command 'vm-help
vm-toolbar-helper-icon vm-toolbar-help-icon)))
@@ -232,6 +274,11 @@
'vm-toolbar-delete/undelete-icon
'vm-toolbar-helper-command
'vm-toolbar-helper-icon))
+ (if vm-presentation-buffer
+ (vm-copy-local-variables vm-presentation-buffer
+ 'vm-toolbar-delete/undelete-icon
+ 'vm-toolbar-helper-command
+ 'vm-toolbar-helper-icon))
(and vm-toolbar-specifier
(progn
(set-specifier vm-toolbar-specifier (cons (current-buffer) nil))
@@ -242,7 +289,14 @@
(vm-toolbar-initialize)
(let ((height (+ 4 (glyph-height (car vm-toolbar-help-icon))))
(width (+ 4 (glyph-width (car vm-toolbar-help-icon))))
+ (myframe (vm-created-this-frame-p))
toolbar )
+ ;; glyph-width and glyph-height return 0 at startup sometimes
+ ;; use reasonable values if they fail.
+ (if (= width 4)
+ (setq width 68))
+ (if (= height 4)
+ (setq height 46))
;; honor user setting of vm-toolbar if they are daring enough
;; to set it.
(if vm-toolbar
@@ -251,21 +305,29 @@
vm-toolbar toolbar))
(cond ((eq vm-toolbar-orientation 'right)
(setq vm-toolbar-specifier right-toolbar)
+ (if myframe
+ (set-specifier right-toolbar (cons (selected-frame) toolbar)))
(set-specifier right-toolbar (cons (current-buffer) toolbar))
(set-specifier right-toolbar-width
(cons (selected-frame) width)))
((eq vm-toolbar-orientation 'left)
(setq vm-toolbar-specifier left-toolbar)
+ (if myframe
+ (set-specifier left-toolbar (cons (selected-frame) toolbar)))
(set-specifier left-toolbar (cons (current-buffer) toolbar))
(set-specifier left-toolbar-width
(cons (selected-frame) width)))
((eq vm-toolbar-orientation 'bottom)
(setq vm-toolbar-specifier bottom-toolbar)
+ (if myframe
+ (set-specifier bottom-toolbar (cons (selected-frame) toolbar)))
(set-specifier bottom-toolbar (cons (current-buffer) toolbar))
(set-specifier bottom-toolbar-height
(cons (selected-frame) height)))
(t
(setq vm-toolbar-specifier top-toolbar)
+ (if myframe
+ (set-specifier top-toolbar (cons (selected-frame) toolbar)))
(set-specifier top-toolbar (cons (current-buffer) toolbar))
(set-specifier top-toolbar-height
(cons (selected-frame) height))))))
@@ -277,6 +339,7 @@
(delete/undelete . vm-toolbar-delete/undelete-button)
(file . vm-toolbar-file-button)
(help . vm-toolbar-help-button)
+ (mime . vm-toolbar-decode-mime-button)
(next . vm-toolbar-next-button)
(previous . vm-toolbar-previous-button)
(print . vm-toolbar-print-button)
@@ -307,25 +370,33 @@
((null vm-toolbar-help-icon)
(let ((tuples
(if (featurep 'xpm)
- '(
- (vm-toolbar-next-icon "next-up.xpm" "next-dn.xpm" "next-dn.xpm")
- (vm-toolbar-previous-icon "previous-up.xpm" "previous-dn.xpm"
+ (list
+ (if (>= (device-bitplanes) 16)
+ '(vm-toolbar-decode-mime-icon "mime-colorful-up.xpm"
+ "mime-colorful-dn.xpm"
+ "mime-colorful-xx.xpm")
+ '(vm-toolbar-decode-mime-icon "mime-simple-up.xpm"
+ "mime-simple-dn.xpm"
+ "mime-simple-xx.xpm"))
+ '(vm-toolbar-next-icon "next-up.xpm" "next-dn.xpm" "next-dn.xpm")
+ '(vm-toolbar-previous-icon "previous-up.xpm" "previous-dn.xpm"
"previous-dn.xpm")
- (vm-toolbar-delete-icon "delete-up.xpm" "delete-dn.xpm" "delete-dn.xpm")
- (vm-toolbar-undelete-icon "undelete-up.xpm" "undelete-dn.xpm"
+ '(vm-toolbar-delete-icon "delete-up.xpm" "delete-dn.xpm" "delete-dn.xpm")
+ '(vm-toolbar-undelete-icon "undelete-up.xpm" "undelete-dn.xpm"
"undelete-dn.xpm")
- (vm-toolbar-autofile-icon "autofile-up.xpm" "autofile-dn.xpm"
+ '(vm-toolbar-autofile-icon "autofile-up.xpm" "autofile-dn.xpm"
"autofile-dn.xpm")
- (vm-toolbar-file-icon "file-up.xpm" "file-dn.xpm" "file-dn.xpm")
- (vm-toolbar-reply-icon "reply-up.xpm" "reply-dn.xpm" "reply-dn.xpm")
- (vm-toolbar-compose-icon "compose-up.xpm" "compose-dn.xpm" "compose-dn.xpm")
- (vm-toolbar-print-icon "print-up.xpm" "print-dn.xpm" "print-dn.xpm")
- (vm-toolbar-visit-icon "visit-up.xpm" "visit-dn.xpm" "visit-dn.xpm")
- (vm-toolbar-quit-icon "quit-up.xpm" "quit-dn.xpm" "quit-dn.xpm")
- (vm-toolbar-help-icon "help-up.xpm" "help-dn.xpm" "help-dn.xpm")
- (vm-toolbar-recover-icon "recover-up.xpm" "recover-dn.xpm" "recover-dn.xpm")
+ '(vm-toolbar-file-icon "file-up.xpm" "file-dn.xpm" "file-dn.xpm")
+ '(vm-toolbar-reply-icon "reply-up.xpm" "reply-dn.xpm" "reply-dn.xpm")
+ '(vm-toolbar-compose-icon "compose-up.xpm" "compose-dn.xpm" "compose-dn.xpm")
+ '(vm-toolbar-print-icon "print-up.xpm" "print-dn.xpm" "print-dn.xpm")
+ '(vm-toolbar-visit-icon "visit-up.xpm" "visit-dn.xpm" "visit-dn.xpm")
+ '(vm-toolbar-quit-icon "quit-up.xpm" "quit-dn.xpm" "quit-dn.xpm")
+ '(vm-toolbar-help-icon "help-up.xpm" "help-dn.xpm" "help-dn.xpm")
+ '(vm-toolbar-recover-icon "recover-up.xpm" "recover-dn.xpm" "recover-dn.xpm")
)
'(
+ (vm-toolbar-decode-mime-icon "mime-up.xbm" "mime-dn.xbm" "mime-xx.xbm")
(vm-toolbar-next-icon "next-up.xbm" "next-dn.xbm" "next-xx.xbm")
(vm-toolbar-previous-icon "previous-up.xbm" "previous-dn.xbm"
"previous-xx.xbm")
@@ -359,5 +430,7 @@
files))
(setq tuples (cdr tuples)))))))
(setq vm-toolbar-delete/undelete-icon vm-toolbar-delete-icon)
+ (setq-default vm-toolbar-delete/undelete-icon vm-toolbar-delete-icon)
(setq vm-toolbar-helper-command 'vm-help)
- (setq vm-toolbar-helper-icon vm-toolbar-help-icon))
+ (setq vm-toolbar-helper-icon vm-toolbar-help-icon)
+ (setq-default vm-toolbar-helper-icon vm-toolbar-help-icon))
diff -r ac1f612d5250 -r 859a2309aef8 lisp/vm/vm-undo.el
--- a/lisp/vm/vm-undo.el Mon Aug 13 08:49:44 2007 +0200
+++ b/lisp/vm/vm-undo.el Mon Aug 13 08:50:05 2007 +0200
@@ -1,5 +1,5 @@
;;; Commands to undo message attribute changes in VM
-;;; Copyright (C) 1989, 1990, 1993, 1994 Kyle E. Jones
+;;; Copyright (C) 1989-1995 Kyle E. Jones
;;;
;;; This program is free software; you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
diff -r ac1f612d5250 -r 859a2309aef8 lisp/vm/vm-vars.el
--- a/lisp/vm/vm-vars.el Mon Aug 13 08:49:44 2007 +0200
+++ b/lisp/vm/vm-vars.el Mon Aug 13 08:50:05 2007 +0200
@@ -1,5 +1,5 @@
;;; VM user and internal variable initialization
-;;; Copyright (C) 1989, 1990, 1991, 1993, 1994, 1995 Kyle E. Jones
+;;; Copyright (C) 1989-1997 Kyle E. Jones
;;;
;;; This program is free software; you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
@@ -21,11 +21,10 @@
"*Startup file for VM that is loaded the first time you run VM
in an Emacs session.")
-(defvar vm-options-file "~/.vm.options"
+(defvar vm-preferences-file "~/.vm.preferences"
"*Secondary startup file for VM, loaded after vm-init-file.
This file is written and overwritten by VM and is not meant for
-users to edit directly. Use the Options menu to change what
-appears in this file.")
+users to edit directly.")
(defvar vm-primary-inbox "~/INBOX"
"*Mail is moved from the system mailbox to this file for reading.")
@@ -136,6 +135,39 @@
variables are defined and no particular value for vm-spool-files
has been specified.")
+(defvar vm-spool-file-suffixes nil
+ "*List of suffixes to be used to create possible spool file names
+for folders. Example:
+
+ (setq vm-spool-file-suffixes '(\".spool\" \"-\"))
+
+If you visit a folder ~/mail/beekeeping, when VM attempts to
+retrieve new mail for that folder it will look for mail in
+~/mail/beekeeping.spool and ~/mail/beekeeping- in addition to
+scanning vm-spool-files for matches.
+
+The value of vm-spool-files-suffixes will not be used unless
+vm-crash-box-suffix is also defined, since a crash box is
+required for all mail retrieval from spool files.")
+
+(defvar vm-crash-box-suffix nil
+ "*String suffix used to create possible crash box file names for folders.
+When VM uses vm-spool-file-suffixes to create a spool file name,
+it will append the value of vm-crash-box-suffix to the folder's
+file name to create a crash box name.")
+
+(defvar vm-make-spool-file-name nil
+ "*Non-nil value should be a function that returns a spool file name
+for a folder. The function will be called with one argument, the
+folder's file name. If the folder does not have a file name,
+the function will not be called.")
+
+(defvar vm-make-crash-box-name nil
+ "*Non-nil value should be a function that returns a crash box file name
+for a folder. The function will be called with one argument, the
+folder's file name. If the folder does not have a file name,
+the function will not be called.")
+
(defvar vm-pop-md5-program "md5"
"*Program that reads a message on its standard input and writes an
MD5 digest on its output.")
@@ -155,9 +187,7 @@
seconds) VM should check for new mail and try to retrieve it.
This is done asynchronously and may occur while you are editing
other files. It should not disturb your editing, except perhaps
-for a pause while the work is being done. The `itimer' package
-must be installed for this to work. Otherwise a numeric value is
-the same as a value of t.")
+for a pause while the check is being done.")
(defvar vm-default-folder-type
(cond ((not (boundp 'system-configuration))
@@ -282,9 +312,13 @@
(defvar vm-highlighted-header-face 'bold
"*Face to be used to highlight headers.
-This variable is ignored under Lucid Emacs.
-See the documentation for the function `highlight-headers'
-to find out how to customize header highlighting under Lucid Emacs.")
+The header to highlight are sepcified by the vm-highlighted-header-regexp
+variable.
+
+This variable is ignored under XEmacs if vm-use-lucid-highlighting is
+nil. XEmacs' highlight-headers package is used instead. See the
+documentation for the function `highlight-headers' to find out how to
+customize header highlighting using this package.")
(defvar vm-preview-lines 0
"*Non-nil value N causes VM to display the visible headers + N lines of text
@@ -301,6 +335,290 @@
"*Non-nil value means to preview messages even if they've already been read.
A nil value causes VM to preview messages only if new or unread.")
+(defvar vm-display-using-mime t
+ "*Non-nil value means VM should display messages using MIME.
+MIME (Multipurpose Internet Mail Extensions) is a set of
+extensions to the standard Internet message format that allows
+reliable tranmission and reception of arbitrary data including
+images, audio and video as well as traditional text.
+
+A non-nil value for this variable means that VM will recognize
+MIME encoded messages and display them as specified by the
+various MIME standards specifications.
+
+A nil value means VM will not display MIME messages any
+differently than any other message.")
+
+;; try to avoid bad interaction with TM
+(defvar vm-send-using-mime (not (featurep 'mime-setup))
+ "*Non-nil value means VM should support sending messages using MIME.
+MIME (Multipurpose Internet Mail Extensions) is a set of
+extensions to the standard Internet message format that allows
+reliable tranmission and reception of arbitrary data including
+images, audio and video as well as traditional text.
+
+A non-nil value for this variable means that VM will
+
+ - allow you to attach files and messages to your outbound message.
+ - analyze the composition buffer when you send off a message and
+ encode it as needed.
+
+A nil value means VM will not offer any support for composing
+MIME messages.")
+
+(defvar vm-honor-mime-content-disposition nil
+ "*Non-nil value means use information from the Content-Disposition header
+to display MIME messages. The Content-Disposition header
+specifies whether a MIME object should be displayed inline or
+treated as an attachment. For VM, ``inline'' display means
+displaying the object in the Emacs buffer, if possible.
+Attachments will be displayed as a button that you can use
+mouse-2 to activate or mouse-3 to pull up a menu of options.")
+
+(defvar vm-auto-decode-mime-messages nil
+ "*Non-nil value causes MIME decoding to occur automatically
+when a message containing MIME objects is exposed. A nil value
+means that you will have to run the `vm-decode-mime-message'
+command (normally bound to `D') manually to decode and display
+MIME objects.")
+
+(defvar vm-auto-displayed-mime-content-types '("text" "multipart")
+ "*List of MIME content types that should be displayed immediately
+after decoding. Other types will be displayed as a button that
+the user must activate to display the object.
+
+A value of t means that all types should be displayed immediately.
+A nil value means never display MIME objects immediately; only use buttons.
+
+If the value is a list, it should be a list of strings, which
+should all be types or type/subtype pairs. Example:
+
+ (setq vm-auto-displayed-mime-content-types '(\"text\" \"image/jpeg\"))
+
+If a top-level type is listed without a subtype, all subtypes of
+that type are assumed to be included.
+
+Note that some types are processed specially, and this variable does not
+apply to them.
+
+ Multipart/Digest and Message/RFC822 messages are always
+ displayed as a button to avoid visiting a new folder while the
+ user is moving around in the current folder.
+
+ Message/Partial messages are always displayed as a button,
+ because there always needs to be a way to trigger the assembly
+ of the parts into a full message.
+
+Any type that cannot be displayed internally or externally will
+be displayed as a button that allows you to save the body to a
+file.")
+
+(defvar vm-mime-internal-content-types t
+ "*List of MIME content types that should be displayed internally
+if Emacs is capable of doing so. A value of t means that VM
+should always display an object internally if possible. A nil
+value means never display MIME objects internally, which means VM
+have to run an external viewer to display MIME objects.
+
+If the value is a list, it should be a list of strings. Example:
+
+ (setq vm-mime-internal-content-types '(\"text\" \"image/jpeg\"))
+
+If a top-level type is listed without a subtype, all subtypes of
+that type are assumed to be included.
+
+Note that all multipart types are always handled internally.
+There is no need to list them here.")
+
+(defvar vm-mime-external-content-types-alist nil
+ "*Alist of MIME content types and the external programs used to display them.
+If VM cannot display a type internally or has been instructed not
+to (see the documentation for the vm-mime-internal-content-types
+variable) it will try to launch an external program to display that
+type.
+
+The alist format is
+
+ ( (TYPE PROGRAM ARG ARG ... ) ... )
+
+TYPE is a string specifying a MIME type or type/subtype pair.
+Example \"text\" or \"image/jpeg\". If a top-level type is
+listed without a subtype, all subtypes of that type are assumed
+to be included.
+
+PROGRAM is a string naming a program to run to display an object.
+Any ARGS will be passed to the program as arguments. The octets
+that compose the object will be written into a file and the name
+of the file will be passed to the program as its last argument.
+
+Example:
+
+ (setq vm-mime-external-content-types-alist
+ '(
+ (\"text/html\" \"netscape\")
+ (\"image/gif\" \"xv\")
+ (\"image/jpeg\" \"xv\")
+ (\"video/mpeg\" \"mpeg_play\")
+ (\"video\" \"xanim\")
+ )
+ )
+
+The first matching list element will be used.
+
+No multipart message will ever be sent to an external viewer.")
+
+(defvar vm-mime-type-converter-alist nil
+ "*Alist of MIME types and programs that can convert between them.
+If VM cannot display a content type, it will scan this list to
+see if the type can be converted into a type that it can display.
+
+The alist format is
+
+ ( (START-TYPE END-TYPE COMMAND-LINE ) ... )
+
+START-TYPE is a string specifying a MIME type or type/subtype pair.
+Example \"text\" or \"image/jpeg\". If a top-level type is
+listed without a subtype, all subtypes of that type are assumed
+to be included.
+
+END-TYPE must be an exact type/subtype pair. This is the type
+to which START-TYPE will be converted.
+
+COMMAND-LINE is a string giving a command line to be passed to
+the shell. The octets that compose the object will be written to
+the standard input of the shell command.
+
+Example:
+
+ (setq vm-mime-type-converter-alist
+ '(
+ (\"image/jpeg\" \"image/gif\" \"jpeg2gif\")
+ (\"text/html\" \"text/plain\" \"striptags\")
+ )
+ )
+
+The first matching list element will be used.")
+
+(defvar vm-mime-alternative-select-method 'best-internal
+ "*Value tells how to choose which multipart/alternative part to display.
+A MIME message of type multipart/alternative has multiple message
+parts containing the same information, but each part may be
+formatted differently. VM will display only one of the parts.
+This variable tells VM how to choose which part to display.
+
+A value of 'best means choose the part that is the most faithful to
+the sender's original content that can be displayed.
+
+A value of 'best-internal means choose the best part that can be
+displayed internally, i.e. with the built-in capabilities of Emacs.
+If none of the parts can be displayed internally, behavior reverts to
+that of 'best.")
+
+(defvar vm-mime-button-face
+ (cond ((fboundp 'find-face)
+ (or (and (not (eq (device-type) 'tty)) (find-face 'gui-button-face)
+ 'gui-button-face)
+ (and (find-face 'bold-italic) 'bold-italic)))
+ ((fboundp 'facep)
+ (or (and (facep 'gui-button-face) 'gui-button-face)
+ (and (facep 'bold-italic) 'bold-italic))))
+ "*Face used for text in buttons that trigger the display of MIME objects.")
+
+(defvar vm-mime-8bit-composition-charset "iso-8859-1"
+ "*Character set that VM should assume if it finds non-US-ASCII characters
+in a composition buffer. Composition buffers are assumed to use
+US-ASCII unless the buffer contains a byte with the high bit set.
+This variable specifies what character set VM should assume if
+such a character is found.")
+
+(defvar vm-mime-8bit-text-transfer-encoding 'quoted-printable
+ "*Symbol specifying what kind of transfer encoding to use on 8bit
+text. Characters with the high bit set cannot safely pass
+through all mail gateways and mail transport software. MIME has
+two transfer encodings that convert 8-bit data to 7-bit for same
+transport. Quoted-printable leaves the text mostly readable even
+if the recipent does not have a MIME-capable mail reader. BASE64
+is unreadable with a MIME-capable mail reader, unless your name
+is U3BvY2s=.
+
+A value of 'quoted-printable, means to use quoted-printable encoding.
+A value of 'base64 means to use BASE64 encoding.
+A value of '8bit means to send the message as is.
+
+Note that this only applies to textual MIME content types. Images, audio,
+video, etc. will always use BASE64 encoding.
+
+Note that lines of 1000 characters or longer will automatically
+trigger BASE64 encoding. Carriage returns (ascii code 13) in the
+text will also trigger BASE64 encoding.")
+
+(defvar vm-mime-attachment-auto-type-alist
+ '(
+ ("\\.jpe?g" . "image/jpeg")
+ ("\\.gif" . "image/gif")
+ ("\\.png" . "image/png")
+ ("\\.tiff" . "image/tiff")
+ ("\\.htm?l" . "text/html")
+ ("\\.au" . "audio/basic")
+ ("\\.mpe?g" . "video/mpeg")
+ ("\\.ps" . "application/postscript")
+ )
+ "*Alist used to guess a MIME content type based on a file name.
+The list format is
+
+ ((REGEXP . TYPE) ...)
+
+REGEXP is a string that specifies a regular expression.
+TYPE is a string specifying a MIME content type.
+
+When a non-MIME file is attached to a MIME composition buffer,
+this list will be scanned until a REGEXP matches the file's name.
+The corresponding TYPE will be offered as a default when you are
+prompted for the file's type.")
+
+(defvar vm-mime-max-message-size nil
+ "*Largest MIME message that VM should send without fragmentation.
+The value should be a integer which specifies the size in bytes.
+A message larger than this value will be split into multiple parts
+for transmission using the MIME message/partial type.")
+
+(defvar vm-mime-attachment-save-directory nil
+ "*Non-nil value is a default directory for saving MIME attachments.
+When VM prompts you for a target file name when saving a MIME body,
+any relative pathnames will be relative to this directory.")
+
+(defvar vm-mime-avoid-folding-content-type nil
+ "*Non-nil means don't send folded Content-Type headers in MIME messages.
+`Folded' headers are headers broken into multiple lines as specified
+in RFC822 for readability and to avoid excessive line lengths. At
+least one major UNIX vendor ships a version of sendmail that believes
+a folded Content-Type header is a syntax error, and returns any such
+message to sender. A typical error message from such a sendmail
+version is,
+
+553 header syntax error, line \" charset=us-ascii\"
+
+If you see one of these, setting vm-mime-avoid-folding-content-type
+non-nil may let your mail get through.")
+
+(defvar vm-mime-base64-decoder-program nil
+ "*Non-nil value should be a string that names a MIME base64 decoder.
+The program should expect to read base64 data on its standard
+input and write the converted data to its standard output.")
+
+(defvar vm-mime-base64-decoder-switches nil
+ "*List of command line flags passed to the command named by
+vm-mime-base64-decoder-program.")
+
+(defvar vm-mime-base64-encoder-program nil
+ "*Non-nil value should be a string that names a MIME base64 encoder.
+The program should expect arbitrary data on its standard
+input and write base64 data to its standard output.")
+
+(defvar vm-mime-base64-encoder-switches nil
+ "*List of command line flags passed to the command named by
+vm-mime-base64-encoder-program.")
+
(defvar vm-auto-next-message t
"*Non-nil value causes VM to use vm-next-message to advance to the next
message in the folder if the user attempts to scroll past the end of the
@@ -421,7 +739,7 @@
changed data into the folder buffer until a particular message or
the whole folder is saved to disk. This makes normal Emacs
auto-saving useless for VM folder buffers because the information
-you'd want to auto-save, i.e. the attribute changes, isn't in
+you'd want to auto-save, i.e. the attribute changes are not in
the buffer when it is auto-saved.
Setting vm-flush-interval to a numeric value will cause the VM's
@@ -755,18 +1073,24 @@
vm-forwarded-headers list appearing last in the header section of
the forwarded message.")
-(defvar vm-forwarding-digest-type "rfc934"
+(defvar vm-forwarding-digest-type "mime"
"*Non-nil value should be a string that specifies the type of
message encapsulation format to use when forwarding a message.
Legal values of this variable are:
\"rfc934\"
\"rfc1153\"
+\"mime\"
nil
A nil value means don't use a digest, just mark the beginning and
end of the forwarded message.")
+(defvar vm-burst-digest-messages-inherit-labels t
+ "*Non-nil values means messages from a digest inherit the digest's labels.
+Labels are added to messages with vm-add-message-labels, normally
+bound to `l a'.")
+
(defvar vm-digest-preamble-format "\"%s\" (%F)"
"*String which specifies the format of the preamble lines generated by
vm-send-digest when it is invoked with a prefix argument. One
@@ -784,25 +1108,39 @@
"*Header to insert into messages burst from a digest.
Value should be a format string of the same type as vm-summary-format that describes a header to be inserted into each message burst from a digest. The format string must end with a newline.")
-(defvar vm-digest-burst-type "rfc934"
+(defvar vm-digest-burst-type "guess"
"*Value specifies the default digest type offered by vm-burst-digest
when it asks you what type of digest you want to unpack. Allowed
values of this variable are:
\"rfc934\"
\"rfc1153\"
+ \"mime\"
\"guess\"
+rfc1153 digests have a preamble, followed by a line of exactly 70
+dashes, with digested messages separated by lines of exactly 30 dashes.
+
+rfc934 digests separate messages on any line that begins with a few
+dashes, but doesn't require lines with only dashes or lines with a
+specific number of dashes. In the text of the message, any line
+beginning with dashes is textually modified to be preceeded by a dash
+and a space to prevent confusion with message separators.
+
+MIME digests use whatever boundary that is specified by the
+boundary parameter in the Content-Type header of the digest.
+
If the value is \"guess\", and you take the default
response when vm-burst-digest queries you, VM will try to guess
the digest type.")
-(defvar vm-digest-send-type "rfc934"
+(defvar vm-digest-send-type "mime"
"*String that specifies the type of digest vm-send-digest will use.
Legal values of this variable are:
\"rfc934\"
\"rfc1153\"
+\"mime\"
")
@@ -896,8 +1234,56 @@
vm-rfc1153-digest-headers list appearing last in the headers of
the digestified messages.")
+(defvar vm-mime-digest-headers
+ '("Resent-"
+ "From:" "Sender:"
+ "To:" "Cc:"
+ "Subject:"
+ "Date:"
+ "Message-ID:"
+ "Keywords:"
+ "MIME-Version:"
+ "Content-")
+ "*List of headers that should be appear in MIME digests
+created by VM. These should be listed in the order you wish them
+to appear in the messages in the digest. Regular expressions are
+allowed. There's no need to anchor patterns with \"^\", as
+searches always start at the beginning of a line. Put a colon at
+the end of patterns to get exact matches. (E.g. \"Date\" matches
+\"Date\" and \"Date-Sent\".) Header names are always matched
+case insensitively.
+
+If the value of vm-mime-digest-discard-header-regexp is nil, the headers
+matched by vm-mime-digest-headers are the only headers that will be
+kept.
+
+If vm-mime-digest-discard-header-regexp is non-nil, then only
+headers matched by that variable will be discarded; all others
+will be kept. vm-mime-digest-headers determines the order of
+appearance in that case, with headers not matching any in the
+vm-mime-digest-headers list appearing last in the headers
+of the digestified messages.")
+
+(defvar vm-mime-digest-discard-header-regexp nil
+ "*Non-nil value should be a regular expression header that tells
+which headers should not appear in MIME digests created
+by VM. This variable along with vm-mime-digest-headers
+determines which headers are kept and which are discarded.
+
+If the value of vm-mime-digest-discard-header-regexp is nil, the headers
+matched by vm-mime-digest-headers are the only headers that will be
+kept.
+
+If vm-mime-digest-discard-header-regexp is non-nil, then only
+headers matched by this variable will be discarded; all others
+will be kept. vm-mime-digest-headers determines the order of
+appearance in that case, with headers not matching any in the
+vm-mime-digest-headers list appearing last in the headers
+of the digestified messages.")
+
(defvar vm-resend-bounced-headers
- '("Resent-"
+ '("MIME-Version:" "Content-"
+ "Resent-"
"From:" "Sender:" "Reply-To:"
"To:" "Cc:"
"Subject:"
@@ -966,7 +1352,7 @@
(defvar vm-resend-discard-header-regexp "\\(\\(X400-\\)?Received:\\|Resent-\\)"
"*Non-nil value should be a regular expression that tells
what headers should not appear in a resent message. This
-variable along with vm-resend-bounced-headers determines which
+variable along with vm-resend-headers determines which
headers are kept and which headers are discarded.
If the value of vm-resend-discard-header-regexp is nil,
@@ -1045,7 +1431,7 @@
the maximum allowed length of the substituted string. If the
string is longer than this value the right end of the string is
truncated. If the value is negative, the string is truncated on
-on the left instead of the right.
+the left instead of the right.
The summary format need not be one line per message but it must end with
a newline, otherwise the message pointer will not be displayed correctly
@@ -1061,6 +1447,10 @@
"*Face to use to highlight the summary entry for the current message.
Nil means don't highlight the current message's summary entry.")
+(defvar vm-mouse-track-summary t
+ "*Non-nil value means highlight summary lines as the mouse passes
+over them.")
+
(defvar vm-summary-show-threads nil
"*Non-nil value means VM should display and maintain
message thread trees in the summary buffer. This means that
@@ -1121,10 +1511,6 @@
the arrow. A value that is not nil and not t causes VM to center the
arrow only if the summary window is not the only existing window.")
-(defvar vm-summary-subject-no-newlines t
- "*Non-nil value means VM should replace newlines with spaces in the subject
-displayed in the summary.")
-
(defvar vm-subject-ignored-prefix "^\\(re: *\\)+"
"*Non-nil value should be a regular expression that matches
strings at the beginning of the Subject header that you want VM to ignore
@@ -1176,6 +1562,12 @@
under X Windows or some other window system that allows multiple
Emacs frames.")
+(defvar vm-raise-frame-at-startup t
+ "*Specifies whether VM should raise its frame at startup.
+A value of nil means never raise the frame.
+A value of t means always raise the frame.
+Other values are reserved for future use.")
+
(defvar vm-frame-per-folder t
"*Non-nil value causes the folder visiting commands to visit in a new frame.
Nil means the commands will use the current frame. This variable
@@ -1216,6 +1608,24 @@
under X Windows or some other window system that allows multiple
Emacs frames.")
+(defvar vm-frame-per-completion t
+ "*Non-nil value causes VM to open a new frame on mouse
+initiated completing reads. A mouse initiated completing read
+occurs when you invoke a VM command using the mouse, either with a
+menu or a toolbar button. That command must then prompt you for
+information, and there must be a limited set of proper responses.
+
+If these conditions are met and vm-frame-per-completion's value
+is non-nil, VM will create a new frame containing a list of
+responses that you can select with the mouse.
+
+A nil value means the current frame will be used to display the
+list of choices.
+
+This variable has no meaning if you're not running Emacs native
+under X Windows or some other window system that allows multiple
+Emacs frames.")
+
(defvar vm-frame-parameter-alist nil
"*Non-nil value is an alist of types and lists of frame parameters.
This list tells VM what frame parameters to associate with each
@@ -1223,12 +1633,15 @@
The alist should be of this form
-((SYMBOL PARAMLIST) (SYMBOL2 PARAMLIST2) ...)
-
-SYMBOL must be one of `composition', `edit', `folder',
-`primary-folder' or `summary'. It specifies the type of frame
-that the following PARAMLIST applies to.
-
+ ((SYMBOL PARAMLIST) (SYMBOL2 PARAMLIST2) ...)
+
+SYMBOL must be one of `completion', `composition', `edit',
+`folder', `primary-folder' or `summary'. It specifies the type
+of frame that the following PARAMLIST applies to.
+
+`completion' specifies parameters for frames that display list of
+ choices generated by a mouse-initiated completing read.
+ (See vm-frame-per-completion.)
`composition' specifies parameters for mail composition frames.
`edit' specifies parameters for message edit frames
(e.g. created by vm-edit-message-other-frame)
@@ -1236,7 +1649,7 @@
`vm-visit-' commands.
`primary-folder' specifies parameters for the frame created by running
`vm' without any arguments.
-`summary' specifies parameters for frames to display a summary buffer
+`summary' specifies parameters for frames that display a summary buffer
(e.g. created by vm-summarize-other-frame)
PARAMLIST is a list of pairs as described in the documentation for
@@ -1258,18 +1671,19 @@
toolbar buttons will appears and in what order. Valid symbol
value within the list are:
-autofile
-compose
-delete/undelete
-file
-help
-next
-previous
-print
-quit
-reply
-visit
-nil
+ autofile
+ compose
+ delete/undelete
+ file
+ help
+ mime
+ next
+ previous
+ print
+ quit
+ reply
+ visit
+ nil
If nil appears in the list, it should appear exactly once. All
buttons after nil in the list will be displayed flushright in
@@ -1301,8 +1715,16 @@
Consider this variable experimental; it may not be supported forever.")
-(defvar vm-use-menus '(folder motion send mark label sort
- virtual undo dispose emacs nil help)
+(defvar vm-use-menus
+ (nconc (list 'folder 'motion 'send 'mark 'label 'sort 'virtual)
+ (cond ((string-match ".*-.*-\\(win95\\|nt\\)" system-configuration)
+ nil)
+ (t (list 'undo)))
+ (list 'dispose)
+ (cond ((string-match ".*-.*-\\(win95\\|nt\\)" system-configuration)
+ nil)
+ (t (list 'emacs)))
+ (list nil 'help))
"*Non-nil value causes VM to provide a menu interface.
A value that is a list causes VM to install its own menubar.
A value of 1 causes VM to install a \"VM\" item in the Emacs menubar.
@@ -1333,6 +1755,10 @@
are provided, which usually means Emacs has to be running under a
window system.")
+(defvar vm-popup-menu-on-mouse-3 t
+ "*Non-nil value means VM should provide context-sensitive menus on mouse-3.
+A nil value means VM should not change the binding of mouse-3.")
+
(defvar vm-warp-mouse-to-new-frame nil
"*Non-nil value causes VM to move the mouse cursor into newly created frames.
This is useful to give the new frame the focus under some window managers
@@ -1340,34 +1766,31 @@
Nil means don't move the mouse cursor.")
-;; if browse-url is around (always will be in XEmacs 19.14 or later) use it;
-;; otherwise do our own support.
-(if (boundp 'browse-url-browser-function)
- (defvaralias 'vm-url-browser 'browse-url-browser-function)
- (defvar vm-url-browser
- (cond ((fboundp 'w3-fetch-other-frame)
- 'w3-fetch-other-frame)
- ((fboundp 'w3-fetch)
- 'w3-fetch)
- (t 'vm-mouse-send-url-to-netscape))
- "*Non-nil value means VM should enable URL passing.
-This means that VM will search for URLs (Universal Resource
+(defvar vm-url-browser
+ (cond ((fboundp 'w3-fetch-other-frame)
+ 'w3-fetch-other-frame)
+ ((fboundp 'w3-fetch)
+ 'w3-fetch)
+ (t 'vm-mouse-send-url-to-netscape))
+ "*Non-nil value means VM should enable URL passing.
+This means that VM will search for URLs (Uniform Resource
Locators) in messages and make it possible for you to pass them
to a World Wide Web browser.
Clicking mouse-2 on the URL will send it to the browser.
-Clicking mouse-3 on the URL will pop up a menu of browsers and
-you can pick which one you want to use.
+By default clicking mouse-3 on the URL will pop up a menu of
+browsers and you can pick which one you want to use. If
+vm-popup-menu-on-mouse-3 is set to nil, you will not see the menu.
Moving point to a character within the URL and pressing RETURN
-will send the URL to the browser (Only in XEmacs).
+will send the URL to the browser.
If the value of vm-url-browser is a string, it should specify
name of an external browser to run. The URL will be passed to
the program as its first argument.
-If the value of vm-url-browser is a symbol, if should specifiy a
+If the value of vm-url-browser is a symbol, it should specify a
Lisp function to call. The URL will be passed to the program as
its first and only argument. Use
@@ -1380,7 +1803,7 @@
for Mosaic. The advantage of using them is that they will display
an URL using on existing Mosaic or Netscape process, if possible.
-A nil value means VM should not enable URL passing to browsers."))
+A nil value means VM should not enable URL passing to browsers.")
(defvar vm-highlight-url-face 'bold-italic
"*Non-nil value should be a face to use display URLs found in messages.
@@ -1465,6 +1888,14 @@
and not nil means that motion should be done as if
vm-circular-folders is set to nil.")
+(defvar vm-move-after-killing nil
+ "*Non-nil value causes VM's `k' command to automatically invoke
+vm-next-message or vm-previous-message after killing messages, to try
+to move past the deleted messages. A value of t means motion
+should honor the value of vm-circular-folders. A value that is
+not t and not nil means that motion should be done as if
+vm-circular-folders is set to nil.")
+
(defvar vm-delete-after-saving nil
"*Non-nil value causes VM automatically to mark messages for deletion
after successfully saving them to a folder.")
@@ -1516,7 +1947,7 @@
"*Command VM uses to print messages.")
(defvar vm-print-command-switches lpr-switches
- "*Command line flags passed to the command named by vm-print-command.
+ "*List of command line flags passed to the command named by vm-print-command.
VM uses vm-print-command to print messages.")
(defvar vm-berkeley-mail-compatibility
@@ -1528,14 +1959,10 @@
(defvar vm-strip-reply-headers nil
"*Non-nil value causes VM to strip away all comments and extraneous text
from the headers generated in reply messages. If you use the \"fakemail\"
-program as distributed with Emacs, you probably want to set this variable to
+program as distributed with Emacs, you probably want to set this variable
to t, because as of Emacs v18.52 \"fakemail\" could not handle unstripped
headers.")
-(defvar vm-inhibit-startup-message nil
- "*Non-nil causes VM not to display its copyright notice, disclaimers
-etc. when started in the usual way.")
-
(defvar vm-select-new-message-hook nil
"*List of hook functions called every time a message with the 'new'
attribute is made to be the current message. When the hooks are run the
@@ -1701,6 +2128,17 @@
(defvar vm-menu-setup-hook nil
"*List of hook functions that are run just after all menus are initialized.")
+(defvar vm-mime-display-function nil
+ "*If non-nil, this should name a function to be called inside
+vm-decode-mime-message to do the MIME display the current
+message. The function is called with no arguments, and at the
+time of the call the current buffer will be the `presentation'
+buffer for the folder, which is a temporary buffer that VM uses
+for the display of MIME messages. A copy of the current message
+will be in the presentation buffer at that time. The normal work
+that vm-decode-mime-message would do is not done, because this
+function is expected to subsume all of it.")
+
(defvar mail-yank-hooks nil
"Hooks called after a message is yanked into a mail composition.
@@ -1756,6 +2194,10 @@
"*Name of program to use to run Mosaic.
vm-mouse-send-url-to-mosaic uses this.")
+(defvar vm-temp-file-directory "/tmp"
+ "*Name of a directory where VM can put temporary files.
+This name must not end with a slash.")
+
(defvar vm-tale-is-an-idiot nil
"*Non-nil value causes vm-mail-send to check multi-line recipient
headers of outbound mail for lines that don't end with a
@@ -1785,6 +2227,7 @@
(define-key map " " 'vm-scroll-forward)
(define-key map "b" 'vm-scroll-backward)
(define-key map "\C-?" 'vm-scroll-backward)
+ (define-key map "D" 'vm-decode-mime-message)
(define-key map "d" 'vm-delete-message)
(define-key map "\C-d" 'vm-delete-message-backward)
(define-key map "u" 'vm-undelete-message)
@@ -1849,6 +2292,8 @@
(define-key map "Ms" 'vm-unmark-messages-same-subject)
(define-key map "MA" 'vm-mark-messages-same-author)
(define-key map "Ma" 'vm-unmark-messages-same-author)
+ (define-key map "MR" 'vm-mark-summary-region)
+ (define-key map "Mr" 'vm-unmark-summary-region)
(define-key map "M?" 'vm-mark-help)
(define-key map "W" (make-sparse-keymap))
(define-key map "WW" 'vm-apply-window-configuration)
@@ -1884,6 +2329,10 @@
(defvar vm-mail-mode-map
(let ((map (make-sparse-keymap)))
(define-key map "\C-c\C-v" vm-mode-map)
+ (define-key map "\C-c\C-p" 'vm-mime-preview-composition)
+ (define-key map "\C-c\C-e" 'vm-mime-encode-composition)
+ (define-key map "\C-c\C-a" 'vm-mime-attach-file)
+ (define-key map "\C-c\C-m" 'vm-mime-attach-mime-file)
(define-key map "\C-c\C-y" 'vm-yank-message)
(define-key map "\C-c\C-s" 'vm-mail-send)
(define-key map "\C-c\C-c" 'vm-mail-send-and-exit)
@@ -1931,6 +2380,12 @@
(make-variable-buffer-local 'vm-last-message-pointer)
(defvar vm-mail-buffer nil)
(make-variable-buffer-local 'vm-mail-buffer)
+(defvar vm-presentation-buffer nil)
+(make-variable-buffer-local 'vm-presentation-buffer)
+(defvar vm-presentation-buffer-handle nil)
+(make-variable-buffer-local 'vm-presentation-buffer-handle)
+(defvar vm-mime-decoded nil)
+(make-variable-buffer-local 'vm-mime-decoded)
(defvar vm-summary-buffer nil)
(make-variable-buffer-local 'vm-summary-buffer)
(defvar vm-summary-pointer nil)
@@ -1958,6 +2413,7 @@
(make-variable-buffer-local 'vm-modification-counter)
(defvar vm-flushed-modification-counter nil)
(make-variable-buffer-local 'vm-flushed-modification-counter)
+(defvar vm-tempfile-counter 0)
(defvar vm-messages-needing-summary-update nil)
(defvar vm-buffers-needing-display-update nil)
(defvar vm-numbering-redo-start-point nil)
@@ -2010,7 +2466,8 @@
(defconst vm-supported-folder-types
'("From_" "From_-with-Content-Length" "mmdf" "babyl"))
(defconst vm-supported-window-configurations
- '(("default")
+ '(
+ ("default")
("startup")
("quitting")
("composing-message")
@@ -2018,113 +2475,135 @@
("marking-message")
("reading-message")
("searching-message")
+ ("vm")
+ ("vm-add-message-labels")
+ ("vm-apply-virtual-folder")
+ ("vm-auto-archive-messages")
+ ("vm-beginning-of-message")
+ ("vm-burst-digest")
+ ("vm-burst-mime-digest")
+ ("vm-burst-rfc1153-digest")
+ ("vm-burst-rfc934-digest")
+ ("vm-change-folder-type")
+ ("vm-clear-all-marks")
+ ("vm-continue-composing-message")
+ ("vm-create-virtual-folder")
+ ("vm-decode-mime-message")
("vm-delete-message")
("vm-delete-message-backward")
- ("vm-undelete-message")
- ("vm-kill-subject")
- ("vm-expunge-folder")
- ("vm-burst-digest")
- ("vm-burst-rfc934-digest")
- ("vm-burst-rfc1153-digest")
+ ("vm-delete-message-labels")
+ ("vm-discard-cached-data")
("vm-edit-message")
- ("vm-discard-cached-data")
+ ("vm-edit-message-abort")
("vm-edit-message-end")
- ("vm-edit-message-abort")
- ("vm-unread-message")
- ("vm-quit-no-change")
+ ("vm-edit-message-other-frame")
+ ("vm-end-of-message")
+ ("vm-expose-hidden-headers")
+ ("vm-expunge-folder")
+ ("vm-followup")
+ ("vm-followup-include-text")
+ ("vm-followup-include-text-other-frame")
+ ("vm-followup-other-frame")
+ ("vm-forward-message")
+ ("vm-forward-message-all-headers")
+ ("vm-forward-message-all-headers-other-frame")
+ ("vm-forward-message-other-frame")
+ ("vm-get-new-mail")
+ ("vm-goto-message")
+ ("vm-goto-message-last-seen")
+ ("vm-goto-parent-message")
+ ("vm-help")
+ ("vm-isearch-forward")
+ ("vm-kill-subject")
+ ("vm-load-init-file")
+ ("vm-mail")
+ ("vm-mail-other-frame")
+ ("vm-mail-other-window")
+ ("vm-mail-send")
+ ("vm-mail-send-and-exit")
+ ("vm-mark-all-messages")
+ ("vm-mark-help")
+ ("vm-mark-matching-messages")
+ ("vm-mark-message")
+ ("vm-mark-messages-same-author")
+ ("vm-mark-messages-same-subject")
+ ("vm-mark-summary-region")
+ ("vm-mark-thread-subtree")
+ ("vm-mode")
+ ("vm-move-message-backward")
+ ("vm-move-message-backward-physically")
+ ("vm-move-message-forward")
+ ("vm-move-message-forward-physically")
+ ("vm-next-command-uses-marks")
+ ("vm-next-message")
+ ("vm-next-message-no-skip")
+ ("vm-next-message-no-skip")
+ ("vm-next-message-same-subject")
+ ("vm-next-unread-message")
+ ("vm-other-frame")
+ ("vm-other-window")
+ ("vm-pipe-message-to-command")
+ ("vm-previous-message")
+ ("vm-previous-message-no-skip")
+ ("vm-previous-message-no-skip")
+ ("vm-previous-message-same-subject")
+ ("vm-previous-unread-message")
("vm-quit")
+ ("vm-quit-just-bury")
+ ("vm-quit-just-iconify")
+ ("vm-quit-no-change")
+ ("vm-reply")
+ ("vm-reply-include-text")
+ ("vm-reply-include-text-other-frame")
+ ("vm-reply-other-frame")
+ ("vm-resend-bounced-message")
+ ("vm-resend-bounced-message-other-frame")
+ ("vm-resend-message")
+ ("vm-resend-message-other-frame")
+ ("vm-save-and-expunge-folder")
("vm-save-buffer")
- ("vm-write-file")
("vm-save-folder")
- ("vm-save-and-expunge-folder")
+ ("vm-save-message")
+ ("vm-save-message-sans-headers")
+ ("vm-scroll-backward")
+ ("vm-scroll-forward")
+ ("vm-send-digest")
+ ("vm-send-digest-other-frame")
+ ("vm-send-mime-digest")
+ ("vm-send-mime-digest-other-frame")
+ ("vm-send-rfc1153-digest")
+ ("vm-send-rfc1153-digest-other-frame")
+ ("vm-send-rfc934-digest")
+ ("vm-send-rfc934-digest-other-frame")
+ ("vm-set-message-attributes")
+ ("vm-show-copying-restrictions")
+ ("vm-show-no-warranty")
+ ("vm-sort-messages")
+ ("vm-submit-bug-report")
+ ("vm-summarize")
+ ("vm-summarize-other-frame")
+ ("vm-toggle-read-only")
+ ("vm-toggle-threads-display")
+ ("vm-undelete-message")
+ ("vm-undo")
+ ("vm-unmark-matching-messages")
+ ("vm-unmark-message")
+ ("vm-unmark-messages-same-author")
+ ("vm-unmark-messages-same-subject")
+ ("vm-unmark-summary-region")
+ ("vm-unmark-thread-subtree")
+ ("vm-unread-message")
+ ("vm-virtual-help")
("vm-visit-folder")
("vm-visit-folder-other-frame")
("vm-visit-folder-other-window")
- ("vm-help")
- ("vm-get-new-mail")
- ("vm-load-init-file")
- ("vm")
- ("vm-other-frame")
- ("vm-other-window")
- ("vm-toggle-read-only")
- ("vm-mode")
- ("vm-show-copying-restrictions")
- ("vm-show-no-warranty")
- ("vm-clear-all-marks")
- ("vm-mark-all-messages")
- ("vm-mark-message")
- ("vm-unmark-message")
- ("vm-mark-messages-same-subject")
- ("vm-unmark-messages-same-subject")
- ("vm-mark-messages-same-author")
- ("vm-unmark-messages-same-author")
- ("vm-mark-matching-messages")
- ("vm-unmark-matching-messages")
- ("vm-mark-thread-subtree")
- ("vm-unmark-thread-subtree")
- ("vm-next-command-uses-marks")
- ("vm-mark-help")
- ("vm-submit-bug-report")
- ("vm-goto-message")
- ("vm-goto-message-last-seen")
- ("vm-next-message")
- ("vm-previous-message")
- ("vm-next-message-no-skip")
- ("vm-previous-message-no-skip")
- ("vm-next-unread-message")
- ("vm-previous-unread-message")
- ("vm-scroll-forward")
- ("vm-scroll-backward")
- ("vm-expose-hidden-headers")
- ("vm-beginning-of-message")
- ("vm-end-of-message")
- ("vm-yank-message-other-folder")
- ("vm-yank-message")
- ("vm-mail-send-and-exit")
- ("vm-mail-send")
- ("vm-reply")
- ("vm-reply-include-text")
- ("vm-followup")
- ("vm-followup-include-text")
- ("vm-forward-message")
- ("vm-forward-message-all-headers")
- ("vm-mail")
- ("vm-resend-bounced-message")
- ("vm-resend-message")
- ("vm-send-digest")
- ("vm-send-rfc934-digest")
- ("vm-send-rfc1153-digest")
- ("vm-reply-other-frame")
- ("vm-reply-include-text-other-frame")
- ("vm-followup-other-frame")
- ("vm-followup-include-text-other-frame")
- ("vm-forward-message-other-frame")
- ("vm-forward-message-all-headers-other-frame")
- ("vm-mail-other-frame")
- ("vm-mail-other-window")
- ("vm-resend-bounced-message-other-frame")
- ("vm-resend-message-other-frame")
- ("vm-send-digest-other-frame")
- ("vm-send-rfc934-digest-other-frame")
- ("vm-send-rfc1153-digest-other-frame")
- ("vm-continue-composing-message")
- ("vm-auto-archive-messages")
- ("vm-save-message")
- ("vm-save-message-sans-headers")
- ("vm-pipe-message-to-command")
- ("vm-isearch-forward")
- ("vm-move-message-forward")
- ("vm-move-message-backward")
- ("vm-move-message-forward-physically")
- ("vm-move-message-backward-physically")
- ("vm-sort-messages")
- ("vm-toggle-threads-display")
- ("vm-summarize")
- ("vm-summarize-other-frame")
- ("vm-undo")
("vm-visit-virtual-folder")
("vm-visit-virtual-folder-other-frame")
- ("vm-visit-virtual-folder-other-window")))
+ ("vm-visit-virtual-folder-other-window")
+ ("vm-write-file")
+ ("vm-yank-message")
+ ("vm-yank-message-other-folder")
+))
(defconst vm-supported-sort-keys
'("date" "reversed-date"
"author" "reversed-author"
@@ -2182,7 +2661,7 @@
"unanswered"))
(defvar vm-key-functions nil)
-(defconst vm-digest-type-alist '(("rfc934") ("rfc1153")))
+(defconst vm-digest-type-alist '(("rfc934") ("rfc1153") ("mime")))
(defvar vm-completion-auto-correct t
"Non-nil means that minibuffer-complete-file should aggressively erase
the trailing part of a word that caused completion to fail, and retry
@@ -2195,11 +2674,12 @@
append a space to words that complete unambiguously.")
(defconst vm-attributes-vector-length 9)
(defconst vm-cache-vector-length 20)
-(defconst vm-softdata-vector-length 16)
+(defconst vm-softdata-vector-length 18)
(defconst vm-location-data-vector-length 6)
(defconst vm-mirror-data-vector-length 5)
(defconst vm-startup-message-lines
'("Please use \\[vm-submit-bug-report] to report bugs."
+ "For discussion about the VM mail reader, see the gnu.emacs.vm.info newsgroup"
"You may give out copies of VM. Type \\[vm-show-copying-restrictions] to see the conditions"
"VM comes with ABSOLUTELY NO WARRANTY; type \\[vm-show-no-warranty] for full details"
"In Stereo (where available)"))
@@ -2207,7 +2687,7 @@
;; for the mode line
(defvar vm-mode-line-format
'("" " %&%& "
- ("VM: "
+ ("VM " vm-version ": "
(vm-folder-read-only "read-only ")
(vm-virtual-folder-definition (vm-virtual-mirror "mirrored "))
"%b"
@@ -2277,7 +2757,6 @@
(defvar vm-forward-list nil)
(defvar vm-redistribute-list nil)
(defvar current-itimer nil)
-(defvar mode-popup-menu nil)
(defvar current-menubar nil)
(defvar scrollbar-height nil)
(defvar top-toolbar nil)
@@ -2292,8 +2771,11 @@
;; is loaded before highlight-headers.el
(defvar highlight-headers-regexp "Subject[ \t]*:")
(defvar vm-url-regexp
- "\\(file\\|ftp\\|gopher\\|http\\|https\\|news\\|wais\\|www\\)://[^ \t\n\f\r\"<>|()]*[^ \t\n\f\r\"<>|.!?(){}]"
- "Regular expression that matches an absolute URL.")
+ "]+\\)>\\|\\(\\(file\\|ftp\\|gopher\\|http\\|https\\|news\\|wais\\|www\\)://[^ \t\n\f\r\"<>|()]*[^ \t\n\f\r\"<>|.!?(){}]\\)\\|\\(mailto:[^ \t\n\f\r\"<>|()]*[^ \t\n\f\r\"<>|.!?(){}]\\)"
+ "Regular expression that matches an absolute URL.
+The URL itself must be matched by a \\(..\\) grouping.
+VM will extract the URL by copying the lowest number grouping
+that has a match.")
(defconst vm-month-alist
'(("jan" "January" "1")
("feb" "February" "2")
@@ -2322,3 +2804,115 @@
(defvar vm-delete-duplicates-obarray (make-vector 29 0))
(defvar vm-mail-mode-map-parented nil)
(defvar vm-xface-cache (make-vector 29 0))
+(defconst vm-mime-base64-alphabet
+ (concat
+ [
+ 65 66 67 68 69 70 71 72 73 74 75 76 77
+ 78 79 80 81 82 83 84 85 86 87 88 89 90
+ 97 98 99 100 101 102 103 104 105 106 107 108 109
+ 110 111 112 113 114 115 116 117 118 119 120 121 122
+ 48 49 50 51 52 53 54 55 56 57 43 47
+ ]
+ ))
+(defconst vm-mime-base64-alphabet-decoding-vector
+ [
+ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 0 62 0 0 0 63
+ 52 53 54 55 56 57 58 59 60 61 0 0 0 0 0 0
+ 0 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14
+ 15 16 17 18 19 20 21 22 23 24 25 0 0 0 0 0
+ 0 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
+ 41 42 43 44 45 46 47 48 49 50 51 0 0 0 0 0
+ ])
+
+;;(defconst vm-mime-base64-alphabet-decoding-alist
+;; '(
+;; ( 65 . 00) ( 66 . 01) ( 67 . 02) ( 68 . 03) ( 69 . 04) ( 70 . 05)
+;; ( 71 . 06) ( 72 . 07) ( 73 . 08) ( 74 . 09) ( 75 . 10) ( 76 . 11)
+;; ( 77 . 12) ( 78 . 13) ( 79 . 14) ( 80 . 15) ( 81 . 16) ( 82 . 17)
+;; ( 83 . 18) ( 84 . 19) ( 85 . 20) ( 86 . 21) ( 87 . 22) ( 88 . 23)
+;; ( 89 . 24) ( 90 . 25) ( 97 . 26) ( 98 . 27) ( 99 . 28) (100 . 29)
+;; (101 . 30) (102 . 31) (103 . 32) (104 . 33) (105 . 34) (106 . 35)
+;; (107 . 36) (108 . 37) (109 . 38) (110 . 39) (111 . 40) (112 . 41)
+;; (113 . 42) (114 . 43) (115 . 44) (116 . 45) (117 . 46) (118 . 47)
+;; (119 . 48) (120 . 49) (121 . 50) (122 . 51) ( 48 . 52) ( 49 . 53)
+;; ( 50 . 54) ( 51 . 55) ( 52 . 56) ( 53 . 57) ( 54 . 58) ( 55 . 59)
+;; ( 56 . 60) ( 57 . 61) ( 43 . 62) ( 47 . 63)
+;; ))
+;;
+;;(defvar vm-mime-base64-alphabet-decoding-vector
+;; (let ((v (make-vector 123 nil))
+;; (p vm-mime-base64-alphabet-decoding-alist))
+;; (while p
+;; (aset v (car (car p)) (cdr (car p)))
+;; (setq p (cdr p)))
+;; v ))
+
+(defvar vm-message-garbage-alist nil)
+(make-variable-buffer-local 'vm-message-garbage-alist)
+(defvar vm-folder-garbage-alist nil)
+(make-variable-buffer-local 'vm-folder-garbage-alist)
+(defconst vm-mime-header-list '("MIME-Version:" "Content-"))
+(defconst vm-mime-xemacs-mule-charset-alist
+ '(
+ ("us-ascii" no-conversion)
+ ("iso-8859-1" no-conversion)
+ ("iso-8859-2" iso-8859-2)
+ ("iso-8859-3" iso-8859-3)
+ ("iso-8859-4" iso-8859-4)
+ ("iso-8859-5" iso-8859-5)
+ ("iso-8859-6" iso-8859-6)
+ ("iso-8859-7" iso-8859-7)
+ ("iso-8859-8" iso-8859-8)
+ ("iso-8859-9" iso-8859-9)
+ ("iso-2022-jp" iso-2022-jp)
+ ;; probably not correct, but probably better than nothing.
+ ("iso-2022-jp-2" iso-2022-jp)
+ ("iso-2022-int-1" iso-2022-int-1)
+ ("iso-2022-kr" iso-2022-kr)
+ ("euc-kr" iso-2022-kr)
+ ))
+(defconst vm-mime-charset-completion-alist
+ '(
+ ("us-ascii")
+ ("iso-8859-1")
+ ("iso-8859-2")
+ ("iso-8859-3")
+ ("iso-8859-4")
+ ("iso-8859-5")
+ ("iso-8859-6")
+ ("iso-8859-7")
+ ("iso-8859-8")
+ ("iso-8859-9")
+ ("iso-2022-jp")
+ ("iso-2022-jp-2")
+ ("iso-2022-int-1")
+ ("iso-2022-kr")
+ ))
+(defconst vm-mime-type-completion-alist
+ '(
+ ("text/plain")
+ ("text/enriched")
+ ("text/html")
+ ("audio/basic")
+ ("image/jpeg")
+ ("image/png")
+ ("image/gif")
+ ("image/tiff")
+ ("video/mpeg")
+ ("application/postscript")
+ ("application/octet-stream")
+ ("message/rfc822")
+ ))
+(defconst vm-mime-encoded-word-regexp
+ "=\\?\\([^?]+\\)\\?\\([BQ]\\)\\?\\([^?]+\\)\\?=")
+;; for MS-DOS and Windows NT
+;; nil value means text file
+;; t value means binary file
+;; presumably it controls whether LF -> CRLF mapping is done
+;; when writing to files.
+(defvar buffer-file-type)
+(defvar vm-frame-list nil)
+(if (not (boundp 'shell-command-switch))
+ (defvar shell-command-switch "-c"))
diff -r ac1f612d5250 -r 859a2309aef8 lisp/vm/vm-version.el
--- a/lisp/vm/vm-version.el Mon Aug 13 08:49:44 2007 +0200
+++ b/lisp/vm/vm-version.el Mon Aug 13 08:50:05 2007 +0200
@@ -2,7 +2,7 @@
(provide 'vm-version)
-(defconst vm-version "5.97"
+(defconst vm-version "6.13"
"Version number of VM.")
(defun vm-version ()
diff -r ac1f612d5250 -r 859a2309aef8 lisp/vm/vm-virtual.el
--- a/lisp/vm/vm-virtual.el Mon Aug 13 08:49:44 2007 +0200
+++ b/lisp/vm/vm-virtual.el Mon Aug 13 08:50:05 2007 +0200
@@ -1,5 +1,5 @@
;;; Virtual folders for VM
-;;; Copyright (C) 1990, 1993, 1994, 1995 Kyle E. Jones
+;;; Copyright (C) 1990-1997 Kyle E. Jones
;;;
;;; This program is free software; you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
@@ -165,8 +165,7 @@
(vm-buffer-of
(vm-real-message-of
(car mp))))
- (apply 'vm-vs-or (vm-real-message-of (car mp))
- selectors))
+ (apply 'vm-vs-or (car mp) selectors))
(apply 'vm-vs-or (car mp) selectors)))
(progn
(intern
@@ -221,12 +220,18 @@
;;
;; Now we tie it all together, with this section of code being
;; uninterruptible.
- (let ((inhibit-quit t))
+ (let ((inhibit-quit t)
+ (label-obarray vm-label-obarray))
(if (null vm-real-buffers)
(setq vm-real-buffers real-buffers-used))
(save-excursion
(while real-buffers-used
(set-buffer (car real-buffers-used))
+ ;; inherit the global label lists of all the associated
+ ;; real folders.
+ (mapatoms (function (lambda (x) (intern (symbol-name x)
+ label-obarray)))
+ vm-label-obarray)
(if (not (memq vbuffer vm-virtual-buffers))
(setq vm-virtual-buffers (cons vbuffer vm-virtual-buffers)))
(setq real-buffers-used (cdr real-buffers-used))))
@@ -352,15 +357,6 @@
(vm-display nil nil '(vm-virtual-help) '(vm-virtual-help))
(message "VV = visit, VA = apply selectors, VC = create, VM = toggle virtual mirror"))
-(defun vm-delete-directory-file-names (list)
- (vm-delete 'file-directory-p list))
-
-(defun vm-delete-backup-file-names (list)
- (vm-delete 'backup-file-name-p list))
-
-(defun vm-delete-auto-save-file-names (list)
- (vm-delete 'auto-save-file-name-p list))
-
(defun vm-vs-or (m &rest selectors)
(let ((result nil) selector arglist)
(while selectors
@@ -407,8 +403,8 @@
(save-excursion
(save-restriction
(widen)
- (goto-char (vm-headers-of m))
- (re-search-forward arg (vm-text-of m) t))))
+ (goto-char (vm-headers-of (vm-real-message-of m)))
+ (re-search-forward arg (vm-text-of (vm-real-message-of m)) t))))
(defun vm-vs-label (m arg)
(vm-member arg (vm-labels-of m)))
@@ -417,8 +413,8 @@
(save-excursion
(save-restriction
(widen)
- (goto-char (vm-text-of m))
- (re-search-forward arg (vm-text-end-of m) t))))
+ (goto-char (vm-text-of (vm-real-message-of m)))
+ (re-search-forward arg (vm-text-end-of (vm-real-message-of m)) t))))
(defun vm-vs-more-chars-than (m arg)
(> (string-to-int (vm-su-byte-count m)) arg))
@@ -485,6 +481,8 @@
vm-label-obarray)
nil)))))
(t (setq arg (read-string prompt))))))
+ (or (fboundp (intern (concat "vm-vs-" (symbol-name selector))))
+ (error "Invalid selector"))
(list selector arg)))
;; clear away links between real and virtual folders when
@@ -536,22 +534,26 @@
(setq vm-real-buffers (delq b vm-real-buffers))
;; set the message pointer to a new value if it is
;; now invalid.
- (setq vmp vm-message-pointer)
- (while (and vm-message-pointer
- (equal "Q" (vm-message-id-number-of
- (car vm-message-pointer))))
- (setq vm-message-pointer
- (cdr vm-message-pointer)))
- ;; if there were no good messages ahead, try going
- ;; backward.
- (if (null vm-message-pointer)
- (progn
- (setq vm-message-pointer vmp)
- (while (and vm-message-pointer
- (equal "Q" (vm-message-id-number-of
- (car vm-message-pointer))))
- (setq vm-message-pointer
- (vm-reverse-link-of (car vm-message-pointer))))))
+ (cond
+ ((equal "Q" (vm-message-id-number-of (car vm-message-pointer)))
+ (vm-garbage-collect-message)
+ (setq vmp vm-message-pointer)
+ (while (and vm-message-pointer
+ (equal "Q" (vm-message-id-number-of
+ (car vm-message-pointer))))
+ (setq vm-message-pointer
+ (cdr vm-message-pointer)))
+ ;; if there were no good messages ahead, try going
+ ;; backward.
+ (if (null vm-message-pointer)
+ (progn
+ (setq vm-message-pointer vmp)
+ (while (and vm-message-pointer
+ (equal "Q" (vm-message-id-number-of
+ (car vm-message-pointer))))
+ (setq vm-message-pointer
+ (vm-reverse-link-of
+ (car vm-message-pointer))))))))
;; expunge the virtual messages associated with
;; real messages that are going away.
(setq vm-message-list
diff -r ac1f612d5250 -r 859a2309aef8 lisp/vm/vm-window.el
--- a/lisp/vm/vm-window.el Mon Aug 13 08:49:44 2007 +0200
+++ b/lisp/vm/vm-window.el Mon Aug 13 08:50:05 2007 +0200
@@ -1,5 +1,5 @@
;;; Window management code for VM
-;;; Copyright (C) 1989, 1990, 1991, 1993, 1994, 1995 Kyle E. Jones
+;;; Copyright (C) 1989-1997 Kyle E. Jones
;;;
;;; This program is free software; you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
@@ -17,7 +17,8 @@
(provide 'vm-window)
-(defun vm-display (buffer display commands configs)
+(defun vm-display (buffer display commands configs
+ &optional do-not-raise)
;; the clearinghouse VM display function.
;;
;; First arg BUFFER non-nil is a buffer to display or undisplay.
@@ -62,11 +63,13 @@
;; configuration is done, and only then if the value of
;; this-command is found in the COMMANDS list.
(vm-save-buffer-excursion
- (let ((w (and buffer (vm-get-buffer-window buffer))))
+ (let* ((w (and buffer (vm-get-buffer-window buffer)))
+ (wf (and w (vm-window-frame w))))
(and buffer (set-buffer buffer))
- (and w display (vm-raise-frame (vm-window-frame w)))
- (and w display (not (eq (vm-selected-frame) (vm-window-frame w)))
- (vm-select-frame (vm-window-frame w)))
+ (if (and w display (not do-not-raise))
+ (vm-raise-frame wf))
+ (if (and w display (not (eq (vm-selected-frame) wf)))
+ (vm-select-frame wf))
(cond ((and buffer display)
(if (and vm-display-buffer-hook
(null (vm-get-visible-buffer-window buffer)))
@@ -155,12 +158,16 @@
(setq message vm-mail-buffer)))
((eq major-mode 'vm-mode)
(setq message (current-buffer)))
+ ((eq major-mode 'vm-presentation-mode)
+ (setq message vm-mail-buffer))
((eq major-mode 'vm-virtual-mode)
(setq message (current-buffer)))
((eq major-mode 'mail-mode)
(if (or (null vm-mail-buffer) (null (buffer-name vm-mail-buffer)))
(throw 'done nil)
- (setq message vm-mail-buffer)))
+ (setq message vm-mail-buffer
+ ;; assume that the proximity implies affinity
+ composition (current-buffer))))
((eq vm-system-state 'editing)
(if (or (null vm-mail-buffer) (null (buffer-name vm-mail-buffer)))
(throw 'done nil)
@@ -169,6 +176,9 @@
;; not in a VM related buffer, bail...
(t (throw 'done nil)))
(set-buffer message)
+ (vm-check-for-killed-presentation)
+ (if vm-presentation-buffer
+ (setq message vm-presentation-buffer))
;; if this configuration is already the current one, don't
;; set it up again.
(if (or (and vm-mutable-frames (eq (car config) vm-window-configuration))
@@ -395,7 +405,8 @@
(progn
(condition-case nil
(progn
- (vm-delete-frame delete-me)
+ (if (vm-created-this-frame-p delete-me)
+ (vm-delete-frame delete-me))
(if (eq delete-me start)
(setq start nil)))
(error nil))
@@ -473,21 +484,31 @@
(defun vm-set-hooks-for-frame-deletion ()
(make-local-variable 'vm-undisplay-buffer-hook)
- (make-local-variable 'kill-buffer-hook)
(add-hook 'vm-undisplay-buffer-hook 'vm-delete-buffer-frame)
(add-hook 'kill-buffer-hook 'vm-delete-buffer-frame))
+(defun vm-created-this-frame-p (&optional frame)
+ (memq (or frame (vm-selected-frame)) vm-frame-list))
+
(defun vm-delete-buffer-frame ()
- (save-excursion
- (let ((w (vm-get-visible-buffer-window (current-buffer)))
- (b (current-buffer)))
- (and w (eq (vm-selected-frame) (vm-window-frame w))
- (vm-error-free-call 'vm-delete-frame (vm-window-frame w)))
- (and w (let ((vm-mutable-frames t))
- (vm-delete-windows-or-frames-on b)))))
- ;; do it only once
- (remove-hook 'vm-undisplay-buffer-hook 'vm-delete-buffer-frame)
- (remove-hook 'kill-buffer-hook 'vm-delete-buffer-frame))
+ ;; kludge. we only want to this to run on VM related buffers
+ ;; but this function is generally on a global hook. Check for
+ ;; vm-undisplay-buffer-hook set; this is a good sign that this
+ ;; is a VM buffer.
+ (if vm-undisplay-buffer-hook
+ (save-excursion
+ ;; run once only per buffer.
+ (remove-hook 'vm-undisplay-buffer-hook 'vm-delete-buffer-frame)
+ (let* ((w (vm-get-visible-buffer-window (current-buffer)))
+ (b (current-buffer))
+ (wf (and w (vm-window-frame w))))
+ (and w (eq (vm-selected-frame) wf) (vm-created-this-frame-p wf)
+ (vm-error-free-call 'vm-delete-frame wf))
+ (and w (let ((vm-mutable-frames t))
+ (vm-delete-windows-or-frames-on b)))))))
+
+(defun vm-register-frame (frame)
+ (setq vm-frame-list (cons frame vm-frame-list)))
(defun vm-goto-new-frame (&rest types)
(let ((params nil))
@@ -503,9 +524,42 @@
(select-screen (make-screen params)))
((fboundp 'new-screen)
(select-screen (new-screen params))))
+ (vm-register-frame (vm-selected-frame))
(and vm-warp-mouse-to-new-frame
(vm-warp-mouse-to-frame-maybe (vm-selected-frame)))))
+(defun vm-goto-new-summary-frame-maybe ()
+ (if (and vm-frame-per-summary (vm-multiple-frames-possible-p))
+ (let ((w (vm-get-buffer-window vm-summary-buffer)))
+ (if (null w)
+ (progn
+ (vm-goto-new-frame 'summary)
+ (vm-set-hooks-for-frame-deletion))
+ (save-excursion
+ (select-window w)
+ (and vm-warp-mouse-to-new-frame
+ (vm-warp-mouse-to-frame-maybe (vm-window-frame w))))))))
+
+(defun vm-goto-new-folder-frame-maybe (&rest types)
+ (if (and vm-frame-per-folder (vm-multiple-frames-possible-p))
+ (let ((w (or (vm-get-buffer-window (current-buffer))
+ ;; summary == folder for the purpose
+ ;; of frame reuse.
+ (and vm-summary-buffer
+ (vm-get-buffer-window vm-summary-buffer))
+ ;; presentation == folder for the purpose
+ ;; of frame reuse.
+ (and vm-presentation-buffer
+ (vm-get-buffer-window vm-presentation-buffer)))))
+ (if (null w)
+ (progn
+ (apply 'vm-goto-new-frame types)
+ (vm-set-hooks-for-frame-deletion))
+ (save-excursion
+ (select-window w)
+ (and vm-warp-mouse-to-new-frame
+ (vm-warp-mouse-to-frame-maybe (vm-window-frame w))))))))
+
(defun vm-warp-mouse-to-frame-maybe (&optional frame)
(or frame (setq frame (vm-selected-frame)))
(if (vm-mouse-support-possible-p)
@@ -577,6 +631,22 @@
((fboundp 'screen-visible-p) 'screen-visible-p)
(t 'ignore))))
+(if (fboundp 'frame-iconified-p)
+ (fset 'vm-frame-iconified-p 'frame-iconified-p)
+ (defun vm-frame-iconified-p (&optional frame)
+ (eq (vm-frame-visible-p frame) 'icon)))
+
+;; frame-totally-visible-p is broken under XEmacs 19.14 and is
+;; absent under Emacs 19.34. So vm-frame-per-summary won't work
+;; quite right under these Emacs versions. XEmacs 19.15 should
+;; have a working version of this function.
+(if (and (fboundp 'frame-totally-visible-p)
+ (vm-xemacs-p)
+ (or (>= emacs-major-version 20)
+ (>= emacs-minor-version 15)))
+ (fset 'vm-frame-totally-visible-p 'frame-totally-visible-p)
+ (fset 'vm-frame-totally-visible-p 'vm-frame-visible-p))
+
(fset 'vm-window-frame
(symbol-function
(cond ((fboundp 'window-frame) 'window-frame)
diff -r ac1f612d5250 -r 859a2309aef8 lisp/w3/ChangeLog
--- a/lisp/w3/ChangeLog Mon Aug 13 08:49:44 2007 +0200
+++ b/lisp/w3/ChangeLog Mon Aug 13 08:50:05 2007 +0200
@@ -1,5 +1,181 @@
+Sat Feb 8 13:54:43 1997 William M. Perry
+
+* Emacs-W3 3.0.56 released. Getting closer!
+
+* w3-forms.el (w3-form-summarize-radio-button): Finally, a decent
+ summarization of radio buttons
+ Fixed typo in specifying summarizer for hidden form fields.
+ (w3-form-keymap): Bind C-a and C-e by default.
+
+* w3-widget.el (widget-image-value-create): When using emacspeak, show
+ client side imagemaps as a table. Need a more general solution for
+ this, but this makes us nicer than IE again. :)
+
+* Updated to widget 1.30
+
+Fri Feb 7 16:49:55 1997 William M. Perry
+
+* w3-display.el (w3-handle-string-content): Make sure faces text
+ properties are closed, so that things don't bleed over.
+ (w3-fixup-eol-faces): New function for Emacs 19 that removes face
+ information at newlines, so that underlining will not extend from the
+ end of a line to the window edges - very ugly.
+
+* w3-menu.el (w3-menu-initialize-w3-mode-menu-map): Don't support 'emacs
+ in w3-use-menus under Emacs in Windows 95/NT.
+
+* w3-display.el (w3-finalize-image-download): Deal with bad images better.
+ (w3-finish-drawing): Better protection of putting images in.
+
+* url-gw.el (url-open-stream): Don't auto-retry connections. Don't throw
+ an error if you fail to connect to a site. This is for image loadings
+ that fail for some reason or another.
+
+* css.el (css-expand-length): better handling of float values and 'ex'
+ unit type.
+
+* font.el (x-font-create-object): Unconditionally make case-fold-search
+ non-nil so that we don't lose big-time. This was the cause of the very
+ weird font-spatial-to-canonical lossage under XEmacs with font sizes of
+ something like '+12pt'
+
+* w3.el (w3-view-this-url): Use widget-echo-help if we didn't find a URL
+ under point.
+
+Fri Feb 7 15:22:25 1997 Charles Levert
+
+* w3-widget.el (widget-image-notify): Bad data being fed to w3-fetch if a
+ client-side imagemap had an alt attribute (but only if the
\n"
- "
\n")
- (save-excursion
- (insert "\n\n\n
\n"
- ""))
- (message "Hit C-cC-c to send this annotation.")))
-
-(defun w3-annotation-minor-mode (&optional arg)
- "Minimal minor mode for entering annotations. Just rebinds C-cC-c to
-finish the annotation."
- (interactive "P")
- (cond
- ((null arg) (setq w3-annotation-minor-mode (not w3-annotation-minor-mode)))
- ((= 0 arg) (setq w3-annotation-minor-mode nil))
- (t (setq w3-annotation-minor-mode t)))
- (cond
- ((or w3-running-FSF19 w3-running-xemacs))
- (t (local-set-key "\C-c\C-c" 'w3-personal-annotation-finish)))
- )
-
-(defun w3-annotation-find-highest-number ()
- ;; Find the highest annotation number in this buffer
- (let (x)
- (goto-char (point-min))
- (while (re-search-forward "[^ \t\n]*[ \t]\\(.*\\)" nil t)
- (setq x (nconc (mapcar (function (lambda (x) (string-to-int (car x))))
- (url-split (buffer-substring (match-beginning 1)
- (match-end 1))
- "[ \t]")) x)))
- (if (not x) (setq x '(0)))
- (1+ (car (sort x '>)))))
-
-(defun w3-personal-annotation-finish ()
- "Finish doing a personal annotation."
- (interactive)
- (cond
- ((or w3-running-FSF19 w3-running-xemacs))
- (t (local-set-key "\C-c\C-c" 'undefined)))
- (if (or (not w3-personal-annotation-directory)
- (not (file-exists-p w3-personal-annotation-directory))
- (not (file-directory-p w3-personal-annotation-directory)))
- (error "No personal annotation directory!")
- (let ((url (car w3-current-annotation))
- (txt (buffer-string))
- (title (cdr w3-current-annotation))
- (fname nil)
- (num nil))
- (save-excursion
- (not-modified)
- (kill-buffer (current-buffer))
- (set-buffer (get-buffer-create " *annotmp*"))
- (erase-buffer)
- (if (file-exists-p ; Insert current LOG file if
- ; it exists.
- (format "%s/LOG" w3-personal-annotation-directory))
- (insert-file-contents-literally
- (format "%s/LOG" w3-personal-annotation-directory))
- (progn ; Otherwise, create a file
- (goto-char (point-min)) ; that conforms to first
- ; annotation format from NCSA
- (insert "ncsa-mosaic-personal-annotation-log-format-1\n")
- (insert "Personal\n")))
- (goto-char (point-min))
- (setq num (int-to-string (w3-annotation-find-highest-number))
- fname (format "%s/PAN-%s.html"
- w3-personal-annotation-directory num))
- (goto-char (point-min))
- (if (re-search-forward (regexp-quote url) nil t)
- (progn
- (end-of-line)
- (insert " "))
- (goto-char (point-max))
- (insert "\n" url " "))
- (insert num)
- (let ((make-backup-files nil)
- (version-control nil)
- (require-final-newline t))
- (write-region (point-min) (point-max)
- (format "%s/LOG" w3-personal-annotation-directory))
- (erase-buffer)
- (insert w3-annotation-marker txt)
- (write-region (point-min) (point-max) fname))
- (setq w3-personal-annotations
- (cons (list url (list num title)) w3-personal-annotations))))))
-
-(defun w3-annotation-add ()
- "Add an annotation to the current document."
- (interactive)
- (w3-personal-annotation-add))
diff -r ac1f612d5250 -r 859a2309aef8 lisp/w3/w3-auto.el
--- a/lisp/w3/w3-auto.el Mon Aug 13 08:49:44 2007 +0200
+++ b/lisp/w3/w3-auto.el Mon Aug 13 08:50:05 2007 +0200
@@ -3,14 +3,6 @@
;; About pages
(autoload 'w3-about "w3-about")
-;; Annotation handling
-(autoload 'w3-parse-personal-annotations "w3-annotat")
-(autoload 'w3-is-personal-annotation "w3-annotat")
-(autoload 'w3-delete-personal-annotation "w3-annotat")
-(autoload 'w3-personal-annotation-add "w3-annotat")
-(autoload 'w3-annotation-minor-mode "w3-annotat")
-(autoload 'w3-annotation-add "w3-annotat")
-
;; Hotlist handling
(autoload 'w3-read-html-bookmarks "w3-hot")
(autoload 'w3-hotlist-apropos "w3-hot")
@@ -24,7 +16,6 @@
(autoload 'w3-hotlist-add-document "w3-hot")
;; Printing
-(autoload 'w3-print-with-ps-print "w3-print")
(autoload 'w3-print-this-url "w3-print")
(autoload 'w3-print-url-under-point "w3-print")
(autoload 'w3-parse-tree-to-latex "w3-latex")
diff -r ac1f612d5250 -r 859a2309aef8 lisp/w3/w3-display.el
--- a/lisp/w3/w3-display.el Mon Aug 13 08:49:44 2007 +0200
+++ b/lisp/w3/w3-display.el Mon Aug 13 08:50:05 2007 +0200
@@ -1,7 +1,7 @@
;;; w3-display.el --- display engine v99999
;; Author: wmperry
-;; Created: 1997/01/31 04:26:17
-;; Version: 1.115
+;; Created: 1997/02/08 06:51:44
+;; Version: 1.123
;; Keywords: faces, help, hypermedia
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -365,7 +365,12 @@
(point)))))
(goto-char (point-max))
(add-text-properties w3-scratch-start-point
- (point) (list 'face w3-active-faces 'duplicable t))
+ (point) (list 'face w3-active-faces
+ 'start-open t
+ 'end-open t
+ 'rear-nonsticky t
+ 'duplicable t
+ 'read-only t))
(if (car w3-active-voices)
(add-text-properties w3-scratch-start-point (point)
(list 'personality (car w3-active-voices))))
@@ -618,43 +623,47 @@
(defun w3-maybe-start-image-download (widget)
(let* ((src (widget-get widget 'src))
(cached-glyph (w3-image-cached-p src)))
- (if (and cached-glyph (widget-glyphp cached-glyph))
- (setq w3-image-widgets-waiting (cons widget w3-image-widgets-waiting))
- (cond
- ((or w3-delay-image-loads ; Delaying images
- (not (fboundp 'valid-specifier-domain-p)) ; Can't do images
- (eq (device-type) 'tty)) ; Why bother?
- (w3-add-delayed-graphic widget))
- ((not (w3-image-loadable-p src nil)) ; Hey, we can't load it!
- (w3-warn 'images (format "Skipping image %s" (url-basepath src t)))
- (w3-add-delayed-graphic widget))
- (t ; Grab the images
- (let (
- (url-request-method "GET")
- (old-asynch url-be-asynchronous)
- (url-request-data nil)
- (url-request-extra-headers nil)
- (url-source t)
- (url-mime-accept-string (substring
- (mapconcat
- (function
- (lambda (x)
- (if x
- (concat (car x) ",")
- "")))
- w3-allowed-image-types "")
- 0 -1))
- (url-working-buffer (generate-new-buffer-name " *W3GRAPH*")))
- (setq-default url-be-asynchronous t)
- (setq w3-graphics-list (cons (cons src (make-glyph))
- w3-graphics-list))
- (save-excursion
- (set-buffer (get-buffer-create url-working-buffer))
- (setq url-current-callback-data (list widget)
- url-be-asynchronous t
- url-current-callback-func 'w3-finalize-image-download)
- (url-retrieve src))
- (setq-default url-be-asynchronous old-asynch)))))))
+ (cond
+ ((and cached-glyph
+ (widget-glyphp cached-glyph)
+ (not (eq 'nothing
+ (image-instance-type
+ (glyph-image-instance cached-glyph)))))
+ (setq w3-image-widgets-waiting (cons widget w3-image-widgets-waiting)))
+ ((or w3-delay-image-loads ; Delaying images
+ (not (fboundp 'valid-specifier-domain-p)) ; Can't do images
+ (eq (device-type) 'tty)) ; Why bother?
+ (w3-add-delayed-graphic widget))
+ ((not (w3-image-loadable-p src nil)) ; Hey, we can't load it!
+ (w3-warn 'images (format "Skipping image %s" (url-basepath src t)))
+ (w3-add-delayed-graphic widget))
+ (t ; Grab the images
+ (let (
+ (url-request-method "GET")
+ (old-asynch url-be-asynchronous)
+ (url-request-data nil)
+ (url-request-extra-headers nil)
+ (url-source t)
+ (url-mime-accept-string (substring
+ (mapconcat
+ (function
+ (lambda (x)
+ (if x
+ (concat (car x) ",")
+ "")))
+ w3-allowed-image-types "")
+ 0 -1))
+ (url-working-buffer (generate-new-buffer-name " *W3GRAPH*")))
+ (setq-default url-be-asynchronous t)
+ (setq w3-graphics-list (cons (cons src (make-glyph))
+ w3-graphics-list))
+ (save-excursion
+ (set-buffer (get-buffer-create url-working-buffer))
+ (setq url-current-callback-data (list widget)
+ url-be-asynchronous t
+ url-current-callback-func 'w3-finalize-image-download)
+ (url-retrieve src))
+ (setq-default url-be-asynchronous old-asynch))))))
(defun w3-finalize-image-download (widget)
(let ((glyph nil)
@@ -794,6 +803,7 @@
(setq st (min (point-max) (1+ nd))))))))
(defun w3-size-of-tree (tree minmax)
+ (declare (special args))
(save-excursion
(save-restriction
(narrow-to-region (point) (point))
@@ -839,6 +849,7 @@
(defun w3-display-table-dimensions (node)
;; fill-column sets maximum width
+ (declare (special args))
(let (min-vector
max-vector
rows cols
@@ -1299,7 +1310,7 @@
(setq this-rectangle (aref formatted-cols i))
(if (> height (length this-rectangle))
(let ((colspan-fill-line
- (make-string (aref table-colwidth i) ? )))
+ (make-string (abs (aref table-colwidth i)) ? )))
(case valign
((center middle)
(aset formatted-cols i
@@ -1481,6 +1492,7 @@
(content-stack (list (list node)))
(right-margin-stack (list fill-column))
(left-margin-stack (list 0))
+ (inhibit-read-only t)
node
insert-before
insert-after
@@ -1808,25 +1820,25 @@
w3-current-form-number)
args))
(w3-handle-content node)))
- (keygen
- (w3-form-add-element 'keygen
- (or (w3-get-attribute 'name)
- (w3-get-attribute 'id)
- "keygen")
- nil ; value
- nil ; size
- nil ; maxlength
- nil ; default
- w3-display-form-id ; action
- nil ; options
- w3-current-form-number
- (w3-get-attribute 'id) ; id
- nil ; checked
- (car w3-active-faces)))
+; (keygen
+; (w3-form-add-element 'keygen
+; (or (w3-get-attribute 'name)
+; (w3-get-attribute 'id)
+; "keygen")
+; nil ; value
+; nil ; size
+; nil ; maxlength
+; nil ; default
+; w3-display-form-id ; action
+; nil ; options
+; w3-current-form-number
+; (w3-get-attribute 'id) ; id
+; nil ; checked
+; (car w3-active-faces)))
(input
(w3-form-add-element
(w3-display-normalize-form-info args)
- (car w3-active-faces))
+ w3-active-faces)
(w3-handle-empty-tag)
)
(select
@@ -1870,7 +1882,7 @@
(w3-handle-content node))
(setq plist (plist-put plist 'type 'option)
plist (plist-put plist 'options options))
- (w3-form-add-element plist (car w3-active-faces))
+ (w3-form-add-element plist w3-active-faces)
;; This should really not be necessary, but some versions
;; of the widget library leave point _BEFORE_ the menu
;; widget instead of after.
@@ -1882,7 +1894,7 @@
(apply 'concat (nth 2 node)))))
(setq plist (plist-put plist 'type 'multiline)
plist (plist-put plist 'value value))
- (w3-form-add-element plist (car w3-active-faces)))
+ (w3-form-add-element plist w3-active-faces))
(w3-handle-empty-tag)
)
(style
@@ -1954,34 +1966,46 @@
(- nd st)))
+(defun w3-fixup-eol-faces ()
+ ;; Remove 'face property at end of lines - underlining screws up stuff
+ (let ((inhibit-read-only t))
+ (save-excursion
+ (goto-char (point-min))
+ (while (search-forward "\n" nil t)
+ (put-text-property (match-beginning 0) (match-end 0) 'face nil)))))
+
(defsubst w3-finish-drawing ()
- (if (and (boundp 'w3-image-widgets-waiting) w3-image-widgets-waiting)
- (let (url glyph widget)
- (while w3-image-widgets-waiting
- (setq widget (car w3-image-widgets-waiting)
- w3-image-widgets-waiting (cdr w3-image-widgets-waiting)
- url (widget-get widget 'src)
- glyph (cdr-safe (assoc url w3-graphics-list)))
- (widget-value-set widget glyph)))
- ;;(w3-handle-annotations)
- ;;(w3-handle-headers)
- )
+ (let (url glyph widget)
+ (while w3-image-widgets-waiting
+ (setq widget (car w3-image-widgets-waiting)
+ w3-image-widgets-waiting (cdr w3-image-widgets-waiting)
+ url (widget-get widget 'src)
+ glyph (cdr-safe (assoc url w3-graphics-list)))
+ (condition-case nil
+ (widget-value-set widget glyph)
+ (error nil))))
+ (and (not w3-running-xemacs)
+ (not (eq (device-type) 'tty))
+ (w3-fixup-eol-faces))
+ ;;(w3-handle-headers)
)
(defun w3-region (st nd)
(if (not w3-setup-done) (w3-do-setup))
(let* ((source (buffer-substring st nd))
- (w3-display-same-buffer t)
+ (w3-dislplay-same-buffer t)
(parse nil))
- (save-excursion
- (set-buffer (get-buffer-create " *w3-region*"))
- (erase-buffer)
- (insert source)
- (setq parse (w3-parse-buffer (current-buffer))))
- (narrow-to-region st nd)
- (delete-region (point-min) (point-max))
- (w3-draw-tree parse)
- (w3-finish-drawing)))
+ (save-window-excursion
+ (save-excursion
+ (set-buffer (get-buffer-create " *w3-region*"))
+ (erase-buffer)
+ (insert source)
+ (setq parse (w3-parse-buffer (current-buffer))))
+ (narrow-to-region st nd)
+ (delete-region (point-min) (point-max))
+ (w3-draw-tree parse)
+ (w3-finish-drawing)
+ (widen))))
(defun w3-refresh-buffer ()
(interactive)
diff -r ac1f612d5250 -r 859a2309aef8 lisp/w3/w3-emulate.el
--- a/lisp/w3/w3-emulate.el Mon Aug 13 08:49:44 2007 +0200
+++ b/lisp/w3/w3-emulate.el Mon Aug 13 08:50:05 2007 +0200
@@ -1,7 +1,7 @@
;;; w3-emulate.el --- All variable definitions for emacs-w3
;; Author: wmperry
-;; Created: 1997/01/22 16:28:30
-;; Version: 1.6
+;; Created: 1997/02/04 19:21:18
+;; Version: 1.11
;; Keywords: comm, help, hypermedia
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -80,9 +80,9 @@
(define-key w3-netscape-emulation-minor-mode-map [right] 'scroll-left)
(define-key w3-netscape-emulation-minor-mode-map [left] 'scroll-right)
(define-key w3-netscape-emulation-minor-mode-map [(meta left)]
- 'w3-backward-in-history)
+ 'w3-history-backward)
(define-key w3-netscape-emulation-minor-mode-map [(meta right)]
- 'w3-forward-in-history)
+ 'w3-history-forward)
(defun turn-on-netscape-emulation ()
(interactive)
@@ -186,31 +186,72 @@
(setq w3-lynx-emulation-minor-mode t
w3-netscape-emulation-minor-mode nil))))
+;; The list of keybindings for lynx minor mode was compiled from:
+;; http://www.crl.com/~subir/lynx/lynx_help/keystroke_commands/keystroke_help.htm
+
+;; Movement
+(define-key w3-lynx-emulation-minor-mode-map [up] 'w3-widget-backward)
+(define-key w3-lynx-emulation-minor-mode-map [down] 'w3-widget-forward)
+(define-key w3-lynx-emulation-minor-mode-map [right] 'w3-follow-link)
+(define-key w3-lynx-emulation-minor-mode-map [left] 'w3-history-backward)
+
+;; Scrolling
(define-key w3-lynx-emulation-minor-mode-map "+" 'w3-scroll-up)
(define-key w3-lynx-emulation-minor-mode-map "-" 'scroll-down)
(define-key w3-lynx-emulation-minor-mode-map "b" 'scroll-down)
-(define-key w3-lynx-emulation-minor-mode-map "a" 'w3-hotlist-add-document)
-(define-key w3-lynx-emulation-minor-mode-map "c" 'w3-mail-document-author)
-(define-key w3-lynx-emulation-minor-mode-map "e" 'w3-edit-source)
-(define-key w3-lynx-emulation-minor-mode-map "g" 'w3-fetch)
-(define-key w3-lynx-emulation-minor-mode-map "i" 'ignore)
-(define-key w3-lynx-emulation-minor-mode-map "m" 'w3)
-(define-key w3-lynx-emulation-minor-mode-map "o" 'ignore)
-(define-key w3-lynx-emulation-minor-mode-map "p" 'w3-print-this-url)
-(define-key w3-lynx-emulation-minor-mode-map "q" 'w3-quit)
-(define-key w3-lynx-emulation-minor-mode-map "/" 'w3-search-forward)
-(define-key w3-lynx-emulation-minor-mode-map "s" 'w3-search-forward)
-(define-key w3-lynx-emulation-minor-mode-map "n" 'w3-search-again)
-(define-key w3-lynx-emulation-minor-mode-map "v" 'w3-show-hotlist)
-(define-key w3-lynx-emulation-minor-mode-map "=" 'w3-document-information)
+(define-key w3-lynx-emulation-minor-mode-map "\C-a" 'w3-start-of-document)
+(define-key w3-lynx-emulation-minor-mode-map "\C-e" 'w3-end-of-document)
+(define-key w3-lynx-emulation-minor-mode-map "\C-f" 'scroll-down)
+(define-key w3-lynx-emulation-minor-mode-map "\C-n" 'ignore) ; down 2
+(define-key w3-lynx-emulation-minor-mode-map "\C-p" 'ignore) ; up 2
+(define-key w3-lynx-emulation-minor-mode-map ")" 'ignore) ; forward half
+(define-key w3-lynx-emulation-minor-mode-map "(" 'ignore) ; back half
+(define-key w3-lynx-emulation-minor-mode-map "#" 'w3-toggle-toolbar)
+
+;; Dired bindings don't have any meaning for us
+
+;; Other
+(define-key w3-lynx-emulation-minor-mode-map "?" 'w3-help)
+(define-key w3-lynx-emulation-minor-mode-map "a" 'w3-hotlist-add-document)
+(define-key w3-lynx-emulation-minor-mode-map "c" 'w3-mail-document-author)
+(define-key w3-lynx-emulation-minor-mode-map "d" 'w3-download-url)
+(define-key w3-lynx-emulation-minor-mode-map "e" 'ignore) ; edit current
+(define-key w3-lynx-emulation-minor-mode-map "f" 'dired)
+(define-key w3-lynx-emulation-minor-mode-map "g" 'w3-fetch)
+(define-key w3-lynx-emulation-minor-mode-map "h" 'w3-help)
+(define-key w3-lynx-emulation-minor-mode-map "i" 'ignore)
+(define-key w3-lynx-emulation-minor-mode-map "j" 'w3-use-hotlist)
+(define-key w3-lynx-emulation-minor-mode-map "k" 'describe-mode)
+(define-key w3-lynx-emulation-minor-mode-map "l" 'w3-complete-link)
+(define-key w3-lynx-emulation-minor-mode-map "m" 'w3)
+(define-key w3-lynx-emulation-minor-mode-map "n" 'w3-search-again)
+(define-key w3-lynx-emulation-minor-mode-map "o" 'w3-preferences-edit)
+(define-key w3-lynx-emulation-minor-mode-map "p" 'w3-print-this-url)
+(define-key w3-lynx-emulation-minor-mode-map "q" 'w3-quit)
+(define-key w3-lynx-emulation-minor-mode-map "r" 'w3-hotlist-delete)
+(define-key w3-lynx-emulation-minor-mode-map "t" 'ignore) ; tag
+(define-key w3-lynx-emulation-minor-mode-map "u" 'w3-history-backward)
+(define-key w3-lynx-emulation-minor-mode-map "/" 'w3-search-forward)
+(define-key w3-lynx-emulation-minor-mode-map "v" 'w3-show-hotlist)
+(define-key w3-lynx-emulation-minor-mode-map "V" 'w3-show-hotlist)
+(define-key w3-lynx-emulation-minor-mode-map "x" 'w3-follow-link)
+(define-key w3-lynx-emulation-minor-mode-map "z" 'keyboard-quit)
+(define-key w3-lynx-emulation-minor-mode-map "=" 'w3-document-information)
+(define-key w3-lynx-emulation-minor-mode-map "\\" 'w3-source-document)
+(define-key w3-lynx-emulation-minor-mode-map "!" 'shell)
+(define-key w3-lynx-emulation-minor-mode-map "'" 'ignore) ; toggle comment
+(define-key w3-lynx-emulation-minor-mode-map "`" 'ignore) ; toggle comment
+(define-key w3-lynx-emulation-minor-mode-map "*" 'ignore) ; toggle image_links
+(define-key w3-lynx-emulation-minor-mode-map "@" 'ignore) ; toggle raw 8-bit
+(define-key w3-lynx-emulation-minor-mode-map "[" 'ignore) ; pseudo-inlines
+(define-key w3-lynx-emulation-minor-mode-map "]" 'ignore) ; send head
+(define-key w3-lynx-emulation-minor-mode-map "\"" 'ignore) ; toggle quoting
(define-key w3-lynx-emulation-minor-mode-map "\C-r" 'w3-reload-document)
(define-key w3-lynx-emulation-minor-mode-map "\C-w" 'w3-refresh-buffer)
-(define-key w3-lynx-emulation-minor-mode-map "\\" 'w3-source-document)
-(define-key w3-lynx-emulation-minor-mode-map "!" 'shell)
-(define-key w3-lynx-emulation-minor-mode-map [up] 'w3-widget-backward)
-(define-key w3-lynx-emulation-minor-mode-map [down] 'w3-widget-forward)
-(define-key w3-lynx-emulation-minor-mode-map [right] 'w3-follow-link)
-(define-key w3-lynx-emulation-minor-mode-map [left] 'w3-backward-in-history)
+(define-key w3-lynx-emulation-minor-mode-map "\C-u" 'ignore) ; erase input
+(define-key w3-lynx-emulation-minor-mode-map "\C-g" 'keyboard-quit)
+(define-key w3-lynx-emulation-minor-mode-map "\C-t" 'ignore) ; toggle trace
+(define-key w3-lynx-emulation-minor-mode-map "\C-k" 'ignore) ; cookie jar
(provide 'w3-emulate)
diff -r ac1f612d5250 -r 859a2309aef8 lisp/w3/w3-forms.el
--- a/lisp/w3/w3-forms.el Mon Aug 13 08:49:44 2007 +0200
+++ b/lisp/w3/w3-forms.el Mon Aug 13 08:50:05 2007 +0200
@@ -1,7 +1,7 @@
;;; w3-forms.el --- Emacs-w3 forms parsing code for new display engine
;; Author: wmperry
-;; Created: 1997/01/28 14:21:54
-;; Version: 1.55
+;; Created: 1997/02/09 06:39:43
+;; Version: 1.65
;; Keywords: faces, help, comm, data, languages
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -29,20 +29,40 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; FORMS processing for html 2.0/3.0
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(eval-when-compile
+ (require 'cl))
+
(eval-and-compile
(require 'w3-display)
- (require 'widget))
+ (require 'widget)
+ (require 'widget-edit))
(require 'w3-vars)
(require 'mule-sysdp)
+(defvar w3-form-use-old-style nil
+ "*Non-nil means use the old way of interacting for form fields.")
+
(define-widget-keywords :emacspeak-help :w3-form-data)
(defvar w3-form-keymap (copy-keymap global-map))
+(if (and w3-form-keymap widget-keymap)
+ (cl-map-keymap (function
+ (lambda (key binding)
+ (define-key w3-form-keymap
+ (if (vectorp key) key (vector key))
+ (case binding
+ (widget-backward 'w3-widget-backward)
+ (widget-forward 'w3-widget-forward)
+ (otherwise binding)))))
+ widget-keymap))
+(define-key w3-form-keymap [return] 'w3-form-maybe-submit-by-keypress)
(define-key w3-form-keymap "\r" 'w3-form-maybe-submit-by-keypress)
(define-key w3-form-keymap "\n" 'w3-form-maybe-submit-by-keypress)
(define-key w3-form-keymap "\t" 'w3-widget-forward)
-(define-key w3-form-keymap [(shift tab)] 'w3-widget-backward)
+(define-key w3-form-keymap "\C-k" 'widget-kill-line)
+(define-key w3-form-keymap "\C-a" 'widget-beginning-of-line)
+(define-key w3-form-keymap "\C-e" 'widget-end-of-line)
;; A form entry area is a vector
;; [ type name default-value value maxlength options widget plist]
@@ -84,16 +104,21 @@
(multiline 21)
(hidden nil)
(file (or size 26))
- ((float password text int) (or size 20))
+ ((float password text int)
+ (if w3-form-use-old-style
+ (or size 22)
+ (or size 20)))
(image (+ 2 (length (or
(plist-get (w3-form-element-plist el) 'alt)
"Form-Image"))))
(option
- (or size
- (length (caar (sort (w3-form-element-options el)
- (function
- (lambda (x y)
- (>= (length (car x)) (length (car y))))))))))
+ (let ((options (copy-sequence (w3-form-element-options el))))
+ (or size
+ (length (caar (sort options
+ (function
+ (lambda (x y)
+ (>= (length (car x))
+ (length (car y)))))))))))
(otherwise (or size 22))))
;;###autoload
@@ -120,19 +145,21 @@
(if size
(set-text-properties (point)
(progn (insert-char ?T size) (point))
- (list 'w3-form-info el
+ (list 'w3-form-info (cons el face)
'start-open t
'end-open t
'rear-nonsticky t)))))
(defun w3-form-resurrect-widgets ()
(let ((st (point-min))
- info nd node action)
+ info nd node action face)
(while st
(if (setq info (get-text-property st 'w3-form-info))
(progn
(setq nd (or (next-single-property-change st 'w3-form-info)
(point-max))
+ face (cdr info)
+ info (car info)
action (w3-form-element-action info)
node (assoc action w3-form-elements))
(goto-char st)
@@ -143,7 +170,7 @@
(setcdr node (cons info (cdr node)))
(setq w3-form-elements (cons (cons action (list info))
w3-form-elements)))
- (w3-form-add-element-internal info)
+ (w3-form-add-element-internal info face)
(setq st (next-single-property-change st 'w3-form-info)))
(setq st (next-single-property-change st 'w3-form-info))))))
@@ -173,9 +200,10 @@
(while widgets
(setq widget (pop widgets))
(widget-put widget :emacspeak-help 'w3-form-summarize-field)
+ (widget-put widget :help-echo 'w3-form-summarize-field)
(widget-put widget :w3-form-data el))))
-(defun w3-form-add-element-internal (el)
+(defun w3-form-add-element-internal (el face)
(let* ((widget nil)
(buffer-read-only nil)
(inhibit-read-only t)
@@ -184,7 +212,7 @@
'w3-widget-creation-function)
'w3-form-default-widget-creator)
widget (and (fboundp widget-creation-function)
- (funcall widget-creation-function el nil)))
+ (funcall widget-creation-function el face)))
(if (not widget)
nil
(w3-form-mark-widget widget el))))
@@ -230,7 +258,7 @@
(defun w3-form-create-checkbox (el face)
(widget-create 'checkbox
- :value-face face
+ :button-face face
(and (w3-form-element-default-value el) t)))
(defun w3-form-radio-button-update (widget child event)
@@ -281,6 +309,7 @@
(widget-create 'push-button
:notify 'ignore
:button-face face
+ :value-face face
val)))
(defun w3-form-create-image (el face)
@@ -302,6 +331,7 @@
(defun w3-form-create-file-browser (el face)
(widget-create 'file
+ :button-face face
:value-face face
:size (w3-form-element-size el)
:must-match t
@@ -333,6 +363,7 @@
:ignore-case t
:tag "Key Length"
:size (1+ longest)
+ :button-face face
:value-face face
options)))
@@ -345,12 +376,15 @@
:format "%v"
:size size
:value-face face
+ :button-face face
(mapcar
(function
(lambda (x)
(list 'choice-item :format "%[%t%]"
:emacspeak-help 'w3-form-summarize-field
:tag (mule-truncate-string (car x) size ? )
+ :button-face face
+ :value-face face
:value (car x))))
(w3-form-element-options el)))))
(widget-value-set widget (w3-form-element-value el))
@@ -365,45 +399,52 @@
"Multiline text area"))
(defun w3-form-create-integer (el face)
- (widget-create 'integer
- :size (w3-form-element-size el)
- :value-face face
- :tag ""
- :format "%v"
- :keymap w3-form-keymap
- :w3-form-data el
- (w3-form-element-value el)))
+ (if w3-form-use-old-style
+ (w3-form-default-widget-creator el face)
+ (widget-create 'integer
+ :size (w3-form-element-size el)
+ :value-face face
+ :tag ""
+ :format "%v"
+ :keymap w3-form-keymap
+ :w3-form-data el
+ (w3-form-element-value el))))
(defun w3-form-create-float (el face)
- (widget-create 'number
- :size (w3-form-element-size el)
- :value-face face
- :format "%v"
- :tag ""
- :keymap w3-form-keymap
- :w3-form-data el
- (w3-form-element-value el)))
+ (if w3-form-use-old-style
+ (w3-form-default-widget-creator el face)
+ (widget-create 'number
+ :size (w3-form-element-size el)
+ :value-face face
+ :format "%v"
+ :tag ""
+ :keymap w3-form-keymap
+ :w3-form-data el
+ (w3-form-element-value el))))
(defun w3-form-create-text (el face)
- (widget-create 'editable-field
- :keymap w3-form-keymap
- :size (w3-form-element-size el)
- :value-face face
- :w3-form-data el
- (w3-form-element-value el)))
+ (if w3-form-use-old-style
+ (w3-form-default-widget-creator el face)
+ (widget-create 'editable-field
+ :keymap w3-form-keymap
+ :size (w3-form-element-size el)
+ :value-face face
+ :w3-form-data el
+ (w3-form-element-value el))))
(defun w3-form-create-password (el face)
;; *sigh* This will fail under XEmacs, but I can yell at them about
;; upgrading separately for the release of 19.15 and 20.0
- (if (boundp :secret)
- (widget-create 'editable-field
- :secret ?*
- :keymap w3-form-keymap
- :size (w3-form-element-size el)
- :value-face face
- :w3-form-data el
- (w3-form-element-value el))
- (w3-form-default-widget-creator el face)))
+ (if w3-form-use-old-style
+ (w3-form-default-widget-creator el face)
+ (widget-create 'editable-field
+ :secret ?*
+ :keymap w3-form-keymap
+ :size (w3-form-element-size el)
+ :value-face face
+ :button-face face
+ :w3-form-data el
+ (w3-form-element-value el))))
(defun w3-form-default-widget-creator (el face)
(widget-create 'link
@@ -411,6 +452,7 @@
:value-to-internal 'w3-form-default-button-update
:size (w3-form-element-size el)
:value-face face
+ :button-face face
:w3-form-data el
(w3-form-element-value el)))
@@ -422,7 +464,7 @@
(if (eq 'password (w3-form-element-type info))
(make-string (length v) ?*)
v)
- (w3-form-element-size info) ?_)))
+ (w3-form-element-size info) ? )))
v))
(defun w3-form-default-button-callback (widget &rest ignore)
@@ -452,7 +494,7 @@
(put 'option 'w3-summarize-function 'w3-form-summarize-option-list)
(put 'keygen 'w3-summarize-function 'w3-form-summarize-keygen-list)
(put 'image 'w3-summarize-function 'w3-form-summarize-image)
-(put 'hidden 'w3-summariez-function 'ignore)
+(put 'hidden 'w3-summarize-function 'ignore)
(defun w3-form-summarize-field (widget &rest ignore)
"Sumarize a widget that should be a W3 form entry area.
@@ -530,7 +572,7 @@
(let ((name (w3-form-element-name data))
(label (w3-form-field-label data))
(cur-value (widget-value (w3-form-element-widget data)))
- (this-value (widget-value widget)))
+ (this-value (widget-value (widget-get-sibling widget))))
(format "Radio button %s is %s, could be %s" (or label name) cur-value
this-value)))
@@ -639,7 +681,7 @@
deft (w3-form-element-default-value formobj)
type (w3-form-element-type formobj))
(case type
- ((submit reset image) nil)
+ ((submit reset image hidden) nil)
(radio
(setq deft (widget-get widget 'w3-form-default-value))
(if (and widget deft)
@@ -823,6 +865,7 @@
(lambda (char)
(cond
((= char ? ) "+")
+ ((memq char '(?: ?/)) (char-to-string char))
((memq char url-unreserved-chars) (char-to-string char))
(t (upcase (format "%%%02x" char))))))
(mule-encode-string chunk) ""))
diff -r ac1f612d5250 -r 859a2309aef8 lisp/w3/w3-menu.el
--- a/lisp/w3/w3-menu.el Mon Aug 13 08:49:44 2007 +0200
+++ b/lisp/w3/w3-menu.el Mon Aug 13 08:50:05 2007 +0200
@@ -1,7 +1,7 @@
;;; w3-menu.el --- Menu functions for emacs-w3
;; Author: wmperry
-;; Created: 1997/01/21 20:54:49
-;; Version: 1.25
+;; Created: 1997/02/08 05:30:56
+;; Version: 1.27
;; Keywords: menu, hypermedia
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -44,8 +44,8 @@
(defvar w3-links-menu nil "Menu for w3-mode in XEmacs.")
(make-variable-buffer-local 'w3-links-menu)
-(defvar w3-use-menus '(file edit view go bookmark options
- buffers style emacs nil help)
+(defvar w3-use-menus '(file edit view go bookmark options buffers style
+ emacs nil help)
"*Non-nil value causes W3 to provide a menu interface.
A value that is a list causes W3 to install its own menubar.
A value of 1 causes W3 to install a \"W3\" item in the Emacs menubar.
@@ -70,7 +70,11 @@
If nil appears in the list, it should appear exactly once. All
menus after nil in the list will be displayed flushright in the
-menubar.")
+menubar.
+
+NOTE! The current port of Emacs to Windows NT/95 does not support
+buttons in the menubar, so the 'emacs' keyword is currently ignored
+on that platform.")
(defun w3-menu-hotlist-constructor (menu-items)
(or (cdr w3-html-bookmarks)
@@ -226,7 +230,6 @@
["PostScript" (w3-mail-current-document nil "PostScript") t]
["LaTeX Source" (w3-mail-current-document nil "LaTeX Source") t]
)
- ["Add Annotation" w3-annotation-add w3-personal-annotation-directory]
(if w3-running-xemacs
"---:shadowDoubleEtchedIn"
"---")
@@ -277,8 +280,8 @@
(defconst w3-menu-go-menu
(list
"Go"
- ["Forward" w3-forward-in-history t]
- ["Backward" w3-backward-in-history t]
+ ["Forward" w3-history-forward (cdr (w3-history-find-url-internal (url-view-url t)))]
+ ["Back" w3-history-backward (car (w3-history-find-url-internal (url-view-url t)))]
["Home" w3 w3-default-homepage]
["View History..." w3-show-history-list url-keep-history]
"----"
@@ -466,7 +469,13 @@
(search
(cons "Search" w3-menu-fsfemacs-search-menu))
(emacs
- (cons "[Emacs]" 'w3-menu-toggle-menubar))))
+ ;; FIXME!!! Currently, win32 doesn't support buttons
+ ;; in menubars, so we hack around it and ignore the
+ ;; 'emacs keyword on that platform. REMOVE THIS CODE
+ ;; as soon as that is fixed. 19.35 timeframe?
+ (if (eq (device-type) 'win32)
+ nil
+ (cons "[Emacs]" 'w3-menu-toggle-menubar)))))
cons
(vec (vector 'rootmenu 'w3 nil))
;; menus appear in the opposite order that we
diff -r ac1f612d5250 -r 859a2309aef8 lisp/w3/w3-parse.el
--- a/lisp/w3/w3-parse.el Mon Aug 13 08:49:44 2007 +0200
+++ b/lisp/w3/w3-parse.el Mon Aug 13 08:50:05 2007 +0200
@@ -2136,7 +2136,7 @@
;; Read the attributes from a start-tag.
(if w3-p-d-end-tag-p
- (if (looking-at "[ \t\r\n/]*>")
+ (if (looking-at "[ \t\r\n/]*[<>]")
nil
;; This is in here to deal with those idiots who stick
;; attribute/value pairs on end tags. *sigh*
@@ -2330,6 +2330,19 @@
(setq tag-attributes (cons (cons 'class (list w3-p-s-btdt))
tag-attributes))))
)
+ (if (not (eq w3-p-d-tag-name 'input))
+ nil
+ (setq w3-p-s-btdt (concat ":"
+ (downcase
+ (or (cdr-safe
+ (assq 'type tag-attributes))
+ "text"))))
+ (if (assq 'class tag-attributes)
+ (setcdr (assq 'class tag-attributes)
+ (cons w3-p-s-btdt
+ (cdr (assq 'class tag-attributes))))
+ (setq tag-attributes (cons (cons 'class (list w3-p-s-btdt))
+ tag-attributes))))
)
;; Process the end of the tag.
diff -r ac1f612d5250 -r 859a2309aef8 lisp/w3/w3-print.el
--- a/lisp/w3/w3-print.el Mon Aug 13 08:49:44 2007 +0200
+++ b/lisp/w3/w3-print.el Mon Aug 13 08:50:05 2007 +0200
@@ -1,7 +1,7 @@
;;; w3-print.el --- Printing support for emacs-w3
;; Author: wmperry
-;; Created: 1997/01/10 00:13:05
-;; Version: 1.6
+;; Created: 1997/02/07 01:05:01
+;; Version: 1.7
;; Keywords: faces, help, printing, hypermedia
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -25,77 +25,12 @@
;;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
;;; Boston, MA 02111-1307, USA.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(defvar w3-use-ps-print nil
- "*If non-nil, then printing will be done via the ps-print package by
-James C. Thompson .")
-
-(defun w3-face-type (face)
- "Return a list specifying what a face looks like. ie: '(bold italic)"
- (let ((font (or (face-font face) (face-font 'default)))
- (retval nil))
- (if (not (stringp font))
- (setq font
- (cond
- ((and (fboundp 'fontp) (not (fontp font))) nil)
- ((fboundp 'font-truename) (font-truename font))
- ((fboundp 'font-name) (font-name font))
- (t nil))))
- (cond
- ((not font) nil)
- ((string-match "^-\\([^-]+\\)-\\([^-]+\\)-\\([^-]+\\)-\\([^-]+\\)-" font)
- (let ((wght (substring font (match-beginning 3) (match-end 3)))
- (slnt (substring font (match-beginning 4) (match-end 4))))
- (if (string-match "bold" wght)
- (setq retval (cons 'bold retval)))
- (if (or (string-match "i" slnt) (string-match "o" slnt))
- (setq retval (cons 'italic retval)))
- (if (and (fboundp 'face-underline-p)
- (face-underline-p face))
- (setq retval (cons 'underline retval)))))
- ((and (symbolp face) (string-match "bold" (symbol-name face)))
- (setq retval '(bold)))
- ((and (symbolp face) (string-match "italic" (symbol-name face)))
- (setq retval '(italic)))
- (t nil))
- retval))
-
-(defun w3-print-with-ps-print (&optional buffer function)
- "Print a buffer using `ps-print-buffer-with-faces'.
-This function wraps `ps-print-buffer-with-faces' so that the w3 faces
-will be correctly listed in ps-bold-faces and ps-italic-faces"
- (interactive)
- (require 'ps-print)
- (setq buffer (or buffer (current-buffer))
- function (or function 'ps-print-buffer-with-faces))
- (let ((ps-bold-faces ps-bold-faces)
- (ps-italic-faces ps-italic-faces)
- (inhibit-read-only t)
- (ps-underline-faces (cond
- ((boundp 'ps-underline-faces)
- (symbol-value 'ps-underline-faces))
- ((boundp 'ps-underlined-faces)
- (symbol-value 'ps-underlined-faces))
- (t nil)))
- (ps-underlined-faces nil)
- (ps-left-header '(ps-get-buffer-name url-view-url))
- (faces (face-list))
- (data nil)
- (face nil))
- (if (string< ps-print-version "1.6")
- (while faces
- (setq face (car faces)
- data (w3-face-type face)
- faces (cdr faces))
- (if (and (memq 'bold data) (not (memq face ps-bold-faces)))
- (setq ps-bold-faces (cons face ps-bold-faces)))
- (if (and (memq 'italic data) (not (memq face ps-italic-faces)))
- (setq ps-italic-faces (cons face ps-italic-faces)))
- (if (and (memq 'underline data) (not (memq face ps-underline-faces)))
- (setq ps-underline-faces (cons face ps-underline-faces))))
- (setq ps-underlined-faces ps-underline-faces))
- (save-excursion
- (set-buffer buffer)
- (funcall function))))
+(defvar w3-postscript-print-function 'ps-print-buffer-with-faces
+ "*Name of the function to use to print a buffer as PostScript.
+This should take no arguments, and act on the current buffer.
+Possible values include:
+ps-print-buffer-with-faces - print immediately
+ps-spool-buffer-with-faces - spool for later")
(defun w3-print-this-url (&optional url format)
"Print out the current document (in LaTeX format)"
@@ -125,7 +60,7 @@
(equal "" format))
(lpr-buffer))
((equal "PostScript" format)
- (w3-print-with-ps-print (current-buffer)))
+ (funcall w3-postscript-print-function))
((equal "LaTeX'd" format)
(w3-parse-tree-to-latex w3-current-parse url)
(save-window-excursion
diff -r ac1f612d5250 -r 859a2309aef8 lisp/w3/w3-toolbar.el
--- a/lisp/w3/w3-toolbar.el Mon Aug 13 08:49:44 2007 +0200
+++ b/lisp/w3/w3-toolbar.el Mon Aug 13 08:50:05 2007 +0200
@@ -1,7 +1,7 @@
;;; w3-toolbar.el --- Toolbar functions for emacs-w3
;; Author: wmperry
-;; Created: 1997/01/10 00:13:05
-;; Version: 1.7
+;; Created: 1997/02/03 15:38:24
+;; Version: 1.8
;; Keywords: mouse, toolbar
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -79,8 +79,8 @@
not `none'.")
(defvar w3-toolbar
- '([w3-toolbar-back-icon w3-backward-in-history t "Back in history"]
- [w3-toolbar-forw-icon w3-forward-in-history t "Forward in history"]
+ '([w3-toolbar-back-icon w3-history-backward (car (w3-history-find-url-internal (url-view-url t))) "Back in history"]
+ [w3-toolbar-forw-icon w3-history-forward (cdr (w3-history-find-url-internal (url-view-url t))) "Forward in history"]
[w3-toolbar-home-icon w3 t "Go home"]
[:style 2d :size 5]
[w3-toolbar-reld-icon w3-reload-document t "Reload document"]
diff -r ac1f612d5250 -r 859a2309aef8 lisp/w3/w3-vars.el
--- a/lisp/w3/w3-vars.el Mon Aug 13 08:49:44 2007 +0200
+++ b/lisp/w3/w3-vars.el Mon Aug 13 08:50:05 2007 +0200
@@ -1,7 +1,7 @@
;;; w3-vars.el,v --- All variable definitions for emacs-w3
;; Author: wmperry
-;; Created: 1997/01/31 04:28:42
-;; Version: 1.76
+;; Created: 1997/02/09 06:46:59
+;; Version: 1.82
;; Keywords: comm, help, hypermedia
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -30,7 +30,7 @@
;;; Variable definitions for w3
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defconst w3-version-number
- (let ((x "p3.0.52"))
+ (let ((x "p3.0.56"))
(if (string-match "State:[ \t\n]+.\\([^ \t\n]+\\)" x)
(setq x (substring x (match-beginning 1) (match-end 1)))
(setq x (substring x 1)))
@@ -38,7 +38,7 @@
(function (lambda (x) (if (= x ?-) "." (char-to-string x)))) x ""))
"Version # of w3-mode.")
-(defconst w3-version-date (let ((x "1997/01/31 04:28:42"))
+(defconst w3-version-date (let ((x "1997/02/09 06:46:59"))
(if (string-match "Date: \\([^ \t\n]+\\)" x)
(substring x (match-beginning 1) (match-end 1))
x))
@@ -51,15 +51,6 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; General configuration variables
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(defvar w3-annotation-mode 'html-mode
- "*A symbol specifying the major mode to enter when doing annotations.")
-
-(defvar w3-annotation-position 'bottom
- "*A symbol specifying where personal annotations should appear in a buffer.
-Can be one of the symbols 'top or 'bottom. If the symbol is eq to 'top, then
-the annotations will appear at the top of the buffer. If 'bottom, will appear
-at the end of the buffer.")
-
(defvar w3-auto-image-alt t
"*Whether emacs-w3 should create an alt attribute for an image that
is missing it.
@@ -244,11 +235,6 @@
Any other value of `w3-notify' is equivalent to `meek'.")
-(defvar w3-personal-annotation-directory nil
- "*Directory where w3 looks for personal annotations.
-This is a directory that should hold the personal annotations stored in
-a Mosaic-compatible format.")
-
(defvar w3-ppmtoxbm-command "ppmtopgm | pgmtopbm | pbmtoxbm"
"*The command used to convert from the portable-pixmap graphics format
to an x bitmap. This will only ever be used if XEmacs doesn't have support
@@ -702,10 +688,8 @@
(defvar w3-navigate-menu nil)
(defvar w3-popup-menu
'("Emacs-W3 Commands"
- ["Back" w3-backward-in-history t]
- ["Forward" w3-forward-in-history t]
- "---"
- ["Add annotation" w3-annotation-add t]
+ ["Back" w3-history-backward (car (w3-history-find-url-internal (url-view-url t)))]
+ ["Forward" w3-history-forward (cdr (w3-history-find-url-internal (url-view-url t)))]
)
"The shorter popup menu.")
@@ -858,13 +842,10 @@
("Mail session" . "mailto"))
"An assoc list of descriptive labels and the corresponding URL stub.")
-(defvar w3-annotation-marker "")
-(defvar w3-annotation-minor-mode nil "Whether we are in the minor mode.")
(defconst w3-bug-address "wmperry@cs.indiana.edu"
"Address of current maintainer, where to send bug reports.")
(defvar w3-continuation '(url-uncompress url-clean-text)
"List of functions to call to process a document completely.")
-(defvar w3-current-annotation nil "URL of document we are annotating...")
(defvar w3-current-isindex nil "Is the current document a searchable index?")
(defvar w3-current-last-buffer nil "Last W3 buffer seen before this one.")
(defvar w3-current-links nil "An assoc list of tags for this doc.")
@@ -873,13 +854,11 @@
(defvar w3-current-parse nil "Parsed version of current document.")
(defconst w3-default-continuation '(url-uncompress url-clean-text)
"Default action to start with - cleans text and uncompresses if necessary.")
-(defvar w3-editing-annotation nil "Are we editing an annotation or not?")
(defvar w3-find-this-link nil "Link to go to within a document.")
(defvar w3-hidden-forms nil "List of hidden form areas and their info.")
(defvar w3-hotlist nil "Default hotlist.")
(defvar w3-icon-path-cache nil "Cache of where we found icons for entities.")
(defvar w3-last-buffer nil "The last W3 buffer visited.")
-(defvar w3-personal-annotations nil "Assoc list of personal annotations.")
(defvar w3-print-next nil "Should we latex & print the next doc?")
(defvar w3-roman-characters "ivxLCDMVX" "Roman numerals.")
(defvar w3-setup-done nil "Have we been through setup code yet?")
@@ -921,7 +900,6 @@
url-current-type
url-current-user
w3-current-parse
- w3-current-annotation
w3-current-isindex
w3-current-last-buffer
w3-current-links
@@ -974,7 +952,6 @@
(make-variable-buffer-local 'w3-state-vector)
(make-variable-buffer-local 'w3-current-stylesheet)
(make-variable-buffer-local 'w3-base-alist)
-(make-variable-buffer-local 'w3-annotation-minor-mode)
(make-variable-buffer-local 'w3-last-tag)
(make-variable-buffer-local 'w3-last-fill-pos)
(make-variable-buffer-local 'w3-table-info)
@@ -991,8 +968,6 @@
;;; Keymap definitions
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defvar w3-mode-map (make-keymap) "Keymap to use in w3-mode.")
-(defvar w3-annotation-minor-mode-map (make-keymap) "Keymap for annotation.")
-
(suppress-keymap w3-mode-map)
(define-key w3-mode-map "h" (make-sparse-keymap))
@@ -1009,20 +984,16 @@
(define-key w3-mode-map "hI" 'w3-hotlist-add-document-at-point)
(define-key w3-mode-map "hR" 'w3-hotlist-refresh)
-(define-key w3-mode-map "ai" 'w3-annotation-add)
-(define-key w3-mode-map "ad" 'w3-delete-personal-annotation)
-(define-key w3-mode-map "ae" 'w3-annotation-edit)
-
-(define-key w3-mode-map "HF" 'w3-forward-in-history)
-(define-key w3-mode-map "HB" 'w3-backward-in-history)
+(define-key w3-mode-map "HF" 'w3-history-forward)
+(define-key w3-mode-map "HB" 'w3-history-backward)
(define-key w3-mode-map "Hv" 'w3-show-history-list)
(define-key w3-mode-map " " 'w3-scroll-up)
(define-key w3-mode-map "<" 'beginning-of-buffer)
(define-key w3-mode-map ">" 'end-of-buffer)
(define-key w3-mode-map "?" 'w3-help)
-(define-key w3-mode-map "B" 'w3-backward-in-history)
-(define-key w3-mode-map "F" 'w3-forward-in-history)
+(define-key w3-mode-map "B" 'w3-history-backward)
+(define-key w3-mode-map "F" 'w3-history-forward)
(define-key w3-mode-map "G" 'w3-show-graphics)
(define-key w3-mode-map "I" 'w3-popup-info)
(define-key w3-mode-map "K" 'w3-save-this-url)
@@ -1065,12 +1036,11 @@
(define-key w3-mode-map [(control meta t)] 'url-list-processes)
;; Widget navigation
-(define-key w3-mode-map "\t" 'w3-widget-forward)
+(define-key w3-mode-map "\t" 'w3-widget-forward)
+(define-key w3-mode-map [backtab] 'w3-widget-backward)
(define-key w3-mode-map [(shift tab)] 'w3-widget-backward)
+(define-key w3-mode-map [(meta tab)] 'w3-widget-backward)
-(define-key w3-annotation-minor-mode-map "\C-c\C-c"
- 'w3-personal-annotation-finish)
-
;;; This is so we can use a consistent method of checking for mule support
;;; Emacs-based mule uses (boundp 'MULE), but XEmacs-based mule uses
;;; (featurep 'mule) - I choose to use the latter.
diff -r ac1f612d5250 -r 859a2309aef8 lisp/w3/w3-widget.el
--- a/lisp/w3/w3-widget.el Mon Aug 13 08:49:44 2007 +0200
+++ b/lisp/w3/w3-widget.el Mon Aug 13 08:50:05 2007 +0200
@@ -1,7 +1,7 @@
;;; w3-widget.el --- An image widget
;; Author: wmperry
-;; Created: 1997/01/17 22:09:43
-;; Version: 1.16
+;; Created: 1997/02/09 06:37:14
+;; Version: 1.18
;; Keywords: faces, images
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -148,6 +148,37 @@
'src (widget-get widget 'src)
'ismap server-map)))
+(defun widget-image-emacspeak-tty-imagemap (usemap)
+ (let* ((default nil)
+ (href nil)
+ (tag nil)
+ (options (delete
+ nil
+ (mapcar
+ (function
+ (lambda (x)
+ (if (eq (aref x 0) 'default)
+ (setq default (aref x 2)))
+ (if (and (not default) (stringp (aref x 2)))
+ (setq default (aref x 2)))
+ (setq tag (or (aref x 3) (aref x 2))
+ href (aref x 2))
+ (and (stringp tag)
+ (stringp href)
+ (list 'a
+ (list
+ (cons 'href href)
+ (cons
+ 'class
+ (list
+ (if (url-have-visited-url href)
+ ":visited" ":link"))))
+ (list tag)))))
+ usemap))))
+ (w3-display-node (list 'table '((border . "1"))
+ (w3-display-chop-into-table
+ (list nil nil options) 3)))))
+
(defun widget-image-value-create (widget)
;; Insert the printed representation of the value
(let (
@@ -177,27 +208,31 @@
(goto-char where)
(cond
(client-map
- (let* ((default nil)
- (options (mapcar
- (function
- (lambda (x)
- (if (eq (aref x 0) 'default)
- (setq default (aref x 2)))
- (if (and (not default) (stringp (aref x 2)))
- (setq default (aref x 2)))
- (list 'choice-item
- :format "%[%t%]"
- :tag (or (aref x 3) (aref x 2))
- :value (aref x 2)))) client-map)))
- (setq real-widget
- (apply 'widget-create 'menu-choice
- :tag (or (widget-get widget :tag) "Imagemap")
- :notify (widget-get widget :notify)
- :action (widget-get widget :action)
- :value default
- :parent widget
- :help-echo 'widget-image-summarize
- options))))
+ (if (featurep 'emacspeak)
+ (widget-image-emacspeak-tty-imagemap client-map)
+ (let* ((default nil)
+ (href nil)
+ (tag nil)
+ (options (mapcar
+ (function
+ (lambda (x)
+ (if (eq (aref x 0) 'default)
+ (setq default (aref x 2)))
+ (if (and (not default) (stringp (aref x 2)))
+ (setq default (aref x 2)))
+ (list 'choice-item
+ :format "%[%t%]"
+ :tag (or (aref x 3) (aref x 2))
+ :value (aref x 2)))) client-map)))
+ (setq real-widget
+ (apply 'widget-create 'menu-choice
+ :tag (or (widget-get widget :tag) "Imagemap")
+ :notify (widget-get widget :notify)
+ :action (widget-get widget :action)
+ :value default
+ :parent widget
+ :help-echo 'widget-image-summarize
+ options)))))
((and server-map (stringp href))
(setq real-widget
(widget-image-create-subwidget
@@ -334,9 +369,10 @@
(lambda (entry)
(cons
(or (aref entry 3) (aref entry 2))
- (aref entry 3)))) usemap))
+ (aref entry 2)))) usemap))
(choice nil))
- (setq choice (completing-read "Imagemap: " choices nil t))
+ (setq choice (completing-read "Imagemap: " choices nil t)
+ choice (cdr-safe (assoc choice choices)))
(and (stringp choice) (w3-fetch choice))))
(ismap ; Do server-side dummy imagemap for tty
(w3-fetch (concat href "?0,0")))
diff -r ac1f612d5250 -r 859a2309aef8 lisp/w3/w3.el
--- a/lisp/w3/w3.el Mon Aug 13 08:49:44 2007 +0200
+++ b/lisp/w3/w3.el Mon Aug 13 08:50:05 2007 +0200
@@ -1,7 +1,7 @@
;;; w3.el --- Main functions for emacs-w3 on all platforms/versions
;; Author: wmperry
-;; Created: 1997/01/29 06:25:59
-;; Version: 1.61
+;; Created: 1997/02/08 00:49:52
+;; Version: 1.72
;; Keywords: faces, help, comm, news, mail, processes, mouse, hypermedia
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -560,12 +560,15 @@
(save-excursion
(set-buffer url-working-buffer)
(if x
- (w3-add-urls-to-history x (url-view-url t)))
+ (w3-history-push x (url-view-url t)))
(setq w3-current-last-buffer lastbuf)))
(t
- (w3-add-urls-to-history x url)
+ (w3-history-push x url)
(w3-sentinel lastbuf)
- ))))
+ (if (string-match "#\\(.*\\)" url)
+ (progn
+ (push-mark (point) t)
+ (w3-find-specific-link (match-string 1 url))))))))
(if w3-track-last-buffer
(setq w3-last-buffer buf))
(let ((w3-notify (if (memq w3-notify '(newframe bully
@@ -584,59 +587,58 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; History for forward/back buttons
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(defvar w3-node-history nil "History for forward and backward jumping")
+(defvar w3-history-stack nil
+ "History stack viewing history.
+This is an assoc list, with the oldest items first.
+Each element is a cons cell of (url . timeobj), where URL
+is the normalized URL (default ports removed, etc), and TIMEOBJ is
+a standard Emacs time. See the `current-time' function documentation
+for information on this format.")
-(defun w3-plot-course ()
- "Show a map of where the user has been in this session of W3. !!!!NYI!!!"
- (interactive)
- (error "Sorry, w3-plot-course is not yet implemented."))
+(defun w3-history-find-url-internal (url)
+ "Search in the history list for URL.
+Returns a cons cell, where the car is the 'back' node, and
+the cdr is the 'next' node."
+ (let* ((node (assoc url w3-history-stack))
+ (next (cadr (memq node w3-history-stack)))
+ (last nil)
+ (temp nil)
+ (todo w3-history-stack))
+ ;; Last node is a little harder to find without using back links
+ (while (and (not last) todo)
+ (if (string= (caar todo) url)
+ (setq last (or temp 'none))
+ (setq temp (pop todo))))
+ (cons (if (not (symbolp last)) last)
+ next)))
-(defun w3-forward-in-history ()
+(defun w3-history-forward ()
"Go forward in the history from this page"
(interactive)
- (let* ((thisurl (url-view-url t))
- (node (assoc (if (string= "" thisurl) (current-buffer) thisurl)
- w3-node-history))
- (url (cdr node))
- (w3-reuse-buffers 'yes))
- (cond
- ((null url) (error "No forward found for %s" thisurl))
- ((and (bufferp url) (buffer-name url))
- (switch-to-buffer url))
- ((stringp url)
- (w3-fetch url))
- ((bufferp url)
- (setq w3-node-history (delete node w3-node-history))
- (error "Killed buffer in history, removed."))
- (t
- (error "Something is very wrong with the history!")))))
+ (let ((next (cadr (w3-history-find-url-internal (url-view-url t))))
+ (w3-reuse-buffers 'yes))
+ (if next
+ (w3-fetch next))))
-(defun w3-backward-in-history ()
+(defun w3-history-backward ()
"Go backward in the history from this page"
(interactive)
- (let* ((thisurl (url-view-url t))
- (node (rassoc (if (string= thisurl "") (current-buffer) thisurl)
- w3-node-history))
- (url (car node))
- (w3-reuse-buffers 'yes))
- (cond
- ((null url) (error "No backward found for %s" thisurl))
- ((and (bufferp url) (buffer-name url))
- (switch-to-buffer url))
- ((stringp url)
- (w3-fetch url))
- ((bufferp url)
- (setq w3-node-history (delete node w3-node-history))
- (error "Killed buffer in history, removed."))
- (t
- (error "Something is very wrong with the history!")))))
+ (let ((last (caar (w3-history-find-url-internal (url-view-url t))))
+ (w3-reuse-buffers 'yes))
+ (if last
+ (w3-fetch last))))
-(defun w3-add-urls-to-history (referer url)
+(defun w3-history-push (referer url)
"REFERER is the url we followed this link from. URL is the link we got to."
- (let ((node (assoc referer w3-node-history)))
- (if node
- (setcdr node url)
- (setq w3-node-history (cons (cons referer url) w3-node-history)))))
+ (if (not referer)
+ (setq w3-history-stack (list (cons url (current-time))))
+ (let ((node (memq (assoc referer w3-history-stack) w3-history-stack)))
+ (if node
+ (setcdr node (list (cons url (current-time))))))))
+
+(defalias 'w3-add-urls-to-history 'w3-history-push)
+(defalias 'w3-backward-in-history 'w3-history-backward)
+(defalias 'w3-forward-in-history 'w3-history-forward)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -1067,16 +1069,14 @@
(let ((ps-spool-buffer-name " *w3-temp*"))
(if (get-buffer ps-spool-buffer-name)
(kill-buffer ps-spool-buffer-name))
- (w3-print-with-ps-print (current-buffer)
- 'ps-spool-buffer-with-faces)
+ (ps-spool-buffer-with-faces)
(set-buffer ps-spool-buffer-name)))
((equal "PostScript" format)
(let ((ps-spool-buffer-name " *w3-temp*"))
(if (get-buffer ps-spool-buffer-name)
(kill-buffer ps-spool-buffer-name))
(setq content-type "application/postscript")
- (w3-print-with-ps-print (current-buffer)
- 'ps-spool-buffer-with-faces)
+ (ps-spool-buffer-with-faces)
(set-buffer ps-spool-buffer-name)))
((and under (equal "Formatted Text" format))
(setq content-type "text/plain; charset=iso-8859-1")
@@ -1089,7 +1089,7 @@
(setq-default url-be-asynchronous nil)
(url-retrieve url)
(setq-default url-be-asynchronous old-asynch)
- (w3-parse-tree-to-latex (w3-parse-buffer (current-buffer) t)
+ (w3-parse-tree-to-latex (w3-parse-buffer (current-buffer))
url)))
((equal "LaTeX Source" format)
(setq content-type "application/x-latex; charset=iso-8859-1")
@@ -1270,20 +1270,6 @@
(interactive)
(w3-fetch (concat "www://preview/" (buffer-name))))
-(defun w3-edit-source ()
- "Edit the html document just retrieved"
- (set-buffer url-working-buffer)
- (let ((ttl (format "Editing %s Annotation: %s"
- (cond
- ((eq w3-editing-annotation 'group) "Group")
- ((eq w3-editing-annotation 'personal) "Personal")
- (t "Unknown"))
- (url-basepath url-current-file t)))
- (str (buffer-string)))
- (set-buffer (get-buffer-create ttl))
- (insert str)
- (kill-buffer url-working-buffer)))
-
(defun w3-source ()
"Show the source of a file"
(let ((tmp (buffer-name (generate-new-buffer "Document Source"))))
@@ -1328,7 +1314,8 @@
(if (not (string-match "^www:" (or (url-view-url t) "")))
(w3-convert-code-for-mule url-current-mime-type))
- (let ((x (w3-build-continuation)))
+ (let ((x (w3-build-continuation))
+ (url (url-view-url t)))
(while x
(funcall (pop x)))))
@@ -1377,8 +1364,7 @@
(let ((ps-spool-buffer-name " *w3-temp*"))
(if (get-buffer ps-spool-buffer-name)
(kill-buffer ps-spool-buffer-name))
- (w3-print-with-ps-print (current-buffer)
- 'ps-spool-buffer-with-faces)
+ (ps-spool-buffer-with-faces)
(set-buffer ps-spool-buffer-name)))
((equal "LaTeX Source" format)
(w3-parse-tree-to-latex w3-current-parse url)
@@ -1910,6 +1896,8 @@
(message "%s" (url-truncate-url-for-viewing href)))
(no-show
nil)
+ (widget
+ (widget-echo-help (point)))
(t
nil))))
@@ -2232,8 +2220,6 @@
(add-minor-mode 'w3-netscape-emulation-minor-mode " NS"
w3-netscape-emulation-minor-mode-map)
- (add-minor-mode 'w3-annotation-minor-mode " Annotating"
- w3-annotation-minor-mode-map)
(add-minor-mode 'w3-lynx-emulation-minor-mode " Lynx"
w3-lynx-emulation-minor-mode-map)
@@ -2256,27 +2242,21 @@
(expand-file-name "~/mosaic.mnu"))
w3-hotlist-file (or w3-hotlist-file
(expand-file-name "~/mosaic.hot"))
- w3-personal-annotation-directory (or w3-personal-annotation-directory
- (expand-file-name
- "~/mosaic.ann"))))
+ ))
((memq system-type '(axp-vms vax-vms))
(setq w3-documents-menu-file
(or w3-documents-menu-file
(expand-file-name "decw$system_defaults:documents.menu"))
w3-hotlist-file (or w3-hotlist-file
(expand-file-name "~/mosaic.hotlist-default"))
- w3-personal-annotation-directory
- (or w3-personal-annotation-directory
- (expand-file-name "~/mosaic-annotations/"))))
+ ))
(t
(setq w3-documents-menu-file
(or w3-documents-menu-file
(expand-file-name "/usr/local/lib/mosaic/documents.menu"))
w3-hotlist-file (or w3-hotlist-file
(expand-file-name "~/.mosaic-hotlist-default"))
- w3-personal-annotation-directory
- (or w3-personal-annotation-directory
- (expand-file-name "~/.mosaic-personal-annotations")))))
+ )))
(if (eq w3-delimit-emphasis 'guess)
(setq w3-delimit-emphasis
@@ -2300,9 +2280,6 @@
; Load in the hotlist if they haven't set it already
(or w3-hotlist (w3-parse-hotlist))
- ; Load in their personal annotations if they haven't set them already
- (or w3-personal-annotations (w3-parse-personal-annotations))
-
; Set the default home page, honoring their defaults, then
; the standard WWW_HOME, then default to the documentation @ IU
(or w3-default-homepage
@@ -2483,6 +2460,7 @@
(run-hooks 'w3-mode-hook)
(widget-setup)
(setq url-current-passwd-count 0
+ inhibit-read-only nil
truncate-lines t
mode-line-format w3-modeline-format)
(if (and w3-current-isindex (equal url-current-type "http"))
diff -r ac1f612d5250 -r 859a2309aef8 man/custom.texi
--- a/man/custom.texi Mon Aug 13 08:49:44 2007 +0200
+++ b/man/custom.texi Mon Aug 13 08:50:05 2007 +0200
@@ -13,7 +13,7 @@
@comment node-name, next, previous, up
@top The Customization Library
-Version: 1.20
+Version: 1.30
@menu
* Introduction::
@@ -638,6 +638,21 @@
@item
Make it possible to append to `choice', `radio', and `set' options.
+@item
+There should be a way to exit the buffer.
+
+An @sc{open look} pushpin would do wonders.
+
+@item
+Ask whether set or modified variables should be saved in
+@code{kill-buffer-hook}.
+
+Ditto for @code{kill-emacs-query-functions}.
+
+@item
+Command to check if there are any customization options that
+does not belong to an existing group.
+
@end itemize
@contents
diff -r ac1f612d5250 -r 859a2309aef8 man/lispref/building.texi
--- a/man/lispref/building.texi Mon Aug 13 08:49:44 2007 +0200
+++ b/man/lispref/building.texi Mon Aug 13 08:50:05 2007 +0200
@@ -134,8 +134,8 @@
@example
@group
(emacs-version)
- @result{} "XEmacs 19.14 [Lucid] (i586-unknown-linux1.2.13)
- of Wed Mar 6 1996 on nene"
+ @result{} "XEmacs 20.0 [Lucid] (i586-unknown-linux2.0.18)
+ of Wed Feb 6 1997 on nene"
@end group
@end example
@@ -157,7 +157,7 @@
@defvar emacs-version
The value of this variable is the version of Emacs being run. It is a
-string, e.g. @code{"19.14 XEmacs Lucid"}.
+string, e.g. @code{"20.0 XEmacs Lucid"}.
@end defvar
The following two variables did not exist before FSF GNU Emacs version
@@ -166,12 +166,12 @@
@defvar emacs-major-version
The major version number of Emacs, as an integer. For XEmacs version
-19.14, the value is 19.
+20.0, the value is 20.
@end defvar
@defvar emacs-minor-version
The minor version number of Emacs, as an integer. For XEmacs version
-19.14, the value is 14.
+20.0, the value is 0.
@end defvar
@node Pure Storage
diff -r ac1f612d5250 -r 859a2309aef8 man/lispref/extents.texi
--- a/man/lispref/extents.texi Mon Aug 13 08:49:44 2007 +0200
+++ b/man/lispref/extents.texi Mon Aug 13 08:50:05 2007 +0200
@@ -553,17 +553,9 @@
kill, yank, and undo commands will restore or copy it. @xref{Duplicable
Extents}.
-@item replicating
-(Boolean) Meaningful only in conjunction with @code{duplicable}. If
-set, actions that cause an extent to be copied from a buffer to a string
-cause the original extent to be recorded in the copy (as the copied
-extent's parent), so that when the extent is copied back into the
-buffer, @code{eq}ness between the original extent and the re-inserted
-extent is maintained whenever possible. @xref{Duplicable Extents}.
-
@item unique
-(Boolean) Meaningful only in conjunction with @code{duplicable} and
-@code{replicating}. When this is set, there may be only one instance of
+(Boolean) Meaningful only in conjunction with @code{duplicable}.
+When this is set, there may be only one instance of
this extent attached at a time. @xref{Duplicable Extents}.
@item invisible
@@ -765,8 +757,7 @@
that you cannot create an inheritance loop -- this is explicitly
disallowed.
- Parent extents are used to implement the ``replicating'' property
-(@pxref{Duplicable Extents}) and extents over the modeline.
+ Parent extents are used to implement the extents over the modeline.
@defun set-extent-parent extent parent
This function sets the parent of @var{extent} to @var{parent}.
@@ -793,30 +784,14 @@
@node Duplicable Extents
@section Duplicable Extents
@cindex duplicable extent
-@cindex replicating extents
@cindex unique extents
@cindex extent replica
@cindex extent, duplicable
-@cindex extent, replicating
@cindex extent, unique
If an extent has the @code{duplicable} property, it will be copied into
strings, so that kill, yank, and undo commands will restore or copy it.
- If a duplicable extent also has the @code{replicating} property, the
-extent itself is not actually copied; rather, a pointer to it is
-stored, along with the start and end positions of the extent. (This
-is done by making the copied extent a child of the original extent.
-Formerly, this was done by creating a special object called an
-@dfn{extent replica}. Extent replicas no longer exist, but all the
-functionality is available in a cleaner and more general fashion
-using the @code{replicating} property.) This means that, e.g.,
-if you copy a replacting extent into the kill ring, then change the
-properties of the extent, then paste the kill-ring text back into the
-buffer, the newly-inserted extent will have the property changes you
-just made to the original extent, and not the property values at the
-time the text was copied into the kill ring.
-
Specifically:
@itemize @bullet
@@ -837,42 +812,8 @@
back into a buffer.
@item
-If a duplicable extent has the @code{replicating} property, then when
-it is copied into a string, the parent of the new extent is set to the
-extent it was copied from.
-
-@item
-When an extent with the @code{replicating} property is copied from
-a string back into a buffer:
-
-@itemize @minus
-@item
-If the extent's parent was detached from this buffer, it is reattached
-at the new range.
-
-@item
-If the extent's parent is attached to this buffer and is contiguous with
-or overlaps the new range, it is simply extended to include that range.
-Note that in this case the extent's @code{paste-function} is not called
-(see below).
-
-@item
-If the extent's parent was detached from another buffer, it is copied
-as if by @code{copy-extent} and attached at the new range.
-
-@item
-If the extent's parent is attached to another buffer, or is attached to
-this buffer and does not overlap the new range, it is copied as if by
-@code{copy-extent} and attached at the new range. However, if the
-extent's parent has the @code{unique} property, this action is inhibited
-and nothing happens.
-@end itemize
-
-@item
When @code{concat} is called on strings, the extents in the strings are
-copied into the resulting string. If two or more replicating extents
-with the same parent end up overlapping or abutting in the resulting
-string, they are merged into a single extent.
+copied into the resulting string.
@item
When @code{substring} is called on a string, the relevant extents
@@ -883,10 +824,8 @@
deletion, or inserted by @code{insert-extent} or string insertion, the
action is recorded by the undo mechanism so that it can be undone later.
Note that if an extent gets detached and then a later undo causes the
-extent to get reinserted, the new extent will be `eq' to the original
-extent if and only if the extent has the @code{replicating} property
-set. This is the same as what happens when a string is cut and then
-pasted back in.
+extent to get reinserted, the new extent will not be `eq' to the original
+extent.
@item
Extent motion, face changes, and attachment via @code{make-extent} are
diff -r ac1f612d5250 -r 859a2309aef8 man/new-users-guide/custom2.texi
--- a/man/new-users-guide/custom2.texi Mon Aug 13 08:49:44 2007 +0200
+++ b/man/new-users-guide/custom2.texi Mon Aug 13 08:50:05 2007 +0200
@@ -419,13 +419,13 @@
@noindent
If you want to write your own menus, you can look at some of the
examples in
-@file{/usr/local/lib/xemacs-19.13/lisp/packages/big-menubar.el} file.
+@file{/usr/local/lib/xemacs-20.0/lisp/packages/big-menubar.el} file.
@end itemize
For more information on initializing your @file{.emacs} file,
@xref{Init File,,,,XEmacs User's Manual}. You should also look at
-@file{/usr/local/lib/xemacs-19.13/etc/sample.emacs}, which is a sample
+@file{/usr/local/lib/xemacs-20.0/etc/sample.emacs}, which is a sample
@file{.emacs} file. It contains some of the commonly desired
customizations in Emacs.
diff -r ac1f612d5250 -r 859a2309aef8 man/vm.texi
--- a/man/vm.texi Mon Aug 13 08:49:44 2007 +0200
+++ b/man/vm.texi Mon Aug 13 08:50:05 2007 +0200
@@ -433,9 +433,9 @@
version of the folder until the folder is saved.@refill
Typing @kbd{h} (@code{vm-summarize}) causes VM to pop up a window
-containing a summary of contents of the current folder. The summary is
+containing a summary of the contents of the current folder. The summary is
presented one line per message, by message number, listing each message's
-author, date sent, line and byte count, and subject. Also various
+author, date sent, line and byte count, and subject. Also, various
letters appear beside the message number to indicate that a message is
new, unread, flagged for deletion, etc. An arrow @samp{->} appears to
the left of the line summarizing the current message. The summary
@@ -487,7 +487,7 @@
file. Since VM has in excess of forty configuration variables, use of
the @file{~/.vm} can considerably reduce clutter in the @file{.emacs}
file. You can force the reloading of this file on demand by typing
-@kbd{L} from within VM.@refill
+@kbd{L} (@code{vm-load-init-file}) from within VM.@refill
@findex vm
@vindex vm-primary-inbox
@@ -545,15 +545,15 @@
The variable @code{vm-startup-with-summary} controls whether VM
automatically displays a summary of the folder's contents at startup. A
value of @code{nil} gives no summary; a value of @code{t} gives a full
-screen summary. A value that is neither @code{t} nor @code{nil} splits
-the screen between the summary and the folder display. The latter only
+frame summary. A value that is neither @code{t} nor @code{nil} splits
+the frame between the summary and the folder display. The latter only
works if the variable @code{pop-up-windows}'s value is non-@code{nil},
and the value of @code{vm-mutable-windows} is non-@code{nil}. The
default value of @code{vm-startup-with-summary} is @code{nil}.@refill
@vindex vm-mail-window-percentage
The variable @code{vm-mail-window-percentage} tells VM what percentage of
-the screen should be given to the folder display when both it and the
+the frame should be given to the folder display when both it and the
folder summary are being displayed. Note that Emacs enforces a minimum
window size limit, so a very high or very low value for this variable
may squeeze out one of the displays entirely. This variable's default
@@ -583,7 +583,7 @@
(@code{vm-next-message}) and @kbd{p} (@code{vm-previous-message}).
These commands move forward and backward through the current folder.
When they go beyond the end or beginning of the folder they wrap to the
-beginning and end respectively. By default these commands skip messages
+beginning and end respectively. By default, these commands skip messages
flagged for deletion. This behavior can be disabled by setting the value
of the variable @code{vm-skip-deleted-messages} to @code{nil}. These
commands can also be made to skip messages that have been read; set
@@ -616,12 +616,7 @@
Other commands to select messages:
-@iftex
-@table @asis
-@end iftex
-@ifinfo
-@table @key
-@end ifinfo
+@table @kbd
@findex vm-goto-message
@kindex RET
@item RET (@code{vm-goto-message})
@@ -668,7 +663,7 @@
@node Reading Messages, Sending Messages, Selecting Messages, Top
@chapter Reading Messages
-Once a message has been selected, VM will present it to you. By default
+Once a message has been selected, VM will present it to you. By default,
presentation is done in two stages: @dfn{previewing} and @dfn{paging}.
@menu
@@ -684,9 +679,9 @@
@key{SPC} exposes the body of the message, and from there you can
repeatedly type @key{SPC} to page through the message.
-By default the sender, recipient, subject and date headers are shown
+By default, the sender, recipient, subject and date headers are shown
when previewing; the rest of the message is hidden. This behavior may
-be altered by changing the settings of two variables:
+be altered by changing the settings of three variables:
@code{vm-visible-headers}, @code{vm-invisible-header-regexp} and
@code{vm-preview-lines}.@refill
@@ -731,7 +726,7 @@
causes the From and Subject headers to be highlighted.@refill
@vindex vm-preview-read-messages
-By default VM previews all messages, even if they have already been read.
+By default, VM previews all messages, even if they have already been read.
To have VM preview only those messages that have not been read, set the
value of @code{vm-preview-read-messages} to @code{nil}.
@@ -770,17 +765,12 @@
GNU Emacs Manual}.
However, @samp{*mail*} buffers created by VM have extra command keys:
-@iftex
-@table @asis
-@end iftex
-@ifinfo
-@table @key
-@end ifinfo
+@table @kbd
@findex vm-yank-message
@kindex C-c C-y
@item C-c C-y (@code{vm-yank-message})
Copies a message from the current folder into the @samp{*mail*} buffer.
-The message number is read from the minibuffer. By default each line of
+The message number is read from the minibuffer. By default, each line of
the copy is prepended with the value of the variable
@code{vm-included-text-prefix}. All message headers are yanked along
with the text. Point is left before the inserted text, the mark after.
@@ -808,12 +798,12 @@
described above.
@code{vm-mail} can be invoked outside of VM by typing @kbd{M-x vm-mail}.
-However, of the above commands, only @key{C-c y}
+However, of the above commands, only @kbd{C-c y}
(@code{vm-yank-message-other-folder}) will work; all the other commands
require a parent folder.@refill
If you send a message and it is returned by the mail system because it
-was undeliverable, you an easily resend the message by typing @kbd{M-r}
+was undeliverable, you can easily resend the message by typing @kbd{M-r}
(@code{vm-resend-bounced-message}). VM will extract the old message and
its pertinent headers from the returned message, and place you in a
@samp{*mail*} buffer. You can then change the recipient addresses or do
@@ -830,7 +820,7 @@
@vindex vm-reply-subject-prefix
VM has special commands that make it easy to reply to a message. When a
-reply command is invoked VM fills in the subject and recipient headers
+reply command is invoked, VM fills in the subject and recipient headers
for you, since it is apparent to whom the message should be sent and
what the subject should be. There is an old convention of prepending
the string @samp{"Re: "} to the subject of replies if the string isn't
@@ -877,12 +867,7 @@
The reply commands are:
-@iftex
-@table @asis
-@end iftex
-@ifinfo
-@table @key
-@end ifinfo
+@table @kbd
@findex vm-reply
@kindex r
@item r (@code{vm-reply})
@@ -932,7 +917,7 @@
except the current message appears as the body of the message in the
@samp{*mail*} buffer. The forwarded message is surrounded by RFC 934
compliant message delimiters. If the variable
-@code{vm-rfc934-forwarding} is non-@code{nil} "^-" to "- -" character
+@code{vm-rfc934-forwarding} is non-@code{nil}, "^-" to "- -" character
stuffing is done to the forwarded message (this is the default). This
behavior is required if the recipient of the forwarded message wants to
use a RFC 934 standard bursting agent to access the message. If the
@@ -1009,13 +994,13 @@
the default when prompting for a folder to save the message in. If
the resulting folder name is a relative pathname it resolves to the directory
named by @code{vm-folder-directory}, or the @code{default-directory} of
-the currently visited folder if @code{vm-folder-directory} is nil.@refill
+the currently visited folder if @code{vm-folder-directory} is @code{nil}.@refill
When @var{folder-name} is evaluated, the current buffer will contain only
the contents of the header named by @var{header-name}. It is safe to
modify this buffer. You can use the match data from any @samp{\( @dots{}
\)} grouping constructs in @var{regexp} along with the function
-buffer-substring to build a folder name based on the header information.
+@code{buffer-substring} to build a folder name based on the header information.
If the result of evaluating @var{folder-name} is a list, then the list will
be treated as another auto-folder-alist and will be descended
recursively.@refill
@@ -1047,18 +1032,13 @@
@vindex vm-delete-after-saving
After a message is saved to a folder, the usual thing to do next is to
delete it. If the variable @code{vm-delete-after-saving} is
-non-@code{nil} VM will flag messages for deletion automatically after
-saving them. This applies only to saves to folders, not for the @key{w}
+non-@code{nil}, VM will flag messages for deletion automatically after
+saving them. This applies only to saves to folders, not for the @kbd{w}
command (see below).@refill
Other commands:
-@iftex
-@table @asis
-@end iftex
-@ifinfo
-@table @key
-@end ifinfo
+@table @kbd
@findex vm-save-message-sans-headers
@kindex w
@item w (@code{vm-save-message-sans-headers})
@@ -1075,8 +1055,8 @@
@findex vm-pipe-message-to-command
@kindex |
@item | (@code{vm-pipe-message-to-command})
-Runs a shell command with the some or all of the current message as input.
-By default the entire message is used.@*
+Runs a shell command with some or all of the current message as input.
+By default, the entire message is used.@*
@*
If invoked with one @t{C-u} the text portion of the message is used.@*
If invoked with two @t{C-u}'s the header portion of the message is used.@*
@@ -1092,12 +1072,7 @@
@dfn{expunged} or removed from the folder. The messages are not removed
from the on-disk copy of the folder until the folder is saved.
-@iftex
-@table @asis
-@end iftex
-@ifinfo
-@table @key
-@end ifinfo
+@table @kbd
@findex vm-delete-message
@kindex d
@item d (@code{vm-delete-message})
@@ -1115,7 +1090,7 @@
@findex vm-kill-subject
@kindex k
@item k (@code{vm-kill-subject})
-Flags all message with the same subject as the current message (ignoring
+Flags all messages with the same subject as the current message (ignoring
``Re:'') for deletion.
@findex vm-expunge-folder
@kindex #
@@ -1166,17 +1141,17 @@
messages in the summary window.@refill
To remove a mark from the current message, use @kbd{C-c SPC}
-(@code{vm-unmark-message}. Prefix arguments work as with
+(@code{vm-unmark-message}). Prefix arguments work as with
@code{vm-mark-message}.@refill
-Use @kbd{C-c C-a} to mark all message in the current folder; @kbd{C-c a}
+Use @kbd{C-c C-a} to mark all messages in the current folder; @kbd{C-c a}
removes marks from all messages.
To apply a VM command to all marked message you must prefix it with the
key sequence @kbd{C-c RET} (@code{vm-next-command-uses-marks}). The
next VM command will apply to all marked messages, provided the
command can be applied to such messages in a meaningful and useful way.
-The current commands that can be applied to marked message are:
+The current commands that can be applied to marked messages are:
@code{vm-delete-message}, @code{vm-discard-cached-data},
@code{vm-followup}, @code{vm-followup-include-text}, @code{vm-reply},
@code{vm-reply-include-text}, @code{vm-save-message},
@@ -1207,7 +1182,7 @@
@kindex G
In order to make numerous related messages easier to cope with, VM
provides the command @kbd{G} (@code{vm-group-messages}), which groups
-all message in a folder according to some criterion. @dfn{Grouping}
+all messages in a folder according to some criterion. @dfn{Grouping}
causes messages that are related in some way to be presented
consecutively. The actual order of the folder is not altered;
the messages are simply numbered and presented differently. Grouping
@@ -1235,8 +1210,8 @@
If the variable @code{vm-group-by} has a non-@code{nil} value it
specifies the default grouping that will be used for all folders. So if
you like having your mail presented to you grouped by subject, then put
-@code{(setq vm-group-by "subject")} in your @file{.emacs} file to get this
-behavior.@refill
+@code{(setq vm-group-by "subject")} in your @file{.vm} or @file{.emacs}
+file to get this behavior.@refill
@node Reading Digests, Summaries, Grouping Messages, Top
@chapter Reading Digests
@@ -1250,7 +1225,7 @@
@findex vm-burst-digest
@kindex *
The command @kbd{*} (@code{vm-burst-digest}) bursts a digest into its
-individual messages and appends them to current folder. These
+individual messages and appends them to the current folder. These
messages are then assimilated into the current folder using the default
grouping. @xref{Grouping Messages}. The original digest message is not
altered, and the messages extracted from it are not part of the on-disk copy
@@ -1274,10 +1249,11 @@
arrow @samp{->} appears to the left of the line summarizing the current
message. The variable @code{vm-auto-center-summary} controls whether VM
will keep the summary arrow vertically centered within the summary
-window. A value of @code{t} causes VM to always keep arrow centered. A
-value of @code{nil} means VM will never bother centering the arrow. A
-value that is not @code{nil} and not @code{t} causes VM to center the
-arrow only if the summary window is not the only existing window.@refill
+window. A value of @code{t} causes VM to always keep the arrow
+centered. A value of @code{nil} (the default) means VM will never
+bother centering the arrow. A value that is not @code{nil} and not
+@code{t} causes VM to center the arrow only if the summary window is not
+the only existing window.@refill
@vindex vm-summary-format
The variable @code{vm-summary-format} controls the format of each
@@ -1355,20 +1331,15 @@
Here are some VM customization variables that don't really fit into the
other chapters.
-@iftex
-@table @asis
-@end iftex
-@ifinfo
@table @code
-@end ifinfo
@vindex vm-confirm-quit
@item vm-confirm-quit
-A value of t causes VM to always ask for confirmation before ending
-a VM visit of a folder. A nil value means VM will ask only when messages
-will be lost unwittingly by quitting, i.e. not removed by intentional
-delete and expunge. A value that is not nil and not t causes VM to ask
-only when there are unsaved changes to message attributes or message
-will be lost.
+A value of @code{t} causes VM to always ask for confirmation before
+ending a VM visit of a folder. A @code{nil} value means VM will ask
+only when messages will be lost unwittingly by quitting, i.e. not
+removed by intentional delete and expunge. A value that is neither
+@code{nil} nor @code{t} causes VM to ask only when there are unsaved
+changes to message attributes or message will be lost.
@vindex vm-berkeley-mail-compatibility
@item vm-berkeley-mail-compatibility
A non-@code{nil} value means to read and write BSD @i{Mail(1)} style Status:
@@ -1392,7 +1363,7 @@
@vindex vm-mutable-windows
@item vm-mutable-windows
This variable's value controls VM's window usage. A value of @code{t} gives VM
-free run of the Emacs display; it will commandeer the entire screen for
+free run of the Emacs display; it will commandeer the entire frame for
its purposes. A value of @code{nil} restricts VM's window usage to the window
from which it was invoked. VM will not create, delete, or use any other
windows, nor will it resize its own window. A value that is neither @code{t}
diff -r ac1f612d5250 -r 859a2309aef8 man/w3.texi
--- a/man/w3.texi Mon Aug 13 08:49:44 2007 +0200
+++ b/man/w3.texi Mon Aug 13 08:50:05 2007 +0200
@@ -1,4 +1,16 @@
\input texinfo
+@c
+@c Please note that this file uses some constructs not supported by earlier
+@c versions of TeXinfo. You must be running one of the newer TeXinfo
+@c releases (I currently use version 3.9 from ftp://prep.ai.mit.edu/pub/gnu
+@c
+@c Please do not send in bug reports about not being able to format the
+@c document with 'makeinfo' or 'tex', just upgrade your installation.
+@c
+@c Info formatted files are provided in the distribution, and you can
+@c retrieve dvi, postscript, and PDF versions from the web site or ftp
+@c site: http://www.cs.indiana.edu/elisp/w3/docs.html
+@c
@setfilename w3.info
@settitle Emacs-W3 User's Manual
@iftex
@@ -20,8 +32,8 @@
@ifinfo
This file documents the Emacs-W3 World Wide Web browser.
-Copyright (C) 1993, 1994, 1995 William M. Perry
-Copyright (C) 1996 Free Software Foundation
+Copyright (C) 1993, 1994, 1995, 1996 William M. Perry
+Copyright (C) 1996, 1997 Free Software Foundation
Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice
@@ -43,14 +55,14 @@
@sp 4
@center Third Edition, Emacs-W3 Version 3.0
@sp 1
-@center December 1996
+@center February 1997
@sp 5
@center William M. Perry
@center @i{wmperry@@cs.indiana.edu}
@page
@vskip 0pt plus 1filll
Copyright @copyright{} 1993, 1994, 1995 William M. Perry@*
-Copyright @copyright{} 1996 Free Software Foundation
+Copyright @copyright{} 1996, 1997 Free Software Foundation
Permission is granted to make and distribute verbatim copies of@*
this manual provided the copyright notice and this permission notice@*
@@ -59,23 +71,35 @@
@end titlepage
@page
@ifinfo
-@node Top, Introduction,, (DIR)
-This manual documents the Emacs-W3 World Wide Web browser, a Lisp program
-which runs as a subsystem under Emacs. The manual is divided into the
-following chapters.
+@node Top, Getting Started,, (DIR)
+Users can browse the World Wide Web from within Emacs by using Emacs-W3.
+All of the widely used (and even some not very widely used) @sc{url}
+schemes are supported, and it is very easy to add new methods as the
+need arises.
+
+Emacs-W3 provides some core functionality that can be readily re-used
+from any program in Emacs. Users and other package writers are
+encouraged to @i{Web-enable} their applications and daily work routines
+with the library.
+
+Emacs-W3 is completely customizable, both from Emacs-Lisp and from
+stylesheets @xref{Style Sheets} If there is any aspect of Emacs-W3 that
+cannot be modified to your satisfaction, please send mail to the
+@t{w3-beta@@indiana.edu} mailing list with any suggestions.
+@xref{Reporting Bugs}
@menu
-* Introduction:: Overview of Emacs-W3.
* Getting Started:: Getting up and running with Emacs-W3
* Basic Usage:: Basic movement and usage of Emacs-W3.
* Compatibility:: Explanation of compatibility with
- other web browsers.
-* Controlling Formatting:: How to control HTML formatting
-* MIME Support:: Support for MIME
-* Security:: Various forms of security
+ other browsers.
+* Stylesheets:: How to control the look of web pages
+* MIME Support:: Support for @sc{mime}
+* Security:: Various security methods supported
* Non-Unix Operating Systems:: Special considerations necessary to get
up and running correctly under non-unix
OS's.
+* Speech Integration:: Outputting to a speech synthesizer.
* Advanced Features:: Some of the more arcane features.
* More Help:: How to get more help---mailing lists,
newsgroups, etc.
@@ -83,8 +107,7 @@
Appendices:
* Reporting Bugs:: How to report a bug in Emacs-W3
-* Installing SSL:: Turning on SSL support
-* Using PGP/PEM:: Turning on PGP/PEM encryption support
+* Installing SSL:: Turning on @sc{ssl} support
* Mailcap Files:: An explanation of Mailcap files
Indices:
@@ -93,451 +116,176 @@
@end menu
@end ifinfo
-@node Introduction, Getting Started, Top, Top
-@chapter Introduction
-@cindex World Wide Web
-
-:: WORK :: Basic info on what Emacs-W3 is, including copyrights, etc.
-
-@ifinfo
-Here is some more specific information about what languages and
-protocols Emacs-W3 supports.
-@menu
-* Markup Languages Supported:: Markup languages supported by Emacs-W3
-* Stylesheets:: Stylesheet languages supported by Emacs-W3
-* Supported Protocols:: Network protocols supported by Emacs-W3
-@end menu
-@end ifinfo
-@node Markup Languages Supported, Stylesheets, Introduction, Introduction
-@chapter Supported Markup Languages
-Several different markup languages, and various extensions to those
-languages, are supported by Emacs-W3.
-@ifinfo
-@center ----------
-@center HTML 2.0
-@center ----------
-@end ifinfo
-@iftex
-@section HTML 2.0
-@end iftex
-@cindex HTML 2.0
-
-:: WORK :: Reference to the HTML 2.0 RFC
-:: WORK :: Basic explanation of HTML, tag structure, etc.
-
-@ifinfo
-@center ----------
-@center HTML 3.2
-@center ----------
-@end ifinfo
-@iftex
-@section HTML 3.2
-@end iftex
-@cindex HTML 3.2
-The HTML 3.2 language is an extension of HTML, with a large degree of
-backward compatibility with HTML 2.0. This basically documents current
-practice as of January, 1996.
-
-@ifinfo
-@center ----------
-@center SGML Features
-@center ----------
-@end ifinfo
-@iftex
-@section SGML Features
-@end iftex
-@cindex SGML Features
-@cindex Entity Definitions
-@cindex Marked Sections
-
-:: WORK :: Document marked sections, SGML features
-
-@ifinfo
-@center ----------
-@center Extras
-@center ----------
-@end ifinfo
-@iftex
-@section Extra Markup
-@end iftex
-@cindex Easter Eggs
-@cindex Fluff
-@cindex Pomp & Circumstance
-There are several different markup elements that are not officially part
-of HTML or HTML 3.2 that Emacs-W3 supports. These are either items that
-were dropped from HTML 3.@var{x} after I had implemented them, things I
-find just completely hilarious, or experimental parts of HTML that
-should not be counted as "official" or long lived.
-@itemize @bullet
-@item
-FLAME support. For truly interesting dynamic documents. This is
-replaced with a random quote from Mr. Angry (see @kbd{M-x flame} for a
-sample).
-@item
-The top ten tags that did not make it into netscape. These tags were
-posted to the newsgroup comp.infosystems.www.misc by Laura Lemay
-(@i{lemay@@netcom.com}). Much thanks to her for the humor.
-@table @b
-@item ...
-Renders the enclosed text in a suitably ugly font/color combination. If
-no default has been set up by the user, this is the default font, with
-red text on a yellow background.
-@item ...
-When selected, the enclosed text runs and hides under the nearest
-window. OR, giggles a lot and demands nachos, depending on the
-definition of "roach." (the formal definition, of course, to be
-determined by the Official Honorary Internet Standards Committee For
-Moving Really Slowly.)
-@item
-Inserts "zippyisms" into the enclosed text. Perfect for those professional
-documents. This is sure to be a favorite of mine!
-@item ...
-Must use secret spy decoder glasses (available direct from Netscape for
-a reasonable fee) in order to read the enclosed text. Can also be read
-by holding the computer in front of a full moon during the autumn
-solstice.
-
-In Emacs-W3, this displays the text using rot13 encoding.
-@item
-Causes Marc Andreesen to magically appear and grant an interview (wanted
-or not). Please use this tag sparingly.
-@item ....
-@item ...
-Need more control over screen layout in HTML? Well, here ya go.
-n
-Actually, could almost be considered useful. The VARIABLE
-attribute can be used to insert the value of an emacs variable into the
-current document. Things like 'Welcome to my page, ' can be useful in spreading fear,
-uncertainty, and doubt among users.
-@item
-@cindex Gates Bill
-@cindex Yogsothoth
-Summons the elder gods to suck away your immortal soul. Or Bill Gates,
-if the elder gods are busy. Unpredictable (but amusing) results occur
-when the and tags are used in close proximity.
-
-@item
-Causes the enclosed text to .... ooops that one made it in.
-@end table
-@end itemize
-
-@node Stylesheets, Supported Protocols, Markup Languages Supported,Introduction
-@chapter Stylesheets
-@cindex Stylesheets
-@cindex Cascading Style Sheets
-@cindex Aural Cascading Style Sheets
-@cindex CSS
-@cindex DSSSL
-:: WORK :: Document CSS support
-CSS Information at http://www.w3.org/pub/WWW/TR/REC-CSS1
-Style guide at http://www.htmlhelp.com/reference/css/
-:: WORK :: Document ACSS support
-ACSS Information at http://www.w3.org/pub/WWW/Style/CSS/Speech/NOTE-ACSS
-:: WORK :: Document DSSSL support
-
-@node Supported Protocols, , Stylesheets, Introduction
-@chapter Supported Protocols
-@cindex Network Protocols
-@cindex Protocols Supported
-@cindex Supported Protocols
-Emacs-W3 supports the following protocols
-@table @b
-@item Usenet News
-Can either display an entire newsgroup or specific articles by
-Message-ID: header. Instead of rewriting a newsreader, this integrates
-with the Gnus newsreader. It requires at least Gnus 5.0, but it is
-always safest to use the latest version. Gnus supports some very
-advanced features, including virtual newsgroups, mail and news
-integration, and reading news from multiple servers. @inforef{Gnus,
-Top,gnus}, for more info.
-
-To be more in line with the other URL schemes, the hostname and port of
-an NNTP server can be specified. URLs of the form
-news://hostname:port/messageID work, but might not work in some other
-browsers.
-
-@item HTTP
-Supports the HTTP/0.9, HTTP/1.0, and parts of the HTTP/1.1 protocols.
-@item Gopher
-Support for all gopher types, including CSO queries.
-@item Gopher+
-Support for Gopher+ retrievals. Support for converting ASK blocks into
-HTML 3.0 FORMS and submitting them back to the server.
-@item FTP
-FTP is handled by either ange-ftp or efs.
-@inforef{Ange-FTP,Top,ange-ftp}, for more information on Ange-FTP, or
-@inforef{EFS, Top,efs}, for information on EFS.
-@item Local files
-Local files are of course handled, and MIME content-types are derived
-from the file extensions.
-@item telnet, tn3270, rlogin
-Telnet, tn3270, and rogin are handled by running the appropriate program
-in an emacs buffer, or running an external process.
-@item mailto
-Causes a mail message to be started to a specific address. Supports the
-Netscape @i{extensions} to specify arbitrary headers on the message.
-@item data
-A quick and easy way to `inline' small pieces of information that you do
-not necessarily want to download over the net separately. Can speed up
-display of small icons, stylesheet information, etc. See the internet
-draft draft-masinter-url-data-02.txt for more information.
-@item mailserver
-A more powerful version of mailto, which allows the author to specify
-the subject and body text of the mail message. This type of link is
-never fully executed without user confirmation, because it is possible
-to insert insulting or threatening (and possibly illegal) data into the
-message. The mail message is displayed, and the user must confirm the
-message before it is sent.
-@item x-exec
-A URL can cause a local executable to be run, and its output interpreted
-as if it had come from an HTTP server. This is very useful, but is
-still an experimental protocol, hence the X- prefix. This URL protocol
-is deprecated, but might be useful in the future.
-@item NFS
-Retrieves information over NFS. This requires that your operating
-system support auto-mounting of NFS volumes.
-@item finger
-Retrieves information about a user via the 'finger' protocol.
-@item Info
-Creates a link to an GNU-style info file. @inforef{Info,Top,info}, for more
-information on the Info format.
-@item SSL
-SSL requires a set of patches to the Emacs C code and SSLRef 2.0, or an
-external program to run in a subprocess (similar to the @file{tcp.el}
-package that comes with GNUS. @xref{Installing SSL}
-@end table
-
-@node Getting Started, Getting Emacs, Introduction, Top
+@node Getting Started, Basic Usage, Top, Top
@chapter Getting Started
@cindex Clueless in Seattle
@cindex Getting Started
-This section of the manual deals with getting, compiling, and
-configuring @i{Emacs-W3}.
-:: WORK :: Introduction to 'Getting Started'
-
-@ifinfo
-@menu
-* Getting Emacs:: Where to get Emacs
-* Getting Emacs-W3:: Where to get Emacs-W3
-* Basic Setup:: Basic setup that most people want to do
-* Firewalls:: Integrating Emacs-W3 with a firewall setup.
-* Proxy Gateways:: Using a proxy server
-@end menu
-@end ifinfo
-
-@node Getting Emacs, Getting Emacs-W3, Getting Started, Getting Started
-@section Getting Emacs
-@cindex Getting Emacs
-@cindex Source code availability
-:: WORK :: Explanation of Emacs, XEmacs, and where to get both
-
-@node Getting Emacs-W3, Basic Setup, Getting Emacs, Getting Started
-@section Getting Emacs-W3
-@cindex FTP'in the distribution
-@cindex Source code availability
-:: WORK :: Explanation of Emacs, XEmacs, and where to get both
-
-@node Basic Setup, Firewalls, Getting Emacs-W3, Getting Started
-@section Basic Setup
-For most people, Emacs-W3 will be ready to run straight out of the box.
-Once the user is more familiar with the web and how it integrates with
-Emacs, there are a few basic configuration variables that most people
-will want to personalize.
-
-@table @code
-@item w3-default-homepage
+@kindex M-x w3
@vindex w3-default-homepage
-The URL to open at startup. This defaults to the environment variable
-WWW_HOME if it is not set it in the users @file{.emacs} file. If
-WWW_HOME is undefined, then it defaults to the hypertext documentation
-for Emacs-W3.
+@findex w3
+If installed correctly, starting Emacs-W3 is quite painless. Just type
+@kbd{M-x w3} in a running Emacs sessions. This will retrieve the
+default page that has been configured - by default the documentation for
+Emacs-W3 at Indiana University.
-@item w3-delay-image-loads
-@vindex w3-delay-image-loads
-Controls the loading of inlined images. If non-@code{nil}, images are
-not loaded. If the correct image converters are not installed or the
-network connection is very slow, it is best to set this to @code{t}.
-Defaults to @code{nil}.
-@item url-global-history-file
-@vindex url-global-history-file
-The global history file used by both Mosaic/X and Emacs-W3. This file
-contains a list of all the URLs that have been visited. This file is parsed
-at startup and used to provide URL completion. Emacs-W3 can read and
-write Mosaic/X or Netscape 1.x style history files, or use its own
-internal format (faster). The file type is determined automatically, or
-prompted for if the file does not exist.
-@item w3-hotlist-file
-@vindex w3-hotlist-file
-Hotlist filename. This should be the name of a file that is stored in
-NCSA's Mosaic/X or Netscape's format. It is used to keep a listing of
-commonly accessed URLs.
-@item w3-personal-annotation-directory
-@vindex w3-personal-annotation-directory
-The directory where Emacs-W3 looks for personal annotations. This is a
-directory that should hold the personal annotations stored in a
-Mosaic/X-compatible format.
-@item url-pgp/pem-entity
-@findex user-real-login-name
-@findex system-name
-The name by which the user is known to PGP and/or PEM entities. If this
-is not set when Emacs-W3 is loaded, it defaults to
-@code{user-mail-address} if it is set, otherwise @code{(user-real-login-name)}@@@code{(system-name)}.
-@item url-personal-mail-address
-@vindex url-personal-mail-address
-@vindex url-pgp/pem-entity
-User's full email address. This is what is sent to HTTP/1.0 servers as
-the FROM header. If this is not set when Emacs-W3 is loaded, then it
-defaults to the value of @code{url-pgp/pem-entity}.
+If the default page is not retrieved correctly at startup, you will have
+to do some customization.
+
+@menu
+* Using the Network:: Tell Emacs about your network setup.
+* Proxy Gateways:: Using an @sc{http} proxy
+* Startup Files:: What is where, and why.
+* Preferences Panel:: Quick configuration of common options.
+@end menu
-@item w3-right-border
-@vindex w3-right-border
-@findex window-width
-Amount of space to leave on right margin of WWW buffers. This amount is
-subtracted from the width of the window for each new WWW buffer and used
-as the new @code{fill-column}.
+@node Using the Network, Proxy Gateways, Getting Started, Getting Started
+@section Using the Network
+By default, Emacs can support standard @sc{tcp}/@sc{ip} network
+connections on almost all the platforms it runs on (Unix, @sc{vms},
+Windows, etc). However, there are several situations where it is not
+sufficient.
-@item w3-track-mouse
-@vindex w3-track-mouse
-Controls whether to track the mouse and message the url under the mouse.
-If this is non-@code{nil}, then a description of the hypertext area
-under the mouse is shown in the minibuffer. This shows what type of
-link (inlined image, form entry area, delayed image, delayed MPEG, or
-hypertext reference) is under the cursor, and the destination.
-@item w3-echo-link
-@vindex w3-echo-link
-Controls how a URL is shown when a link is reached with @key{f},
-@key{b}, or the mouse moves over it. Possible values are:
@table @b
-@item url
-Displays the URL (ie: @samp{http://www.cs.indiana.edu/}).
-@item text
-Displays the text of the link (ie: @samp{A link to Indiana University}).
-@item title
-Displays the title of the link, if any, otherwise behaves the same as @code{url}.
-@item nil
-Show nothing.
-@end table
-@item w3-use-forms-index
-@vindex w3-use-forms-index
-@cindex ISINDEX handling
-@cindex Forms based searching
-@cindex Searching with forms
-Non-@code{nil} means translate tags into a hypertext form. A
-single text entry box is shown where the ISINDEX tag appears.
-@item url-use-hypertext-gopher
-@vindex url-use-hypertext-gopher
-@cindex Gopher+
-Controls how gopher documents are retrieved. If non-@code{nil}, the
-gopher pages are converted into HTML and parsed just like any other
-page. If @code{nil}, the requests are passed off to the
-@file{gopher.el} package by Scott Snyder. Using the @file{gopher.el}
-package loses the gopher+ support, and inlined searching.
-@item url-xterm-command
-@vindex url-xterm-command
-Command used to start a windowed shell, similar to an xterm. This
-string is passed through @code{format}, and should expect four strings:
-the title of the window, the program name to execute, and the server and
-port number. The default is for xterm, which is very UNIX and
-XWindows-centric.
-@end table
-@node Firewalls, Proxy Gateways, Basic Setup, Getting Started
-@section Firewalls
-@cindex Gateways
-There are several different reasons why the gateway support might be
-required.
-@enumerate
@cindex Firewalls
-@item
-Stuck behind a firewall. This is usually the case at large corporations
-with paranoid system-administrators.
-
-@cindex TERM
-@item
-Using TERM @footnote{TERM is a user-level protocol for emulating IP over
-a serial line. More information is available at
-ftp://sunsite.unc.edu/pub/Linux/apps/comm/term} for slip-like access to
-the internet.
+@item Firewalls
+It is becoming more and more common to be behind a firewall or some
+other system that restricts your outbound network activity, especially
+if you are like me and away from the wonderful world of academia.
+Emacs-W3 has several different methods to get around firewalls (not to
+worry though - none of them should get you in trouble with the local
+@sc{mis} department.)
-NOTE: XEmacs and Emacs 19.22 or later have patches to enable native TERM
-networking. To enable it, #define TERM in the appropriate s/*.h file
-for the operating system, then change the SYSTEM_LIBS define to include
-the @file{termnet} library that comes with the latest versions of TERM.
-
-@item
+@item Emacs cannot resolve hostnames.
@cindex Faulty hostname resolvers
-@cindex Broken SUN libc
-@cindex Can't resolve hostnames
-Emacs cannot resolve hostnames. This happens quite often on Sun
-workstations and some ULTRIX machines. Some C libraries do not include
-the hostname resolver routines in their static libraries. If Emacs was
-linked statically, this means it won't be able to get to any machines
+@cindex Broken SunOS libc
+@cindex Hostname resolution
+This happens quite often on SunOS workstations and some ULTRIX machines.
+Some C libraries do not include the hostname resolver routines in their
+static libraries. If Emacs was linked statically, and was not linked
+with the resolver libraries, it wil not be able to get to any machines
off the local network. This is characterized by being able to reach
someplace with a raw ip number, but not its hostname
-(http://129.79.254.191/ works, but http://www.cs.indiana.edu/ doesn't).
+(@url{http://129.79.254.191/} works, but
+@url{http://www.cs.indiana.edu/} doesn't).
+
+The best solution for this problem is to recompile Emacs, making sure to
+either link dynamically (if available on your operating system), or
+include the @file{-lresolv}.
+
+@cindex url-gateway-broken-resolution
+If you do not have the disk space or the appropriate permissions to
+recompile Emacs, another alternative is using the @file{nslookup}
+program to do hostname resolution. To turn this on, set the variable
+@code{url-gateway-broken-resolution} in your @file{~/.emacs} file. This
+runs the program specified by @code{url-gateway-nslookup-program} (by
+default "@code{nslookup}" to do hostname resolution. This program should
+expect a single argument on the command line - the hostname to resolve,
+and should produce output similar to the standard Unix @file{nslookup}
+program:
-If for some reason it is not feasible to recompile Emacs with the
-@file{-lresolv} library or dynamic linking, it is just like being behind
-a firewall. Another alternative is to set the variable
-@code{url-broken-resolution} - this will use the support in ange-ftp or
-EFS to use @file{nslookup} in a subprocess to do all hostname resolving.
-See the variables @code{efs-nslookup-program},
-@code{efs-nslookup-on-connect}, and @code{efs-nslookup-threshold} if are
-using EFS, or @code{ange-ftp-nslookup-program} if using Ange-FTP.
+@example
+Name: www.cs.indiana.ed
+Address: 129.79.254.191
+@end example
-@end enumerate
+@cindex @sc{term}
+@item Using @sc{term} (or @sc{term}-like) Networking Software
+@sc{term} @footnote{@sc{term} is a user-level protocol for emulating
+@sc{ip} over a serial line. More information is available at
+@url{ftp://sunsite.unc.edu/pub/Linux/apps/comm/term}} for slip-like
+access to the internet.
+
+@sc{note}: XEmacs and Emacs 19.22 or later have patches to enable native
+@sc{term} networking. To enable it, @code{#define TERM} in the
+appropriate s/*.h file for the operating system, then change the
+@code{SYSTEM_LIBS} definition to include the @file{termnet} library that
+comes with the latest versions of @sc{term}.
+
+If you run into any problems with the native @sc{term} networking
+support in Emacs or XEmacs, please let @t{wmperry@@cs.indiana.edu} know,
+as he is responsible for the original support.
+@end table
@vindex url-gateway-local-host-regexp
Emacs-W3 has support for using the gateway mechanism for certain
-domains, and directly connecting to others. To use this, change the
-value of @code{url-gateway-local-host-regexp}. This should be a regular
-expression @footnote{Please see the full Emacs distribution for a
-description of regular expressions} that matches local hosts that do not
-require the use of a gateway. If @code{nil}, then all connections are
-made through the gateway.
-
+domains, and directly connecting to others. The variable
+@code{url-gateway-local-host-regexp} controls this behaviour. This is a
+regular expression @footnote{Please see the full Emacs distribution for
+a description of regular expressions} that matches local hosts that do
+not require the use of a gateway. If @code{nil}, then all connections
+are made through the gateway.
@vindex url-gateway-method
-Emacs-W3 supports several methods of getting around gateways. The variable
-@code{url-gateway-method} controls which of these methods is used. This
-variable can have several values (use these as symbol names, not
-strings):
+Emacs-W3 supports several methods of getting around gateways. The
+variable @code{url-gateway-method} controls which of these methods is
+used. This variable can have several values (use these as symbol names,
+not strings), ie: @samp{(setq url-gateway-method 'telnet)}. Possible
+values are:
+
@table @dfn
-@item program
-Run a program in a subprocess to connect to remote hosts (examples are
-@i{itelnet}@footnote{Itelnet is a standard name for a telnet executable
-that is capable of escaping the firewall. Check with system
-administrators to see if anything similar is available}, an
-@i{expect}@footnote{Expect is a scripting language that allows control
-of interactive programs (like telnet) very easily. It is available from
-gatekeeper.dec.com:/pub/GNU/expect-3.24.0.tar.gz} script, etc.).
+@item telnet
+Use this method if you must first telnet and log into a gateway host,
+and then run telnet from that host to connect to outside machines.
+
+:: WORK :: document telnet gw variables
+This section needs more information, specifically documenting the
+following variables. For now, please do @key{C-h v} on the variable for
+more information.
+
+@table @code
+@item url-gateway-telnet-host
+@item url-gateway-telnet-parameters
+@item url-gateway-telnet-password-prompt
+@item url-gateway-telnet-puser-name
+@item url-gateway-prompt-pattern
+@end table
+
+@item rlogin
+This method is identical to the @code{telnet} method, but uses
+@file{rlogin} to log into the remote machine without having to send the
+username and password over the wire every time.
+
+:: WORK :: document rlogin gw variables
+This section needs more information, specifically documenting the
+following variables. For now, please do @key{C-h v} on the variable for
+more information.
+
+@table @code
+@item url-gateway-rlogin-host
+@item url-gateway-rlogin-parameters
+@item url-gateway-rlogin-user-name
+@item url-gateway-prompt-pattern
+@end table
@item tcp
-Masanobu UMEDA (@i{umerin@@mse.kyutech.ac.jp}) has written a very nice
-replacement for the standard networking in Emacs. This does basically
-the same thing that a method of @code{program} does, but is slightly
-more transparent to the user.
-@item native
-This means that Emacs-W3 should use the builtin networking code of Emacs.
-This should be used only if there is no firewall, or the Emacs source
-has already been hacked to get around the firewall.
+Masanobu UMEDA (@i{umerin@@mse.kyutech.ac.jp}) has written a very small
+application that you can run in a subprocess to do the network
+connections.
+
+@item @sc{socks}
+Use if the firewall has a @sc{socks} gateway running on it.
+
+:: WORK :: document socks variables
+This section needs more information, specifically documenting the
+following variables. For now, please do @key{C-h v} on the variable for
+more information.
+
+@table @code
+@item socks-host
+@item socks-password
+@item socks-username
+@item socks-port
+@item socks-timeout
@end table
-One of these needs a bit more explanation than that:
-@vindex url-gateway-telnet-ready-regexp
-@vindex url-gateway-telnet-program
-When running a program in a subprocess to emulate a network connection,
-a few extra variables need to be set. The variable
-@code{url-gateway-telnet-program} should point to an executable that
-accepts a hostname and port # as its arguments, and passes standard
-input to the remote host. This can be either the full path to the
-executable or just the basename. The variable
-@code{url-gateway-telnet-ready-regexp} controls how long Emacs-W3 should
-wait after spawning the subprocess to start sending to its standard
-input. This gets around a bug where telnet would miss the beginning of
-requests becausse it did not buffer its input before opening a
-connection. This should be a regular expression to watch for that
-signifies the end of the setup of @code{url-gateway-telnet-program}.
-The default should work fine for telnet.
+
+@c @item ssl
+@c This probably shouldn't be documented
+
+@item native
+This means that Emacs-W3 should use the builtin networking code of
+Emacs. This should be used only if there is no firewall, or the Emacs
+source has already been hacked to get around the firewall.
+@end table
Emacs-W3 should now be able to get outside the local network. If none
of this makes sense, its probably my fault. Please check with the
@@ -546,28 +294,28 @@
through something similar to this before, and would be much more
helpful/knowledgeable about the local setup than I would be. But feel
free to mail me as a last resort.
-
-@node Proxy Gateways, Basic Usage, Firewalls, Getting Started
+@node Proxy Gateways, Startup Files , Using the Network, Getting Started
@section Proxy Gateways
@vindex url-proxy-services
@cindex Proxy Servers
@cindex Proxies
@cindex Proxies, environment variables
@cindex HTTP Proxy
+
In late January 1993, Kevin Altis and Lou Montulli proposed and
implemented a new proxy service. This service requires the use of
environment variables to specify a gateway server/port # to send
-protocol requests to. Each protocol (HTTP, WAIS, gopher, FTP, etc.@:)
-can have a different gateway server. The environment variables are
-@var{PROTOCOL}_proxy, where @var{PROTOCOL} is one of the supported
-network protocols (gopher, file, HTTP, FTP, etc.)
+protocol requests to. Each protocol (@sc{http}, @sc{wais}, gopher,
+@sc{ftp}, etc.) can have a different gateway server. The environment
+variables are @code{PROTOCOL}_proxy, where @code{PROTOCOL} is one of the
+supported network protocols (gopher, file, @sc{http}, @sc{ftp}, etc.)
@cindex No Proxy
@cindex Proxies, exclusion lists
@vindex NO_PROXY
For companies with internal intranets, it will usually be helpful to
define a list of hosts that should be contacted directly, @b{not} sent
-through the proxy. The @var{NO_PROXY} environment variable controls
+through the proxy. The @code{NO_PROXY} environment variable controls
what hosts are able to be contacted directly. This should be a comma
separated list of hostnames, domain names, or a mixture of both.
Asterisks can be used as a wildcard. For example:
@@ -585,8 +333,8 @@
For those adventurous souls who enjoy writing regular expressions, all
the proxy settings can be manipulated from Emacs-Lisp. The variable
@code{url-proxy-services} controls this. This is an assoc list, keyed
-on the protocol type (http, gopher, etc) in all lowercase. The
-@code{cdr} of each entry should be the fully-specified URL of the proxy
+on the protocol type (@sc{http}, gopher, etc) in all lowercase. The
+@code{cdr} of each entry should be the fully-specified @sc{url} of the proxy
server to contact, or, in the case of the special "no_proxy" entry, a
regular expression that matches any hostnames that should be contacted
directly.
@@ -596,22 +344,47 @@
("no_proxy" . "^.*\\(aventail\\|seanet\\)\.com")))
@end example
-@node Basic Usage, , Proxy Gateways, Top
+@node Startup Files, Preferences Panel, Proxy Gateways, Getting Started
+@section Startup Files
+@cindex Startup files
+@cindex Default stylesheet
+:: WORK :: startup files
+This section should document where emacs-w3 looks for its startup files,
+and what each one does. 'profile' 'stylesheet' 'hotlist' 'history' etc.
+
+@node Preferences Panel, , Startup Files, Getting Started
+@section Preferences Panel
+@cindex Preferences
+@kindex M-x w3-edit-preferences
+:: WORK :: pref panel
+This should document the quick preferences panel. M-x w3-edit-preferences
+
+@node Basic Usage, Movement , Getting Started, Top
@chapter Basic Usage
-Emacs-W3 is similar to the Info package all Emacs users hold near and dear to
-their hearts (@xref{Top,,Info,info, The Info Manual}, for a description
-of Info). Basically, @kbd{space} and @kbd{backspace} control scrolling,
-and @kbd{return} or @kbd{mouse2} follows a hypertext link. The @kbd{f}
-and @kbd{b} keys maneuver around the various links on the page.
+@cindex Basic Usage
+@kindex space
+@kindex backspace
+@kindex return
+@kindex tab
+@kindex M-tab
+Emacs-W3 is similar to the Info package all Emacs users hold near and
+dear to their hearts (@xref{Top,,Info,info, The Info Manual}, for a
+description of Info). Basically, @kbd{space} and @kbd{backspace}
+control scrolling, and @kbd{return} or the middle mouse button follows a
+hypertext link. The @kbd{tab} and @kbd{Meta-tab} keys maneuver around the
+various links on the page.
-@b{NOTE:} To enter data into a form entry area, select it using
-@kbd{return} or the middle mouse button, just like a hypertext link.
+@b{NOTE:} Starting with Emacs-W3 3.0, form entry areas in a page can be
+typed directly into. This is one of the main differences in navigation
+from version 2.0. If you are used to using the @kbd{f} and @kbd{b} keys
+to navigate around a buffer, I suggest training yourself to always use
+@kbd{tab} and @kbd{M-tab} - it will save time and frustration on pages
+with lots of form fields.
By default, hypertext links are surrounded by '[[' and ']]' on
non-graphic terminals (VT100, DOS window, etc.). On a graphics
-terminal, the links are in shown in different colors. @xref{Controlling
-Formatting} for information on how to change this, or for help on
-getting the highlighting to work on graphics terminals.
+terminal, the links are in shown in different colors.
+@xref{Stylesheets} for information on how to change this.
There are approximately 50 keys bound to special Emacs-W3 functions.
The basic rule of thumb regarding keybindings in Emacs-W3 is that a
@@ -624,26 +397,26 @@
@ifinfo
@menu
-* Movement:: Moving around in a Emacs-W3 buffer
-* Information:: Getting information about the Emacs-W3 document being
- viewed, and/or links within that document.
-* Action:: Taking actions in a Emacs-W3 buffer (following links,
- printing, etc.)
-* Miscellaneous:: Miscellaneous keybindings
+* Movement:: Moving around in the buffer.
+* Information:: Getting information about a document.
+* Action:: Following links, printing, etc.
+* Miscellaneous:: Everything else.
@end menu
@end ifinfo
@node Movement, Information, Basic Usage, Basic Usage
@section Movement
-:: WORK :: Document the 'h' and 'a' keymaps
+All the standard Emacs bindings for movement are still in effect, with a
+few additions for convenience.
+
@table @kbd
-@findex scroll-up
-@kindex SPC
-@item SPC
+@findex w3-scroll-up
+@kindex space
+@item space
Scroll downward in the buffer. With prefix arg, scroll down that many
screenfuls.
-@kindex DEL
+@kindex backspace
@findex scroll-down
-@item DEL
+@item backspace
Scroll upward in the buffer. With prefix arg, scroll up that many
screenfuls.
@kindex <
@@ -655,96 +428,110 @@
@item >
Goes to the end of document
@kindex b
-@kindex Shift-TAB
-@findex w3-back-link
-@item Shift-TAB, b
+@kindex Meta-tab
+@findex w3-widget-backward
+@item Meta-tab, b
Attempts to move backward one link area in the current document.
Signals an error if no previous links are found.
-@kindex hl
-@findex w3-show-hotlist
-@item hl
-Displays a complete listing of the items in the hotlist.
-@kindex hu
-@findex w3-use-hotlist
-@item hu
-Go to a link in the hotlist.
+@kindex f
+@kindex tab
+@kindex n
+@findex w3-widget-forward
+@item tab, f, n
+Attempts to move forward one link area in the current document. Signals
+an error if no more links are found.
+@kindex B
+@findex w3-backward-in-history
+@item B
+Move backwards in the history stack.
+@kindex F
+@findex w3-forward-in-history
+@item F
+Move forwards in the history stack.
+@kindex l
+@findex w3-goto-last-buffer
+@item l
+Return to the last buffer shown before this buffer.
+@kindex q
+@findex w3-quit
+@item q
+Kill this buffer.
+@kindex Q, u
+@findex w3-leave-buffer
+Bury this buffer, but don't kill it
+@end table
+
+@node Information, Action, Movement, Basic Usage
+@section Information
+These functions relate information about one or more links on the
+current document.
+
+@table @kbd
+@kindex v
+@findex url-view-url
+@item v
+This shows the @sc{url} of the current document in the minibuffer.
+@kindex V
+@findex w3-view-this-url
+@item V
+This shows the @sc{url} of the hypertext link under point in the
+minibuffer.
+@kindex i
+@findex w3-document-information
+@item i
+Shows miscellaneous information about the currently displayed document.
+This includes the @sc{url}, the last modified date, @sc{mime} headers,
+the @sc{http} response code, and any relationships to other documents.
+Any security information is also displayed.
+@kindex I
+@findex w3-document-information-this-url
+@item I
+Shows information about the @sc{url} at point.
+@kindex s
+@findex w3-source-document
+@item s
+This shows the @sc{html} source of the current document in a separate buffer.
+The buffer's name is based on the document's @sc{url}.
+@kindex S
+@findex w3-source-document-at-point
+@item S
+Shows the @sc{html} source of the hypertext link under point in a separate
+buffer. The buffer's name is based on the document's @sc{url}.
+@kindex k
+@findex w3-save-url
+@item k
+This stores the current document's @sc{url} in the kill ring, and also in the
+current window-system's clipboard, if possible.
+@kindex K
+@findex w3-save-this-url
+@item K
+Stores the @sc{url} of the document under point in the kill ring, and also in
+the current window-system's clipboard, if possible.
+@end table
+
+@node Action, Miscellaneous, Information, Basic Usage
+@section Action
+First, here are the keys and functions that bring up a new hypertext
+page, usually creating a new buffer.
+@table @kbd
@kindex m
@findex w3-complete-link
@item m
Choose a link from the current buffer and follow it. A completing-read
is done on all the links, so @kbd{space} and @kbd{TAB} can be used for
completion.
-@kindex f
-@kindex TAB
-@kindex n
-@findex w3-forward-link
-@item TAB, f, n
-Attempts to move forward one link area in the current document. Signals
-an error if no more links are found.
-@end table
-@node Information, Action, Movement, Basic Usage
-@section Information
-These functions relate information about one or more links on the
-current document.
-@table @kbd
-@kindex v
-@findex url-view-url
-@item v
-This shows the URL of the current document in the minibuffer.
-@kindex V
-@findex w3-view-this-url
-@item V
-This shows the URL of the hypertext link under point in the minibuffer.
-If there is not a hypertext link under point, then it shows the type of
-form entry area under point. If there is no form entry area under
-point, then it shows the inlined image's URL that is under point, if
-any.
-@kindex i
-@findex w3-document-information
-@item i
-Shows miscellaneous information about the currently displayed document.
-This includes the URL, the last modified date, MIME headers, the HTTP
-response code, and any relationships to other documents. Any security
-information is also displayed.
-@kindex I
-@findex w3-document-information-this-url
-@item I
-Shows information about the URL at point.
-@kindex s
-@findex w3-source-document
-@item s
-This shows the HTML source of the current document in a separate buffer.
-The buffer's name is based on the document's URL.
-@kindex S
-@findex w3-source-document-at-point
-@item S
-Shows the HTML source of the hypertext link under point in a separate
-buffer. The buffer's name is based on the document's URL.
-@kindex k
-@findex w3-save-url
-@item k
-This stores the current document's URL in the kill ring, and also in the
-current window-system's clipboard, if possible.
-@kindex K
-@findex w3-save-this-url
-@item K
-Stores the URL of the document under point in the kill ring, and also in
-the current window-system's clipboard, if possible.
-@end table
-@node Action, Miscellaneous, Information, Basic Usage
-@section Action
-First, here are the keys and functions that bring up a new hypertext
-page, usually creating a new buffer.
-@table @kbd
@kindex return
@findex w3-follow-link
@item return
Pressing return when over a hyperlink attempts to follow the link
under the cursor. With a prefix argument (@kbd{C-u}), this forces the
file to be saved to disk instead of being passed off to other viewers
-or being parsed as HTML.
+or being parsed as @sc{html}.
-Pressing return when over a form input field will prompt in the
+Pressing return when over a form input field can cause auto-submission
+of the form. This is for Mosaic and Netscape compatibility. If there
+is only one item in the form other than submit or reset buttons, then
+
minibuffer for the data to insert into the input field. Type checking
is done, and the data is only entered into the form when data of the
correct type is entered (ie: cannot enter 44 for 'date' field, etc).
@@ -771,12 +558,12 @@
@findex w3-print-this-url
@item p
Prints out the current buffer in a variety of formats, including
-PostScript, HTML source, or formatted text.
+PostScript, @sc{html} source, or formatted text.
@kindex P
@findex w3-print-url-under-point
@item P
-Prints out the URL under point in a variety of formats, including
-PostScript, HTML source, or formatted text.
+Prints out the @sc{url} under point in a variety of formats, including
+PostScript, @sc{html} source, or formatted text.
@kindex m
@findex w3-complete-link
@item m
@@ -795,7 +582,7 @@
@kindex C-o
@findex w3-fetch
@item C-o
-Prompts for a URL in the minibuffer, and attempts to fetch
+Prompts for a @sc{url} in the minibuffer, and attempts to fetch
it. If there are any errors, or Emacs-W3 cannot understand the type of link
requested, the errors are displayed in a hypertext buffer.
@kindex o
@@ -816,13 +603,13 @@
Perform a search, if this is a searchable index. Searching requires a
server - Emacs-W3 can not do local file searching, as there are too many
possible types of searches people could want to do. Generally, the only
-URL types that allow searching are HTTP, gopher, and X-EXEC.
+@sc{url} types that allow searching are @sc{http}, gopher, and X-EXEC.
@kindex Hv
@findex w3-show-history-list
@vindex w3-keep-history
@item Hv
If @code{url-keep-history} is non-@code{nil}, then Emacs-W3 keeps track
-of all the URLs visited in an Emacs session. This function takes all
+of all the @sc{url}s visited in an Emacs session. This function takes all
the links that are in that internal list, and formats them as hypertext
links in a list.
@end table
@@ -870,16 +657,16 @@
@findex w3-mail-current-document
@item M-m
Mails the current document to someone. Choose from several different
-formats to mail: formatted text, HTML source, PostScript, or LaTeX source.
-When the HTML source is mailed, then an appropriate tag is inserted
+formats to mail: formatted text, @sc{html} source, PostScript, or LaTeX source.
+When the @sc{html} source is mailed, then an appropriate tag is inserted
at the beginning of the document so that relative links may be followed
correctly by whoever receives the mail.
@kindex M-M
@findex w3-mail-document-under-point
@item M-M
Mails the document pointed to by the hypertext link under point to someone.
-Choose from several different formats to mail: formatted text, HTML source,
-PostScript, or LaTeX source. When the HTML source is mailed, then an
+Choose from several different formats to mail: formatted text, @sc{html} source,
+PostScript, or LaTeX source. When the @sc{html} source is mailed, then an
appropriate tag is inserted at the beginning of the document so that
relative links may be followed correctly by whoever receives the
mail.
@@ -887,7 +674,7 @@
@findex w3-print-this-url
@item p
Prints the current document. Choose from several different formats to
-print: formatted text, HTML source, PostScript (with ps-print), or by using
+print: formatted text, @sc{html} source, PostScript (with ps-print), or by using
LaTeX and dvips).
@findex lpr-buffer
@@ -897,11 +684,11 @@
is called, and the variables @code{lpr-command} and @code{lpr-switches}
control how the document is printed.
-When the HTML source is printed, then an appropriate tag is
+When the @sc{html} source is printed, then an appropriate tag is
inserted at the beginning of the document.
@vindex w3-print-commnad
@vindex w3-latex-docstyle
-When postscript is printed, then the HTML source of the document is
+When postscript is printed, then the @sc{html} source of the document is
converted into LaTeX source. There are several variables controlling
what the final LaTeX document looks like.
@@ -915,7 +702,7 @@
will be used instead.
@item w3-latex-docstyle
@vindex w3-latex-docstyle
-The document style to use when printing or mailing converted HTML files
+The document style to use when printing or mailing converted @sc{html} files
in LaTeX. Good defaults are: @{article@}, [psfig,twocolumn]@{article@},
etc.
@item w3-latex-packages
@@ -928,8 +715,8 @@
document titles.
@item w3-latex-print-links
@vindex w3-latex-print-links
-If non-@code{nil}, prints the URLs of hypertext links as endnotes at the
-end of the document. If set to @code{footnote}, prints the URL's as
+If non-@code{nil}, prints the @sc{url}s of hypertext links as endnotes at the
+end of the document. If set to @code{footnote}, prints the @sc{url}'s as
footnotes on each page.
@end table
@@ -941,15 +728,15 @@
@kindex M-x w3-insert-formatted-url
@findex w3-insert-formatted-url
@item M-x w3-insert-formatted-url
-Insert a fully formatted HTML link into another buffer. This gets the
-name and URL of either the current buffer, or, with a prefix arg, of the
+Insert a fully formatted @sc{html} link into another buffer. This gets the
+name and @sc{url} of either the current buffer, or, with a prefix arg, of the
link under point, and construct the appropriate ... markup and
insert it into the desired buffer.
@kindex M-tab
@findex w3-insert-this-url
@item M-tab
-Inserts the URL of the current document into another buffer. Buffer is
-prompted for in the minibuffer. With prefix arg, uses the URL of the
+Inserts the @sc{url} of the current document into another buffer. Buffer is
+prompted for in the minibuffer. With prefix arg, uses the @sc{url} of the
link under point.
@kindex U
@findex w3-use-links
@@ -985,9 +772,6 @@
'forward' and 'back' buttons easily.
* Global History:: Keeping a history of all the places ever
visited on the web.
-* Annotations:: Annotations allow comments on other
- people's Web documents without needing
- to change the document.
@end menu
@end ifinfo
@node Emulation, Hotlist Handling, Compatibility, Compatibility
@@ -1002,7 +786,131 @@
@findex w3-lynx-emulation-minor-mode
@vindex w3-mode-hook
:: WORK :: Document lynx emulation
+@table @key
+@item Down arrow
+Highlight next topic
+@item Up arrow
+Highlight previous topic
+@item Right arrow, Return, Enter
+Jump to highlighted topic
+@item Left arrow
+Return to previous topic
+@item +
+Scroll down to next page (Page-Down)
+@item -
+Scroll up to previous page (Page-Up)
+@item SPACE
+Scroll down to next page (Page-Down)
+@item b
+Scroll up to previous page (Page-Up)
+@item C-A
+Go to first page of the current document (Home)
+@item C-E
+Go to last page of the current document (End)
+@item C-B
+Scroll up to previous page (Page-Up)
+@item C-F
+Scroll down to next page (Page-Down)
+@item C-N
+Go forward two lines in the current document
+@item C-P
+Go back two lines in the current document
+@item )
+Go forward half a page in the current document
+@item (
+Go back half a page in the current document
+@item #
+Go to Toolbar or Banner in the current document
+@item ?, h
+Help (this screen)
+@item a
+Add the current link to a bookmark file
+@item c
+Send a comment to the document owner
+@item d
+Download the current link
+@item e
+Edit the current file
+@item g
+Goto a user specified @sc{url} or file
+@item i
+Show an index of documents
+@item j
+Execute a jump operation
+@item k
+Show a list of key mappings
+@item l
+List references (links) in current document
+@item m
+Return to main screen
+@item o
+Set your options
+@item p
+Print the current document
+@item q
+Quit
+@item /
+Search for a string within the current document
+@item s
+Enter a search string for an external search
+@item n
+Go to the next search string
+@item v
+View a bookmark file
+@item V
+Go to the Visited Links Page
+@item x
+Force submission of form or link with no-cache
+@item z
+Cancel transfer in progress
+@item [backspace]
+Go to the history Page
+@item =
+Show file and link info
+@item \
+Toggle document source/rendered view
+@item !
+Spawn your default shell
+@item *
+Toggle image_links mode on and off
+@item [
+Toggle pseudo_inlines mode on and off
+@item ]
+Send an @sc{http} @sc{head} request for the current doc or link
+@item C-R
+Reload current file and refresh the screen
+@item C-W
+Refresh the screen
+@item C-U
+Erase input line
+@item C-G
+Cancel input or transfer
+@item C-T
+Toggle trace mode on and off
+@item C-K
+Invoke the Cookie Jar Page
+@end table
+
:: WORK :: Document netscape emulation
+Uh, turn this into pretty tables about what keys are emulated.
+
+@example
+(define-key w3-netscape-emulation-minor-mode-map "\M-s" 'w3-save-as)
+(define-key w3-netscape-emulation-minor-mode-map "\M-m" 'w3-mailto)
+(define-key w3-netscape-emulation-minor-mode-map "\M-n" 'make-frame)
+(define-key w3-netscape-emulation-minor-mode-map "\M-l" 'w3-fetch)
+(define-key w3-netscape-emulation-minor-mode-map "\M-o" 'w3-open-local)
+(define-key w3-netscape-emulation-minor-mode-map "\M-p" 'w3-print-this-url)
+(define-key w3-netscape-emulation-minor-mode-map "\M-q" 'w3-quit)
+(define-key w3-netscape-emulation-minor-mode-map "\M-f" 'w3-search-forward)
+(define-key w3-netscape-emulation-minor-mode-map "\M-g" 'w3-search-again)
+(define-key w3-netscape-emulation-minor-mode-map "\M-r" 'w3-reload-document)
+(define-key w3-netscape-emulation-minor-mode-map "\M-i" 'w3-load-delayed-images)
+(define-key w3-netscape-emulation-minor-mode-map "\M-a" 'w3-hotlist-add-document)
+(define-key w3-netscape-emulation-minor-mode-map "\M-b" 'w3-show-hotlist)
+(define-key w3-netscape-emulation-minor-mode-map "\M-h" 'w3-show-history-list)
+
+@end example
@node Hotlist Handling, Session History, Emulation, Compatibility
@section Hotlist Handling
@@ -1010,7 +918,7 @@
:: WORK :: Make sure everything hotlist related can be accessed via 'h'
In order to avoid having to traverse many documents to get to the same
document over and over, Emacs-W3 supports a ``hotlist'' like Mosaic. This is
-a file that contains URLs and aliases. Hotlists allow quick access to any
+a file that contains @sc{url}s and aliases. Hotlists allow quick access to any
document in the Web, providing it has been visited and added to the hotlist.
The variable @code{w3-hotlist-file} determines where this information
is saved. The structure of the file is compatible with Mosaic's
@@ -1024,9 +932,8 @@
@item a
Adds the current document to the hotlist, with the buffer name as its
identifier. Modifies the file specified by @code{w3-hotlist-file}. If
-this is given a @var{prefix-argument} (via @kbd{C-u}), the title is
-prompted for instead of automatically defaulting to the
-document title.
+this is given a prefix-argument (via @kbd{C-u}), the title is prompted
+for instead of automatically defaulting to the document title.
@findex w3-hotlist-refresh
@vindex w3-hotlist-file
@@ -1062,7 +969,7 @@
@item hv
@kindex hv
@findex w3-show-hotlist
-Converts the hotlist into HTML and displays it.
+Converts the hotlist into @sc{html} and displays it.
@item ha
@kindex ha
@findex w3-hotlist-apropos
@@ -1075,16 +982,16 @@
@node Session History, Global History, Hotlist Handling, Compatibility
@section History
@cindex History Lists
-Almost all web browsers keep track of the URLs followed from a page, so
+Almost all web browsers keep track of the @sc{url}s followed from a page, so
that it can provide @b{forward} and @b{back} buttons to keep a @i{path}
-of URLs that can be traversed easily.
+of @sc{url}s that can be traversed easily.
@vindex url-keep-history
If the variable @code{url-keep-history} is @code{t}, then Emacs-W3
-keeps a list of all the URLs visited in a session.
+keeps a list of all the @sc{url}s visited in a session.
@findex w3-show-history
To view a listing of the history for this session of Emacs-W3, use
@code{M-x w3-show-history} from any buffer, and Emacs-W3 generates an
-HTML document showing every URL visited since Emacs started (or
+@sc{html} document showing every @sc{url} visited since Emacs started (or
cleared the history list), and then format it. Any of the links can
be chosen and followed to the original document. To clear the history
list, choose 'Clear History' from the 'Options' menu.
@@ -1093,29 +1000,29 @@
@findex w3-backward-in-history
@findex w3-fetch
Another twist on the history list mechanism is the fact that all
-Emacs-W3 buffers remember what URL, buffer, and buffer position of the
+Emacs-W3 buffers remember what @sc{url}, buffer, and buffer position of the
last document, and also keeps track of the next location jumped @b{to}
from that buffer. This means that the user can go forwards and
backwards very easily along the path taken to reach a particular
document. To go forward, use the function @code{w3-forward-in-history},
to go backward, use the function @code{w3-backward-in-history}.
-@node Global History, Annotations, Session History, Compatibility
+@node Global History, , Session History, Compatibility
@section Global History
:: WORK :: Document that the global history can have diff. formats
-Most web browsers also support the idea of a ``history'' of URLs the
+Most web browsers also support the idea of a ``history'' of @sc{url}s the
user has visited, and it displays them in a different style than normal
-URLs.
+@sc{url}s.
@vindex url-keep-history
@vindex url-global-history-file
If the variable @code{url-keep-history} is @code{t}, then Emacs-W3
-keeps a list of all the URLs visited in a session. The file is
+keeps a list of all the @sc{url}s visited in a session. The file is
automatically written to disk when exiting emacs. The list is added to
those already in the file specified by @code{url-global-history-file},
which defaults to @file{~/.mosaic-global-history}.
-If any URL in the list is found in the file, it is not saved, but new
+If any @sc{url} in the list is found in the file, it is not saved, but new
ones are added at the end of the file.
The function that saves the global history list is smart enough to
@@ -1127,71 +1034,20 @@
One of the nice things about keeping a global history files is that Emacs-W3
can use it as a completion table. When doing @kbd{M-x w3-fetch}, pressing
the @kbd{tab} or @kbd{space} key will show all completions for a
-partial URL. This is very useful, especially for very long URLs that
+partial @sc{url}. This is very useful, especially for very long @sc{url}s that
are not in a hotlist, or for seeing all the pages from a particular web
site before choosing which to retrieve.
-@node Annotations, Group Annotations, Global History, Compatibility
-@section Annotations
-@cindex Annotations
-Mosaic can @i{annotate} documents. Annotations are comments about the
-current document, and these annotations appear as a link to the comments
-at the end of the document. The original file is not changed.
-
-@ifinfo
-@menu
-* Group Annotations:: Annotations accessible by everyone
-* Personal Annotations:: Private annotations only accessible
- to the user who created them
-@end menu
-@end ifinfo
-@node Group Annotations, Personal Annotations, Annotations, Annotations
-@subsection Group Annotations
-@cindex Group Annotations
-@b{@i{NOTE}}: The group annotation experiment has been terminated. It
-will be replaced with support on the server side for adding tags
-to documents.
-
-@node Personal Annotations, , Group Annotations, Annotations
-@subsection Personal Annotations
-@cindex Personal Annotations
-@vindex w3-personal-annotation-directory
-Emacs-W3 looks in the directory specified by
-@code{w3-personal-annotation-directory} (defaults to
-@file{~/.mosaic-personal-annotations}). Any personal annotations for a
-document are automatically appended when it is retrieved.
-
-:: WORK :: Document the new 'a' prefix keymap
-:: WORK :: Tell where the annotations are stored
-
-@findex w3-add-personal-annotation
-@vindex w3-annotation-mode
-To add a new personal annotation, type @kbd{M-x
-w3-add-personal-annotation}. This creates a new buffer, in the mode
-specified by @code{w3-annotation-mode}. This defaults to
-@code{html-mode}. If this variable is @code{nil}, or it points to an
-undefined function, then @code{default-major-mode} is consulted.
-
-A minor mode redefines @kbd{C-c C-c} to complete the annotation and
-store it on the local disk.
-
-@findex w3-delete-personal-annotation
-To delete a personal annotation, it must be the current page. Once
-reading the annotation, @kbd{M-x w3-delete-personal-annotation} will
-remove it. This deletes the file containing the annotation, and any
-references to it in the annotation log file.
-
-Editing personal annotations is not yet supported.
-
-@node Controlling Formatting, General Formatting, Top, Top
-@chapter Controlling Formatting
+@node Stylesheets, General Formatting, Top, Top
+@chapter Stylesheets
@cindex Customizing formatting
@cindex Specifying Fonts
@cindex Fonts
+@cindex Stylesheets
@cindex Colors
How Emacs-W3 formats a document is very customizable. All control over
formatting is now controlled by a default stylesheet set by the user
-with the @code{w3-default-sheet} variable.
+with the @code{w3-default-stylesheet} variable.
The following sections describe in more detail how to change the
formatting of a document.
@@ -1212,7 +1068,7 @@
handles inlined images/mpegs.
@end menu
@end ifinfo
-@node General Formatting, Character based terminals, Controlling Formatting, Controlling Formatting
+@node General Formatting, Character based terminals, Stylesheets, Stylesheets
@section General formatting conventions
@iftex
@heading Setting the fill column
@@ -1240,7 +1096,7 @@
@end ifinfo
@vindex url-use-hypertext-dired
When Emacs-W3 encounters a link to a directory (whether by local file access
-or via FTP), it can either create an HTML document on the fly, or use
+or via @sc{ftp}), it can either create an @sc{html} document on the fly, or use
@code{dired-mode} to peruse the listing. The variable
@code{url-use-hypertext-dired} controls this behavior.
@@ -1265,7 +1121,7 @@
@cindex Gopher+
@cindex ASK blocks
There are two different ways of viewing gopher links. The built-in
-support that converts gopher directories into HTML, or the
+support that converts gopher directories into @sc{html}, or the
@file{gopher.el} package by Scott Snyder (@i{snyder@@fnald0.fnal.gov}).
The variable that controls this is @code{w3-use-hypertext-gopher}. If
set to @code{nil}, then @file{gopher.el} is used. Any other value
@@ -1292,7 +1148,7 @@
@center --------------------
@end ifinfo
@vindex w3-horizontal-rule-char
-Horizontal rules (@b{} tags in HTML[+]) are used to separate chunks
+Horizontal rules (@b{} tags in @sc{html}[+]) are used to separate chunks
of a document, and is meant to be rendered as a solid line across the
page. Some terminals display characters differently, so the variable
@code{w3-horizontal-rule-char} controls which character is used to draw
@@ -1301,13 +1157,13 @@
@code{make-string} whenever a horizontal rule of a certain width is
necessary.
-@node Character based terminals, Graphics workstations, General Formatting, Controlling Formatting
+@node Character based terminals, Graphics workstations, General Formatting, Stylesheets
@section On character based terminals
@vindex w3-delimit-emphasis
On character based terminals, there is no easy way to show that a
certain range of text is in bold or italics. If the variable
@code{w3-delimit-emphasis} is non-@code{nil}, then Emacs-W3 can insert
-characters before and after character formatting commands in HTML
+characters before and after character formatting commands in @sc{html}
documents. The defaul value of @code{w3-delimit-emphasis} is
automatically set based on the type of window system and version of
Emacs being used.
@@ -1321,21 +1177,21 @@
the header (1--6). The rest of the list should contain three items.
The first item is text to insert before the header. The second item is
text to insert after the header. Both should have reserved characters
-converted to their HTML[+] entity definitions. The third item is a
+converted to their @sc{html}[+] entity definitions. The third item is a
function to call on the area the header is in. This function is called
with arguments specifying the start and ending character positions of
the header. The starting point is always first. To convert a region to
upper case, please use @code{w3-upcase-region} instead of
@code{upcase-region}, so that entities are converted properly.
-@node Graphics workstations, Inlined images, Character based terminals, Controlling Formatting
+@node Graphics workstations, Inlined images, Character based terminals, Stylesheets
@section With graphics workstations
Starting with the first public release of version 2.3.0, all formatting
is controlled by the use of stylesheets.
:: WORK :: Graphic workstation stuff - redo for stylesheets
-@node Inlined images, , Graphics workstations, Controlling Formatting
+@node Inlined images, , Graphics workstations, Stylesheets
@cindex Inlined images
@cindex Images
@cindex Movies
@@ -1355,11 +1211,11 @@
sites.} programs are normally used. This is a suite of freeware image
conversion tools. The variable @code{w3-graphic-converter-alist}
controls how each image type is converted. This is an assoc list, keyed
-on the MIME content-type. The @code{car} is the content-type, and the
-@code{cdr} is a string suitable to pass to @code{format}. A %s in this
-string will be replaced with a converter from the ppm image format to an
-XPixmap (or XBitmap, if being run on a monochrome display). By default,
-the Emacs-W3 browser has converters for:
+on the @sc{mime} content-type. The @code{car} is the content-type, and
+the @code{cdr} is a string suitable to pass to @code{format}. A %s in
+this string will be replaced with a converter from the ppm image format
+to an XPixmap (or XBitmap, if being run on a monochrome display). By
+default, the Emacs-W3 browser has converters for:
@enumerate
@item
@@ -1463,19 +1319,19 @@
@node MIME Support, Adding MIME types based on file extensions, , Top
@chapter MIME Support
-MIME is an emerging standard for multimedia mail. It offers a very
+@sc{mime} is an emerging standard for multimedia mail. It offers a very
flexible typing mechanism. The type of a file or message is specified
in two parts, separated by a '/'. The first part is the general
category of the data (text, application, image, etc.). The second part
is the specific type of data (postscript, gif, jpeg, etc.). So
-@samp{text/html} specifies an HTML document, whereas
+@samp{text/html} specifies an @sc{html} document, whereas
@samp{image/x-xwindowdump} specifies an image of an Xwindow taken with
the @file{xwd} program.
-This typing allows much more flexibility in naming files. HTTP/1.0
+This typing allows much more flexibility in naming files. @sc{http}/1.0
servers can now send back content-type headers in response to a request,
-and not have the client second-guess it based on file extensions. HTML
+and not have the client second-guess it based on file extensions. @sc{html}
files can now be named @file{something.gif} (not a great idea, but
possible).
@@ -1495,8 +1351,8 @@
@vindex mm-mime-extensions
For some protocols however, it is still necessary to guess the content
of a file based on the file extension. This type of guess-work should
-only be needed when accessing files via FTP, local file access, or old
-HTTP/0.9 servers.
+only be needed when accessing files via @sc{ftp}, local file access, or old
+@sc{http}/0.9 servers.
Instead of specifying how to view things twice, once based on
content-type and once based on the file extension, it is easier to map
@@ -1512,7 +1368,7 @@
@cindex mime-types file
@findex mm-parse-mimetypes
-Both Mosaic and the NCSA HTTP daemon rely on a separate file for mapping
+Both Mosaic and the NCSA @sc{http} daemon rely on a separate file for mapping
file extensions to MIME types. Instead of having the users of Emacs-W3
duplicate this in lisp, this file can be parsed using the
@code{url-parse-mimetypes} function. This function is called each time
@@ -1535,7 +1391,7 @@
@file{/usr/local/www/conf/mime-types}
@end enumerate
-Each line contains information for one http type. These types resemble
+Each line contains information for one @sc{http} type. These types resemble
MIME types. To add new ones, use subtypes beginning with x-, such as
application/x-myprogram. Lines beginning with # are comment lines, and
suitably ignored. Each line consists of:
@@ -1548,7 +1404,7 @@
@node Specifying Viewers, ,Adding MIME types based on file extensions, MIME Support
@section Specifying Viewers
-Not all files look as they should when parsed as an HTML document
+Not all files look as they should when parsed as an @sc{html} document
(whitespace is stripped, paragraphs are reformatted, and lots of little
changes that make the document look unrecognizable). Files may be
passed to external programs or Emacs Lisp functions to be viewed.
@@ -1562,7 +1418,7 @@
As an alternative, the function @code{mm-add-mailcap-entry} can also be
used from an appropriate hook.@xref{Hooks} This functions takes three
arguments, the major type ("@i{image}"), the minor type ("@i{gif}"), and
-an assoc list of information about the viewer. Please see the URL
+an assoc list of information about the viewer. Please see the @sc{url}
documentation for more specific information on what this assoc list
should look like.
@@ -1601,25 +1457,8 @@
@cindex Export Restrictions
SSL is the @code{Secure Sockets Layer} interface developed by Netscape
Communications @footnote{http://www.netscape.com/}. Emacs-W3 supports
-HTTP transfers over an SSL encrypted channel, if the appropriate files
+@sc{http} transfers over an SSL encrypted channel, if the appropriate files
have been installed.@xref{Installing SSL}
-@item PGP/PEM
-@cindex HTTP/1.0 Authentication
-@cindex Public Key Cryptography
-@cindex Authentication, PGP
-@cindex Authentication, PEM
-@cindex RIPEM
-@cindex Public Key Cryptography
-@cindex PGP
-@cindex Pretty Good Privacy
-@cindex Encryption
-@cindex Security
-@cindex ITAR must die
-@cindex Stupid export restrictions
-@cindex Support your local crypto-anarchist
-@cindex NSA freaks
-A few servers still support this method of authentication, but it has
-been superseded by SSL and Secure-HTTP.@xref{Using PGP/PEM}
@end table
@node Non-Unix Operating Systems, VMS, Security, Top
@@ -1630,8 +1469,7 @@
* VMS:: The wonderful world of VAX|AXP-VMS!
* OS/2:: The next-best thing to Unix.
* MS-DOS:: The wonderful world of MS-DOG!
-* 32-Bit Windows:: Windows NT, Chicago/Windows 95.
-* Amiga:: The Amiga, for those who still love them.
+* Windows:: Windows NT, Chicago/Windows 95.
@end menu
@end ifinfo
@@ -1649,7 +1487,7 @@
@cindex Warp
:: WORK :: OS/2 Specific instructions
-@node MS-DOS, 32-Bit Windows, OS/2, Non-Unix Operating Systems
+@node MS-DOS, Windows, OS/2, Non-Unix Operating Systems
@section MS-DOS
@cindex MS-DOS
@cindex Microsloth
@@ -1657,21 +1495,19 @@
@cindex MS-DOG
:: WORK :: DOS Specific instructions
-@node 32-Bit Windows, Amiga, MS-DOS, Non-Unix Operating Systems
-@section 32-Bit Windows
+@node Windows, Speech Integration , MS-DOS, Non-Unix Operating Systems
+@section Windows
@cindex Windows (32-Bit)
@cindex 32-Bit Windows
@cindex Microsloth
@cindex Windows '95
:: WORK :: 32bit Windows Specific instructions
-@node Amiga, Advanced Features, 32-Bit Windows, Non-Unix Operating Systems
-@section Amiga
-@cindex Amiga
-@cindex Commodore
-:: WORK :: Amiga specific instructions
+@node Speech Integration, Advanced Features, Windows, Top
+@chapter Speech Integration
+:: WORK :: Emacspeak integration
-@node Advanced Features, Style Sheets, Amiga, Top
+@node Advanced Features, Style Sheets, Speech Integration, Top
@chapter Advanced Features
@ifinfo
@@ -1680,7 +1516,7 @@
* Disk Caching:: Improving performance by using a local disk cache
* Interfacing to Mail/News:: How to make VM understand hypertext links
* Debugging HTML:: How to make Emacs-W3 display warnings about invalid
- HTML/HTML+ constructs.
+ @sc{html}/@sc{html}+ constructs.
* Native WAIS Support:: How to make Emacs-W3 understand WAIS links without
using a gateway.
* Rating Links:: How to make Emacs-W3 put an 'interestingness' value
@@ -1730,13 +1566,13 @@
To include a stylesheet into a document, simply use the tags is the stylsheet proper - no HTML parsing is done to
+and tags is the stylsheet proper - no @sc{html} parsing is done to
this data - it is treated similar to an section of text. To
reference an external stylesheet, use the tag.
@example
@end example
-If these two mechanisms are mixed, then the URL is resolved first, and
+If these two mechanisms are mixed, then the @sc{url} is resolved first, and
the contents of the