changeset 90286:5b7d410e31f9

Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-7 Merge from emacs--devo--0 Patches applied: * emacs--devo--0 (patch 4-14) - Update from CVS - Merge from gnus--rel--5.10 * gnus--rel--5.10 (base, patch 1-7) - tag of miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-187 - Update from CVS - Merge from emacs--devo--0 * miles@gnu.org--gnu-2005/gnus--rel--5.10 (patch 187) - Update from CVS
author Miles Bader <miles@gnu.org>
date Wed, 25 Jan 2006 07:10:04 +0000
parents 5251b70632c4 (current diff) e1843613ecb8 (diff)
children 3cd97358d81a
files admin/FOR-RELEASE etc/ChangeLog etc/NEWS etc/TODO lisp/ChangeLog lisp/ChangeLog.10 lisp/battery.el lisp/calc/calc-arith.el lisp/calc/calcalg2.el lisp/calendar/cal-menu.el lisp/calendar/calendar.el lisp/completion.el lisp/cus-edit.el lisp/desktop.el lisp/dired.el lisp/emacs-lisp/find-func.el lisp/faces.el lisp/font-lock.el lisp/gnus/ChangeLog lisp/gnus/gnus-art.el lisp/gnus/mailcap.el lisp/gnus/mm-bodies.el lisp/gnus/mm-decode.el lisp/gnus/mm-uu.el lisp/gnus/mm-view.el lisp/gnus/mml.el lisp/hl-line.el lisp/info.el lisp/isearch.el lisp/log-view.el lisp/mail/rmail.el lisp/mail/rmailout.el lisp/net/tramp-ftp.el lisp/net/tramp-util.el lisp/net/tramp-vc.el lisp/net/tramp.el lisp/net/trampver.el lisp/outline.el lisp/play/doctor.el lisp/progmodes/cpp.el lisp/progmodes/python.el lisp/ses.el lisp/simple.el lisp/startup.el lisp/term/w32-win.el lisp/textmodes/bibtex.el lisp/textmodes/flyspell.el lisp/textmodes/org.el lisp/textmodes/table.el lisp/thumbs.el lisp/vc-rcs.el lisp/vc-sccs.el lispref/ChangeLog lispref/commands.texi lispref/display.texi lispref/elisp.texi lispref/markers.texi lispref/nonascii.texi man/ChangeLog man/cc-mode.texi man/custom.texi man/ebrowse.texi man/files.texi man/killing.texi man/programs.texi man/ses.texi man/text.texi man/tramp.texi man/trampver.texi man/vip.texi man/widget.texi src/.gdbinit src/ChangeLog src/alloc.c src/dired.c src/keyboard.c src/keymap.c src/lread.c src/minibuf.c src/puresize.h src/regex.c src/s/irix6-5.h src/w32.c src/xdisp.c src/xterm.c
diffstat 93 files changed, 2606 insertions(+), 1549 deletions(-) [+]
line wrap: on
line diff
--- a/admin/FOR-RELEASE	Tue Jan 24 02:01:42 2006 +0000
+++ b/admin/FOR-RELEASE	Wed Jan 25 07:10:04 2006 +0000
@@ -50,6 +50,8 @@
 
 * BUGS
 
+** Roland.Winkler@physik.uni-erlangen.de's Dec 3 bug report for align.el.
+
 ** Ronan Keryell's Sep 23 bug about "tramp sudo:: and version control on RCS"
 
 ** TCP server processes do not work on Windows.
--- a/etc/ChangeLog	Tue Jan 24 02:01:42 2006 +0000
+++ b/etc/ChangeLog	Wed Jan 25 07:10:04 2006 +0000
@@ -1,3 +1,17 @@
+2006-01-25  Nick Roberts  <nickrob@snap.net.nz>
+
+	* images/gud/pstar.xpm: Make background transparent.
+
+2006-01-24  Noah Friedman  <friedman@splode.com>
+
+	* emacs-buffer.gdb: Replace all references to `cdr' field of
+	conses with `u.cdr', per change Andreas Schwab 2005-11-15
+	of src/lisp.h.
+
+2006-01-23  Michael Albinus  <michael.albinus@gmx.de>
+
+	* NEWS: tramp can be removed by M-x tramp-unload-tramp.
+
 2006-01-15  Dan Nicolaescu  <dann@ics.uci.edu>
 
 	* e/eterm-color.ti: Re-enable the ri entry. Add kich1.
--- a/etc/NEWS	Tue Jan 24 02:01:42 2006 +0000
+++ b/etc/NEWS	Wed Jan 25 07:10:04 2006 +0000
@@ -1860,6 +1860,9 @@
 
   (setq tramp-default-method "ftp")
 
+Removing Tramp, and re-enabling Ange-FTP, can be achieved by M-x
+tramp-unload-tramp.
+
 ---
 ** The URL package (which had been part of W3) is now part of Emacs.
 
--- a/etc/TODO	Tue Jan 24 02:01:42 2006 +0000
+++ b/etc/TODO	Wed Jan 25 07:10:04 2006 +0000
@@ -9,6 +9,8 @@
 
 * Small but important fixes needed in existing features:
 
+** buffer-offer-save should be a permanent local.
+
 ** revert-buffer should eliminate overlays and the mark.
 
 ** erase-buffer should perhaps disregard read-only properties of text.
@@ -54,6 +56,8 @@
 
 ** The toolbar should show keyboard equivalents in its tooltips.
 
+** Modify allout.el to use overlays, like outline.el.
+
 * Important features:
 
 ** Provide user-friendly ways to list all available font families,
--- a/etc/emacs-buffer.gdb	Tue Jan 24 02:01:42 2006 +0000
+++ b/etc/emacs-buffer.gdb	Wed Jan 25 07:10:04 2006 +0000
@@ -1,9 +1,12 @@
 # emacs-buffer.gdb --- gdb macros for recovering buffers from emacs coredumps
 
-# Copyright (C) 2005 Free Software Foundation, Inc.
+# Copyright (C) 2005, 2006 Free Software Foundation, Inc.
 
 # Maintainer: Noah Friedman <friedman@splode.com>
-# Status: tested with Emacs 22
+# Status: Works with Emacs 22.0.51.1 (prerelease) as of 2006-01-12.
+#         Older cvs snapshots, and released versions, will not work due to
+#         changes in lisp data structures.  But there are older versions of
+#         this gdb script which work with those versions.
 # Created: 2005-04-28
 
 # This file is part of GNU Emacs.
@@ -29,8 +32,8 @@
 # an Emacs coredump; they may not always be file-backed or have a recent
 # autosave.
 #
-# The Emacs executable must have debugging symbols for this to work.  But
-# you never strip Emacs, right?  Right!
+# The Emacs executable must have debugging symbols for this to work.
+# But you never strip Emacs, right?
 #
 # The main commands of interest are `ybuffer-list', `yfile-buffers',
 # `ysave-buffer', and `ybuffer-contents'.  The `y' prefix avoids any
@@ -98,11 +101,11 @@
   while $alist != Qnil
     ygetptr $alist
     set $this  = ((struct Lisp_Cons *) $ptr)->car
-    set $alist = ((struct Lisp_Cons *) $ptr)->cdr
+    set $alist = ((struct Lisp_Cons *) $ptr)->u.cdr
 
     # Vbuffer_alist elts are pairs of the form (name . buffer)
     ygetptr $this
-    set $buf  = ((struct Lisp_Cons *) $ptr)->cdr
+    set $buf  = ((struct Lisp_Cons *) $ptr)->u.cdr
     ygetptr $buf
     set $buf = (struct buffer *) $ptr
 
@@ -150,7 +153,7 @@
   set $alist = Vbuffer_alist
   while ($alist != Qnil && $i > 0)
     ygetptr $alist
-    set $alist = ((struct Lisp_Cons *) $ptr)->cdr
+    set $alist = ((struct Lisp_Cons *) $ptr)->u.cdr
     set $i--
   end
 
@@ -160,7 +163,7 @@
 
   # Get the buffer object
   ygetptr $this
-  set $this = ((struct Lisp_Cons *) $ptr)->cdr
+  set $this = ((struct Lisp_Cons *) $ptr)->u.cdr
 
   ygetptr $this
   set $ycurrent_buffer = (struct buffer *) $ptr
--- a/etc/images/gud/pstar.xpm	Tue Jan 24 02:01:42 2006 +0000
+++ b/etc/images/gud/pstar.xpm	Wed Jan 25 07:10:04 2006 +0000
@@ -1,7 +1,7 @@
 /* XPM */
 static char * pstar_xpm[] = {
 "24 24 2 1",
-" 	c #BDBDBEBEBDBD",
+" 	c None",
 ".	c #000000000000",
 "                        ",
 "                        ",
--- a/etc/orgcard.ps	Tue Jan 24 02:01:42 2006 +0000
+++ b/etc/orgcard.ps	Wed Jan 25 07:10:04 2006 +0000
@@ -10,7 +10,7 @@
 %DVIPSWebPage: (www.radicaleye.com)
 %DVIPSCommandLine: dvips -t landscape -o orgcard.ps orgcard.dvi
 %DVIPSParameters: dpi=600, compressed
-%DVIPSSource:  TeX output 2006.01.13:1223
+%DVIPSSource:  TeX output 2006.01.20:1449
 %%BeginProcSet: texc.pro
 %!
 /TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S
@@ -352,210 +352,204 @@
 CCBD1F58ABBF1F53AD21E3BFF25EEEB046F66A924E5F431EBD7228050BE2DF43
 0B9B538DAAD511EED97630CD9A9C05CC49DC251325A93EA842C6D07B44BE620F
 08E66B611F54314B0177E299304F2294F8DEDE9914736944F125A50B5007373E
-588AD80D9983CE7824DA30CEE5DC3114D69D7ACEC0758D8201805B82925EF3C2
-C87A1A169C5ADE44B561EC1660E617FB39D1B1547B33C0FEB33C3A1D7340A62A
-CD9CEFA49481F19B39A704A53A0B98A11744143CDDA0E668E6325935C6497A9F
-AFF471194932AFECBF25B441AD55A43751FBAB76F3E544C4254AEC4BEB5CFE4C
-C1318C3A0FAD0E8C1BABEE20B203E1DD9412E66BC55BEBD6FBBEBA84F56604FD
-85D50F733D9794611F4137EC10ACB4C4ECA5A81CAACC45213E92ED3C26726BBE
-91430E7633A2BDB8EA3D0C55259D7DBE468AC0964A63728C9B8EA4E15CF0EEA3
-2E754B9170EAE6B8818DCCDDAD643B9F6C91C3C5B245CD442358C60AF390DC76
-342E659D4EC45552626F069F346F46B18062CE26D5912336C6B29FCBFA5C3113
-ED86E44B529CD95B7B5B934D899762C4F3457F56ACCC763BCCD5BD08975EB5F1
-C5216DA4CBF3409EC71054B0145183F7DFB31517D199EB16D4C6DB0AF05E5720
-10B06F395BE3C8C59CEEBCEA1E00F9EA3FD880AC197508CEC11E33B6B6EABE3C
-0FAEBF246743F62D280875D052656696AA88DABB918F79279A980754F3DCFBEF
-7999E7FB7C9E7F88CB15E1596F08E48FA74F1CB613B587BFE72717437E38D08A
-C8B160982A6F92CD0BAD7E033766BB1D92F78F22FE5750D002AB2C7A101A57D6
-3E7ABA9BD4B8C0A4F2820123BBCCD520B9608AFD4372366D876F848ED068245B
-6BC1DDF4B826E4A9FEC4390CEB2DAAA63D9D013B706059347709F3E996C3682A
-F88D827B8B7E1206BF2B2A394AFB00B1207819DAE82D1132989702B219E4EA71
-A2BD6EDA183C552C874DBD142E826B583311784EEBFBE96D3716E0DA9C4B1CD1
-C7D649FE269C801411290846EB69BECFA24AACFE8895AC574ED538951B84CDBE
-4D935C15DADFFD2179C53655CE2728B017DCBAA14D7B7140AA7B42492E7C568A
-C718B186FE248F58148FBEAC7CF56A67E1B7CF6E5A3D6B5675AA8005BDD71A6F
-40B90E5B304E43F0BCBAE31238B09B65AA17F09B0CEB3A609156CF83E92AB27B
-BD1E80DCCF305D627821FB110676D0BA0F02790A51804686143AB72EAB98AAC7
-CB4E052BC8A19362655F0DD0AC4B8578BB227830D9D713116725A3BB05CB2F84
-9A84884D80116E47E5FA2802EBE7439A8484A9FF18A5F5838731C6C55EF3B749
-ECEDADC2671F81A2787323E372AC20D3E02849D3096C64EB86393B374DB0DFBC
-393E9F0364F58CF81BC788C7B779BA0ED32A26389CBDE9E5A96E79D014C0B5F2
-D57F9B968ED9FE793AA0E1A02432E1A5075947D96909DC06A06C467CB86F428B
-BCFB5149725BAFAD34F733692AD90AFCE2B3A9281CEBDE9EFD67DA0A79BC0AA6
-E6C47F2FD4E8698109A28915DAA6CBA5FCBD52EAEAC8087796A4309EBCFB2DE6
-295ED1CE5C51255C05F9258F958E9F7A7A5AD52F8D9715B99CC3CDD77A5212FD
-BFAC311D3E5699D5D5BAD6DE8C425B118D9636F4AD4EEA8FBA4BDF3B15C2A939
-926162F94D522B0990E7204BF3A81E3E72C9A80D7688BA28DEE8F88155F8CB15
-02EF6C6BD3C9A961B591DC80C24CE9E9BE24254911D558534A7B4AE0CEB01487
-B6451320B37891175CAE2F534828978831AFC6846CDF9A2B86FC209A5DC8983B
-1A6B5BD7D9D33AAF2D7340ACACD7E03CB238D0366E83852B2BBE428063A4FCEF
-B6E48332E6633F790971A587A3F038A256D181B5584691A9405732D33A2F55FE
-8BD68E07E6E01A27FC74BCC9946204A478D13C51490E9D76C4EE375190026156
-FD879EBC0A579DBCB69058B252735F3A864B0C42B7555ADD028DCB937087EE86
-7108667781A85ED8A09260BE52B90B1BB8B6A268169D09AFEFD0C58085ED5550
-58866429B1FFB47465BB91C94DD392DF00A1900E021990C23952430AAC50E079
-5685C686685BB26743FCE9E9ED88D3A523AA10E4317703BF7EA74C15B3ECD49E
-33216F52B45B23195E133522498B357511593C41D45660503B93A02FE7DFA71B
-51FC7E10E28F60367293388C4D143F49AADD411685A9BF60B6D544E32B8C0902
-8ECA67229D25B79A56639B67A4E40B8A2CEE1B92CEC3121F869520F469BBEA38
-B6E631B249E53EB6A8A886ED97E5C09372B31F724F165A5BEE9385CF89FEFCF9
-F6CD28226E6D60A32A6C2ECFF8E473F816F6CC1A90C1783A3E6303B99B11959B
-510B684B9257617EFBE7DB72BAF6F5756B22110B675CE11A2A88148DE330AD84
-C8DBF2C79BB6D2199F42677B85F30C0D6885B0A316B1E53CFB32675179AA088A
-45995F1A1D323CF8BDB3E769B851F5BFB6C619CA74CEFE9650F58C96EC512385
-F7A8C8B0CA55F030B7CEB6A7CF577A544744B62424A403A69A4BB6C5EA42375B
-DDFD2D1D74FFE633474D4ABA14C24EB7F44BB6E69F759E23FF799E07733E4C7A
-F142DD6563A83DB58E7FA1BB7BA82776441875E6B0D44801762E3CA70C8B738A
-2B52E48BEC09C29544B6D24513708C7C86AEA3BB56AD0675CBB8CD6E41AD01E4
-DD6F54B5D6CC95AEB2D7D4C1C45D6274DD3FD7449982BDB5609BD3ADB64A73C4
-6F9C5897CFF003130758DB267EB173CF4DBF412C3F69012675FDCA9A8E8D2353
-5C272A4843F249A8CA0E03CB00B503AEB6C1BEC84B87420520EAD65AC7FEF5B9
-0489D803DCCB72AD4F7875335165467D04BDA6CACADBAF5A8BB8B26C153A491D
-AFDBD9695BDA29BC2FEEB2849CEE6F4C22FE5C40044105ED2288FE0C96865CF4
-093D21C3A6930538DD2ADBFCDF61072F55156267A7069A0E3025090B2CEB4C7D
-9303AC8A31EE3274BAFCF6A1A069D506D4DCE7051C33292C8087DAE14E1D0A9F
-40293446B6C01DB83E64E57705AF674684C1BE9527F8B4E242B3CAF61C77E3E4
-AB8EF5BC4CCDEFBBFDA737A7931354DB5AB2A94EBF0EF06E535F03CEC3CA2F2A
-568426AFB6B49CB5AB4D5571C9BDA39649E652B44A6A2B140B4E33639ED32A6A
-ECDBDCD764AE3428091516C10F4F350A801452AE6BB44D990640AB2A54976F26
-13780C2757C57691D4F47B2538C532F5769ED5CC1BCD4A9285209B7306109F0F
-C864E491D5F0FBEE125BF87807951FBA44D152F99FDB9B79A927AD91C423AEF4
-1E7AD1BB32D54808200E350F0F75B2C74574B6A752F3227B2005D768299C755F
-07A94926A42A5806B21C44A01983B93B2AF6C916693939A8E917E4CE81A8B007
-9475395D9E2D4696D216AB1D23F022DEFDCF1B31CB06045BA1A7545F921F1088
-B863CD5848A20DEDD289A2D7B05AD6DD68F9FF8F2C4D9145042A1CD985DC1E4E
-C2F6C2446DE2E7DD577E3E4378DD6180F79444A7DC8A3FAC02970E2009484816
-1E88FB6188486646B178C7119CA520CCA3503481D895D23D73B5598130AF4FF5
-5E6ECC3EA740B1030BE7CB8343FB90E0FF74D76FE27AE3B799BE36103748518C
-6CDB243CE716A0CF5FAC0A5F18E2328EC5190B4B00D14A9D71E135E5A13B7DA2
-476FE03E36B5B56E0B561CA963B25CA77DCEAE2952FA2D1EC8CB7DCCD4DA7A35
-485550BD92A50948436E12DD1FB75003B4B851DC45E41A2461FCD300A2811430
-57EFC3E99C44FB0DD0BAD0B7BA4F97E1B752731C02FAB1CD9038F63A358ED8A2
-5BB20E431A2A41731F167962426AA59FC40F87C820F3990557147A24CB69579D
-ED6E60D5EC6FEDEBBECC5BA12B07D4F72C47D306AE8194791D2EAF9A65457ECF
-63C187646D3A224B810CE2D1BB39FB02FDC1011C1840CB1632B9850E1C562CD1
-11F9456D74E001D63E3D5FC3E43B7F063089A5647A9021DD30D44E63933A5F1B
-607A9BBD0F40DCEC2AEC59D2C408E0BBB369BA8B9893F44A6DC0485EFA64C339
-352CA32A841600C551C528EF69319293CEF00DE4E2481C98FEAED5E3232F316B
-564446846604D48232DC65D721F780D0A11154DC5A305366F729782EFFE96B1E
-FFF2D987570DB27A22F3322108CF43AD05CF27052FE2B9E964CF01CF5F0B8E19
-6E024C1557959972FC95341E057E1659850B20F565FC0EA76C2ADC7FDEBE4F2E
-D4E9001F81BB6A4B8F7351831FF0D5EFB01B298C7E24B2FB493B1BF54875AC38
-8D80014166113412DECE47EFBBE682078A1B5E05A6FB2BB3E93364BDB3DB352F
-781773B3E905AB5C5AC04D8111E9AAB5A213CE077435090CFB6DDCB3EC0A4DD2
-F9F946E2EB070E75C0512664014B4E090188526C471DA6F83BBEF74FE52D5597
-063400F44E7016615D743E90F10B54336BEF61F5234B1DF4860A4A4074A96263
-6854BD1E4AF82CB7D7A8DC04E4FB6C34557C9BA80C8743EF343C404228D71DE0
-E5A5A519D3BF01A08A967DCCF44ED06A889FE2107A3DA114E941621D2CB3E8A5
-F4E3DA4B76C3D1BAF6A5CDDBC8513AAFF9F1D22E7DF630EBB82116A075F890F9
-BF73E9777D380CF92C9B1762FA23407E03DD26642FADB9C85944D0E15CA82FDD
-5638C26B10B9B94E74DD979BF5A6B6C0AC54C94C6E6716246612627CE4DA4C17
-3AE7772E2B93562AEFB3184A7A9F866FA10901DA58E3BEB70831FC9C1C886EE4
-9DDF0D69B286EB138EE735A382BF96D9B7EC33546F2C788128A3B1ED4CD2AC7D
-76C5F3B82DCAFB8AB073256A7F98C1530BE8C94FF9213FDCA56ADC17E6F56552
-87D1313366EE7CCC237857C93401628B7A0F4704720FD4966F16AFA4A764358E
-EB0AD53B9C8104070E2D23E9AB793E9F67A2313DC6622213DD8E32FF245C6214
-FC6D5021A48367398061976699FA83F0FE81854D55204CE03258CB6333231FD5
-8852B52D255EFA8F6D6527D7F1C900C991026DDEF6E79B74921BB404D4F1410B
-9D2950BA20EF04FC230CA4E8D6E703F63F3A8207BDCC5D1E9BADF8C6D9E2283C
-A9D500BEF4E00A29D1005B2D5E80C60EE5B35CB347DA7B7973692F41BA6B4C5B
-16E0A6B2B96CAE2BB0AC882FFA9DB50247804437B19B05EC3249A8F6C19D1E58
-4729BBE4925537B69F58ED323A77A860E8ED78D3C4E86C45F8F427EFF375E618
-E4FDBB7CFF3A4E2C9C37EA3004AC75BA08FB2D116455267F37D817AF272C4CF9
-A3DB2C3F683E088B4B743220BEB2106E18D8BD9DBFFC1DB72430AD9F641AD4E1
-5ACE49F9114948A9C8B48055C969711F3EB2B7F725E6441C7A86E1F0C4E53958
-947F12FEE137D5611395B5D4AF05F55BFD8B5D9620580749CC37DD096E7871E3
-B2009A73FE91BC2E23CAC6F815038CBFC911A4B400A30BBE38A7622F51BDA1AF
-893065EAC1AE86A73F22A6E282ED1B46B35CA484748BDEE6C056FF6263920E85
-EF4A82D8CB9F9BA7D20B11E928EAE18971183438BBAD0041D3A843F019E23173
-3B13DF0B9D24C86693AAA4CDB5FA11C5BAA449F68AE47DDEFB80E99F59B8E7E8
-0E8A083E0BBAAB211CF82B37B92B2513FAD2E847FDA67C25305610BB86008BF5
-30D2BBC717E071B373EB848AA0E871A0C09C9488F744AE6A46F3BE82106508FC
-50C748514FE65F96F52FA865CA60C831A0F4C11E1C500C6C6113EEDC75AD2051
-67E4DB9A5B1555F9614B6C0C3D1B12DB6194BE578E985E53679C66AAEDD60C68
-0E3AC42E06CC5AEF1167DB0002D79973AAFAE17B083ACD5CF95F661054525867
-FEE6E96EBB0FB243371CDB940534214E9C6EB160A18EAD2ADBFBA1CDC709845D
-FE9DF2ABB313BD9809DC40FE278A7FAA6C61B7E3DBF96EEE2C7F17F20581362C
-E9EEE3D4E7B3057509F5498AFF226AC267CDD6EFBE12F4573301D4535D0C2AAC
-C82FDD61E39357478A30431CFC9040FE2BFE4509DA82C54241307E5EB39BB22C
-D604C6091038278EB66053EDAAF62DFBA92946772C64A12D814D907563C30D50
-5924AD6C0F10DD0F721B91AE8B9654FB5B86375DA94D595AD1999CD46C94E3E1
-F1DBADA3287C010DBCC163FC68D3584E1067ECD33CBF6C231E27B27BF89548F1
-71DE0EDBD2AC2AAEF09A56461F30C2286BF98A49AEE50B9DE275D8D04CAAE61D
-3BC5688432C09BBF7673D72D308172D9F04101966E9231A2A19C92DAA8BD21DC
-B88284250523E122A154CC8072271F53EE8F4EE562AD06C10D0F5BF0C635DE44
-D198EB6B947B7DC15465F08C5CA3466339B6FA18F7B95708A9BCF8AB81D1F9C5
-570EDF54B50D657A89415719D03B15D582DD66D5FBF26449E4D26DC46ED4F454
-9081D0DB9B054D69874E868E3810D1696D5E381AA4D788154E21B0D28CF90CB7
-AE0BE0D6F5E62A82BEE840DB125672C93BBCC46632765684444E0FE4B2BEC283
-D5075E0E5A34D26250B128F5AB178D11BE1BA8E561276BF49FA3B58C02BF5DB5
-0A505D1F8815F6C7BB7F4774A97B114E89F222A08E5EB8676A320728CD2826C0
-EA8816874C355C40D0AED9D1CFFACB1501C592678E3C111D94E3F7189CE094AD
-B9DFDBB44AA289349CFD2A9993BDDF072B7A3EDAE60531C593453575D9742CED
-FF2ECF2B12CD59CA4FD7952462303F6081D0232084DA9DB8A4693FD2D3AAFE7D
-A2A61015F67FF76683FA6EC38B25198EED132AC393394129BCF0AF0E6F048A09
-E5E5D074B2B1C49F9B86DFDD559F243F270A6190816D4E86A11E1BECE43C0E7A
-1BB7E691DC79DB786617EE61B907E4A8DD71BF94B4F032229CB18E1A4A803B38
-D9943851ACA9B591416E20975B8EB628BF751CFC42F929AF5D04813EF388DA71
-B23B0AFA8BE1A9B36A19681DD00FEEA84AA6D65CBD7990877D1A4119051B81F3
-6350A67EF0DFB24F5890D539B63EA6DE95C5583A8320B3924934F9A68C1BF5D3
-6FD4FB3EB40AEAE4B3E85A382AF9735FE1AAE7FC6B66FCB1E33D04E7A89F35E4
-5D855A455541209543EE482D0ABAAF77D76E4F2278AD4A59EBEB2C921E83C28E
-38F7BDA6500188BCC8E7B4BDE917FD343B5DC6E74994D8A9332EA7622335BF9D
-2CB069AFBAA4E01ECDC4D5DB0B34337A12B6168DD40FAF8801A17BF219A63938
-4779A96B9A7F1E670531956F374C727DD893CDD06C3EBBC48AA8C7FCE062C19E
-6DFF6F14DCB27EE097771E83AC8CCA0BB363FC98ED29DDA10459E5AAD3BC1415
-651C347A04466E35C1B3744ADC671C461120D2359C4DBFD0D243555D9B182CFD
-189022DED77374687BA5758C88FC19E3A6149E526E11E87A9CAD9B19CB47E00D
-70CB4E4B0172AA46DDF138EF9A4A94D7B59252D9E8E170CDB048BB7CA28F4538
-CC3A0B72913DD82E327A3A62E7EE1E950976E5228BAADEA7A1C761175556FA84
-FAFAFA55C9A9A5F9F2340FDB199105E4CCA0CF364099EB3227BC0A8AA7189DFE
-3CEF5E1B68EBFFA7D8E603A3414CBC37D5E5A1261F66E5B739D6BA2F52877435
-FEB61C789D6CC48482A28679707F9C8E0073B75072B9E10AE09FAA28184A8C00
-66FE6FECC229635097E1E5A8DDF889AC85F6AA555C433A0C7E7A73D2F683D887
-45225F82587B6EDC9F24A18C24699ED304E05F7B0A5C5F20A6DB61EC2F8EE502
-814CBB41B0481B3BBAC69AA4B4F6A251B41B5ECD0F04E9C256813DAF5374D9D1
-8A5057894B93A1F5A9BBC56E63EC2B11B09818D20E984D37943047E7F010FA87
-74E4918D3E56679FF00FDC1D94B0C52206B4D570FA3CAC26FCF17FE89D73DA9E
-7AAFE36245EDD811F91D9E83C96704CFE68A29778677A6C02820EF9B09D471F6
-D03191013A6334CDA003270C92CE05DE4B6194BACBFE4CBB80FF15D9A31A4DF9
-82BC8BFCFCA725B26874D1B26456F6FE83216F677210469963DC5683DB7BBFAC
-ED2DE1ACAC4AB4E24195E19C447EB4744E5026326EEC560DEF375749AEE07A4E
-78C8FAFB5056731503FBC10F47FB37D49F3855582FDB5F8D1B204AEE50D11458
-CF253A7D990A84F4C89295C72AF21FCEDCA1C0CEAAED6B1DE83FD59573A2A566
-16C90BE27AF719832E6E5A98E9BE7DC65108AD80F40B52EFCEC672D1D94E299E
-8EC5DAE81EF454BDE9184A00F5F8BB51BF564603214B23D41C026BD751308706
-3BD8678F5794641193D38F99EFC088E5C9B5639374951D050D19CB54BDA58EAF
-636DD6C8B5664EC1529C2E964DB260652DB183CE0887450F1AEDA8D9575C5B32
-EBCB5F71C9C1DBD6341AD5AC442220026A32805085E0BFCAC682C09483AF5CD9
-47ABE381D20A2F905E533D297BDF5AF066A7925DE0223321DAC4C282C79E1856
-3090310656A17D312F7BB259742B7549A27DB6CEDD2803794642BA7C78EC96DD
-A8DD2E13E16E81512FF2AD34F123EAC904FE853780C2400234D36FB8ABB07319
-0D46D294513300E318D23766FAB236ECFE7A93705FBC960341AA7E2163DC9D81
-5E2A578EB0FDD05E41885E6A5D88A946025B27767CF4F495A787592F0235D22D
-9923308AADB018D6ED705F29B38EAEB3473BC53BB341DDA4C1D62F5CAD1C22AF
-192338BAD441B3B7616D78B717920C005EBBC853612A0A7E41426DD96194BC2C
-3ECD5784183D76AADF3EDE1828165A3A5B8D864CA7DF794C80C40E766C3A6410
-20DAC3B63B9BC698487D7E1AAC34F10E0799636C45AC6AA60B4CCBF9979D67B0
-F2EBF45561323648A125BDFD4E34B23E9C63CEEF8723A50D35C9DA31F829113B
-B3F4E2C999B1A31865E09A9279B006ECDB6613894A2509C19D6AE205BD7E9315
-0D973B8E82227C6499A9FFF9AF0F5282812EA44B1BCED229D17590713A2DA5AD
-30C6C6BDD8D321B17CAC678FE0ED8951B6CFE4AE7FB2FE96594A5086DD767696
-CA6DE0CC91DE3A68CE8EDEDE33E4B49E5E0E3B6AD558E7585BD5A1AE4F1D16C3
-202F267953CD390FF26200E172CB890782E0C43B51C95C55EFA95DA98CF4CA5A
-B189838F3832ADF48D8AEB00909D5C07587B26F63BA03A13B0345E9B99E7B1D0
-47427A74353825472C5AB49DD95A90D253CEB066C49D6A4356E072DF5BBF394F
-3FA04F54C4A822DFC7FF45AA337B9006BA63DF5D6AFCC7870B2D1AB4A954DB76
-C5B93562408402578D610DD64A09ED30D71D9341F1CFB44922F42DCDACFEE2FE
-B8E0EA576DC60840FC3269FF313FEBC57C5D958016C859D2D80BB270E6E93738
-D314BFD28BDACD48697001CF13E9B29D1D1C5785ECF6040F43DA204FD29A924C
-E32C8A2AA8ED8BA00C16D46A4EED8CCE9AF13393E8FB6F5FFFEC3A421105F8AD
-FF596DA77FAC7567745BFCAAEDE63F080F24AC62A05DD8934D616D1B6A336AE9
-B1ACE43ACBB79549204AC02B7F4ADA2B29E8B081EE02152C7778954F9F61FB67
-6014CF4FFAA5A446334847DBFD348DF16BFFA90B0A8D5E76721E62CC46903CE4
-4C076460459EE651504D119F10D5D046FBF7BCAA97E7D0CCD822A6D442B9BC8B
-9EA43A5BC643998A7FE6C97C967B3AEF0019270BEB8EAB12F396CB363D43F70D
-7AA971F68B33F1158663FA39DD34934884F5DE842F
+588AD80D9983CE7824DA30CEE5DC3114D69D7ACEC0758D8201805B82925EF3C1
+3A6757674B84D9B585F981DDFFB42163EADF90346248E014A74E3FB3E6276FC1
+B4289FCDB4FDBE9C70CAF38E410965A3610F649DF8F81C73B87FBE27D44A3CA6
+D7883821CA22795E3EED184F4F59AC687AC06DC4DE7FD098E0EA61C494A5E960
+643D78025B1D18B4B7FBACCE2DEA453E35C08A6AC093F45FA0B1DE132F743CBA
+75F2E7BE0311132C0E63C69D5182B98AEFC610F61D1E1EA51120D8A9F5DFFA8C
+37C0ECCA2120E1DF7A551343BD7573FA24144A8D59CA684FF9FCC1E023A3401E
+9797D658E92CED2255A273E429FAF43B0355E27EC83974BA4675520B2DC70DDA
+DF783452C679BB77759479CB02FF3377BCCD8580E3D87D34CD579AA3F89AAB44
+E526EE761B0D371E27B5A02A5C494C5169651FA79795D332045B3E7F2CA100FA
+FA8ADA74DCA851DA1BC7531E58EE08FC22F2F35E94D5DA013A4C9669B2825D26
+021982566B4347E518E82602B0CE5CBA1CD38E8B3CEBBFDF9E9811C896313F37
+51D5F7162441E4B2DF18A7A34326114950BE85B3E5AB465D54652575AAC03DF3
+E50E9FE8D184D33534E12AB92DF20BD72DC129A86CCC24981FF82E297D0B0F9E
+0B66137443B501B5FA711C7DF380DB1F64404DA241D1EF5F2D012A0293405302
+F828BF879F46962DFAF75F44D4A394DB9D42E4874477097FF6F8DB9BC8712BC8
+661A95A2467073355FE697CBE1D8E298569935E5405C22555C40DB775A808F54
+642939D8E4F76C61B2FE966F4FB55319873127C8EEB05732A1538FE03EC2D8CB
+9089DE328A396DAB3908179FEA2FC3F2ECC48593049FD23114A04B474FF4FBED
+4D3B8835148CCB742574F4914B7201CE41A57A42EF61099509E5C42B744611C2
+B40581A6BCF6FA223E5B5221B8BB16AC6EEE3774130E121F23A04E1548F58899
+41C9DD31E720AE7392E4E2CE0ED4B691620CDB0228D3BEE1F4BA6E289E33B7A5
+6DFDA767F5927F00BD22D4BA6397B37BBDE84BF9017C01DD5319AC7D33F8C007
+AF43EF247FDF67CE6627D4A0B0F00A3E58DF6323BDF1100660FF18496649C2EE
+6BF1D9940404E2E4B7BB00C807808BACEFF0581E38B9A7F03888BA67E73E002F
+871DA37277AB6ED4FB27AF66B9A02C62313495E94113D667CB3FA94DE087C6FA
+2481136385B557165CDEA492CE335DB20BFAFE7A3015C95D8C88F6F3065D7F72
+5484F8B665295CAF3E207C758FD9533889D7EE5E16D08577A97185871BAB4CFE
+CC58C88B3B0BA4130727C2800D2C305855369729B8CD09AFF83FFFCC3A85014E
+7358281AD0C842CC1FB985DB59470AE90BE27190DE79134F2C18447150A6706F
+5597A256370F4EFCDF59A7EA8C9BFA2A194DC5F1975D7E875F036BBA686FDC22
+8E9934A3ECE619598C0CD24B3226D55BDC6BF23ED4659DE24072454622A47FC1
+ECDF8D1B202F9178BC1075A4AD29D85545F9C08E16F5BC07C7218FE4C8914D89
+BC259609E90B47B956DE309C40E2943ED6CD471A8506FD38066AB96F573E7922
+B77B4386FDFBB8AC7154342C810D452827169AB8FDB73F50AB7EB6E38A930807
+F91212373CDDBE84FFF86ABAFBAE766F519D1DA26404D7EDFFA803DCB8382EFE
+DA1C3D22D195805069C848619646B126333D0605BD76497030E0D3E32EFFAD65
+F84003741FCCC4DFF67CA124B41DA9F0CAD27A1A46E38DA588B443C4301216DA
+5DA7A473F9C5F04B2B47446168A2017136ABFA92F6EE9C5DA2B1A92CE664659A
+027899D7BE0B322ACC0EF38EA681B4D90F5073C4B4064F8053AC54ABC1594883
+E4D836FD382F00043D97ECE2DEDDFE704F10CC450E4451679E373041B9814AF1
+0D2FE34CC22F7938562B506BC63C03AC904943C4CDCEE5D25F9B65816561962A
+68EC20E9BD6E4964226F8C64DC410AEE5DF5F607ACC023BB583D471EAD0B8190
+912DC0D8BFFA623F944AA1AB0BB1545DFBA26229F161201DADB7E07FBFA9040F
+5D6D30EBAF57A2EF4A82A30D67825A35E24F350F9F700B42BC926ADF418F6375
+A7C7AE27FF720E9A71817E395F33E8341B70DEF491B6C4AE4051D825B09535D3
+4A0E7B0853CC42956A0A2F1A7421FEBB020D1F178371271DA9893AA2082DED36
+F834704E1CDCACEEC30EFC5514FA218E88E8C9EBD5814124D637221AE0D898D1
+2EFDDF9296D8AD971873D821B5E972F89E24659DADC4D82EE284F6247933EBD6
+643E846894BF9F2A272965E7D3E1466C1AD086099C214CD475F5191FFA282F92
+6EE857FE6AFDD3FF7664E82E0E265CD5487389254F38042EBB5F9866C5B24154
+DA003C177D7E9384E8426D7B88D5701AE7C530A50F6D027904C041F690143008
+D6246306E4644AED88E76F83949352CE1329B1A5D07A1FDA04DA0BBE5F30A925
+740235EAC5DD32F81545836873EC429AD95E7F56BFE4DF70399A7AD2476EF29E
+45517385D898071118D2DE56D7A2294CB12D3E22EA35234E752DF7F061A5FF8F
+5765C7C13FC74144738679B42351E3B82CA2C91F619B5D06C1FD36661F4397B0
+7540457CCB3D2FB735BBD9ADAA24756DAD45CD5921AAB588DCC80103E1C50290
+204EC4F7F5DF74D8CFF0EEA530CA2D0E88C86431F22062276E9BF9BD68FB8517
+7245261F180FEB9CD574A82A17B8A134BBBDC9B5B7954831DCFA68E0B4266C6C
+F99588BF404005CE59C53E94B767B9EFDC1E5674970D097CC221C0C3BC825F17
+62D9F00A1B46B915BC8F0BF7AB31B3F688C9C968F516FC3DEEB149981EED2A47
+C51C8E8CA61F1744B31F483A52ECBE76606F24D90B13569A546420032EAE0F29
+0A564955B4BE1058A9E6EA3B320A15282EE2449E928C8E405BF3FECE131B30E3
+77FC3A735A6E2242C1E4A27793A0E1BB63FF7F6958E5312FE1549DDDD8E15BD1
+7BB07C6564D029C830B89880B4F49207C1602EE590898896EC49BE45DA8906B7
+380D59CE86D7AAB6B0762F624C88D886488B7F6AE9F1328FC400869CE4EEFD7E
+7BF55C3DFD059FA20338C9BB33D807236EA2EF6E1C0C1E9EB095DA69FE2831FA
+4A0F750418D935F1F0E45AECAA61ADE9D96012511981710FC4225F5C7660A2F7
+0A417E5910F4F05D43E8AE0872B16F4E46554848927F59BDA1EBC5724ACA6B1B
+6A62FA03E86D85104E88ADCBD253734F9D078543E3A9F1985FA4D4A77DF2C55C
+6F5E9257851A953F1BEF7192B89A409B5566AAC7DDA66F6DE4D89FDF39994611
+5B95857B8B6362BAEA1C939F638E527CA9F58683236B1886E5763B518D5A9F50
+012A1D991AECF0E327594A12476A68C715130D197C1EE81CEEB4DE9E05F7F4EB
+0F06054BA90F9CC30C27BE06803ADBE520115F0FB8BA26B0DA1E5A8D28F1CB00
+F7808BD2B0D629A0BE002C11FEAD0A59555E90851E47D466BD87069845B2A6E8
+53E054711A465359DAF057550B8EE9F11F8CA6DEFE6FA70FCAC9856ED992244D
+B6D8DF2428F1D09C54C41F54F939DB26081DC63D0E8AC0690E72E76EF2F004B3
+7204E227BD70421CE589A5689FA540C2889BE8B9841193BC020FC07B7B245580
+996EB478FDB9C2F3F7CF02CAFAF3005F12CC496EA254D56F4A26D841E31B2360
+8A1716DBC1A0312F66A2B19A55399BFD9D80DF17982829C3A5F790634FD86DAB
+542413C0E19CC1F40FBFB296DCF1DAD4135F688AE11C2A5896EF0C8A54F298B8
+B9C21D82E15BE4B03C7F4D0D6861F28E86D25D98292D7C7C38EE483C2D6AE68F
+5CC883C30B92FFDE6D60FD21E9E0E3441C317EE946448D26F8D169A074C92CD7
+D2FE4ADA122D99FDBACEC5D884F728266B21A6B5974B74A21884CC847747F648
+1CF5A52ADB32B3CA4DF108D086734E7F57E2DD6800F22D73F1A579B06EBE6F81
+BD6DBEFF758FC63934F89E8CCE37101AC52AE651F3BD8BC6689297E04D740F6D
+56543897EFD747491B65582F6C2896FF3C8521E6948745BA255720AD93C36766
+5669C5C91E00A093608D3376F3107F2536046299BEFE221929CE0414E50D8054
+F07AA336F93C01F28FFF407F6B726155F48F339D97E10D628DE2D5E0A2ECF9AC
+6E17695CFBEC59A0EAF50110EDE388579FE3C3EEC98A1F0414F2EC9D3A1612E2
+849A21EB33FFED0B4A753D44B6CCF61D7DA8603513059E5A5523D2FE01D2E970
+EFC7152105BB94A40C08792A75D94EF8333B6A392C51F6FF1BE5904B5877B655
+28E17551A83463B9DD6D6B2F419BD21119B7A9D14325311066AC1A20DB8986C5
+4DB51E16782B5AE654F4C0C9A92C5A1555FB54B1B7E70DADF9A303514E7F7E7B
+E99C885DF161FA302CF928BC04535666D5508D2E01514B2DC740E3715BFD603C
+D1CEF587FA9AF69D6D8019A2DF5DC33D61F1D324037A06563AE6985CA5DE4C61
+28663AAF1815F8F0B1266C2EDF1A3322FF108170DFCBC13DF794B6A4E64D7202
+E4200951568C73DCF0F2153D724DBC35F1EDA6B31FBF8E1E35C6781A47D1899C
+5710361657554359A7B07794967936966E29765A4E2B4741165EABA8A0ED123D
+13B77EA9CAFD065B3DF2967F1FC142B0435583E6D221FD15307C8A388E2CD9F2
+F7012BC7BF2D910F639F60F55508AF5A479FA963E7AA049F23A1D8EC24A90BAF
+3537A956F8F16D2242300ADCAFE145B44F89DD449B2AE64F41BB4F92DD45F6C3
+CC091487708BD252CDF835D511714F4B51749BBD34A5D812700EFBDF072A40BD
+6CE38DFC9A196589D6FC09FCCBCB7CA871FCC35B25354537B959F01E84C1F959
+9E8397B308A3BCCDFA304213116594C3D1925A815B57AA7C631773B5FD518EF6
+238F548ABA462BC1D0A17E76B53CCB2BBF7E8A785620B41C8018109CB45CE895
+BDAD0F89B25B81E4A0478D4A242D3A7A4406D932C0E9FD28E65C57CC3F146E1F
+09867E0FCE83F7C2083ADDA5C5A9FB5BF48F89DA0C4BBD45E7120016314098B4
+C6D2C37F5F7709AD5822EAC452FBA28CFEB01E3BF2DAF25C1B559F07152FAEFD
+96641B74A4249E88962604CC67F39881A685491DA88705585A7EAA097A2688CB
+FC4A8E722D560B2442B3E7EB02F34E30A8A049705DC0C1D181438E85EE53C3D9
+EB5A320A83315AD4B4D26443754B49EA70A16FFCCF753F7B1E6C7EEAD9F7ED75
+7005A52BAC977F57287B77DA642B1467B580E481D97938D1B57519B1970351E6
+A752CE77704369B0E3FA910874DC76415AD1FB4E605F0C806A1A044F300C859C
+9A76CFCF2B65CA446AC2CAFF3D9148D662EB88B39D854A4A799DEBB1BF06F120
+D0DF95A54D183ABB65041EBEB986A132B2543EF98EE749F8976279A5448CD151
+896074E5140A766A0A9E95B73C737D09FB6DE3EF8E85B87F477935A04476B0E8
+50CE7A918AB5DEB38BFB8525587CC5B6759CD3C82C2623F628C116A40D3B2AB1
+AEC0D515C14191760DFDAC3BC2154A356211A12A7EE704096F258C66F786311C
+03E84B5C05C311B04F1BCBF61FA40B6BB8E2E080B42178F225F37CC1A96CDCC0
+4ACD792C9F0AC7E7E3992238C0E4E88B04A93797E17ACBF04FCE6494299AA9B0
+37A73C4059FFBC949ADDBC0AF181B728AC3369CC6DCE58F7AC4A52A686B74C08
+56C30D0BF291B127F7435F8AA711F98342423BD6DD25D69E3D6E197AEBF90AC5
+E9675FFE7BF93DD5E6C8A89780ECC425B3D735A89C671FA5D70125CFE3B72DF3
+A54F27293135BD071CA5D2365A135A3395D39A508CD434F45793A610852E3D62
+1C717D529A82D93B90E2FF31629413B7AC1DF1EC4D6577980C34357F47899BE2
+CC95866E2140CD64D51AECA4BAF717F4D4BA13F1310F51AE6CF80689F7A1BD04
+1474C8E2B7A640DFCDCDECB7FF9690E8E6FF62FA9842293A1264D9C4AA5FC6DE
+84C36FB9334F5F9CA1B3DC4516D4CA3BD116605F5C5D0FB2F30FA080F83891DF
+1A23D9C420B3F204085591E4C88C7B26452B329DD0B1F9EDC7B065F21A4B6F60
+349D37A85C5985667040DDE858B27C832CB50CCE7BB9E1EC9C2D5C1B0F05D027
+65A743C13523FFFD455B9C8DE573E76522A8912AF192008DF97D7DED77FB56E6
+FC220D2E27CA29ABE1A138D3FEF84A0306D4DE8ABA3B65D6AACCF1E456C14293
+13A2E52EEAD3CE4D2980714C087C0606768FCE35D9F84873379C90A118B9F4D3
+6008721909002435E6242C5BDB4F85AD82D5C9D548B5786F50821A59FA41D0CC
+F096FD004329DDB25C494E4E1D63065EF6CE62C5C59084082182E139109B0E25
+09B500940B0B254F6E76445AB01617C35831FF74DDEA2C582D7E1B736A23322A
+4564662F5D21F638CE58055212A66C29755303AF713D54BC4EF5BDD0AF37FE84
+04986F5DB72899B3642B53E80BE87161B5106E8C0114A985CD72DB6E6D3171C0
+8AC789185A6608C45889D19C9574E8B1042846B5E53F303273ACD9985F92874B
+0395250173AABA938AF4551E955106AF3D1FAB12AEF599E758278C9C4B0B6EAC
+346765F34498198FDB4D2ED8EE4399921A3D380DA97F573E76588A46A927E56B
+02EBBE1A628EAD4DCF52726AB2D444450598904C10C0BEEA4D4D313B03ED8BB8
+D5E1125C7F4A24F3F4757365B838BBBB93E232CEB9E8A02531B4E9D116D56E7D
+5A9D547E7A00301433B3B8906D494A47B358C51E09BF70DCBE06D594E4A27C54
+83020848F8052038C052AC353AEF3E9D3EBBCD74357873ACDA704659A7962538
+B2D7829C4808D58E17B2DB2E20E464B53445674ED6B373CDE6DFC48AF4268447
+7DA072CB3B480B0D1C26B9753F5A34BAC7380F43ADE718172C399D335A2E88B3
+F14DBF6F091FA427B89FD51C12401441AD767AEEB19CCC2643FEA6BFAF53A057
+F7594CFB89E5DAECDFE36D1CA884C287B5AD943EEC86FB91BCE72693E7586E59
+F594D067F101A95A1CFE062799F9B6AE9E14E1CEE9A9AC23975B534749D9912E
+B5190AF0CBA729B70BCBF2433BC8C2808CB6A3A64E87A140E4532AF41F55CE51
+2BF9B4EF348B1F8CC7500847A076EAA125670223BA1BBDC979707493F7DE73CC
+78D79A4CF61F4AB8A819F9DF633BE00ACFACFC63438BD5F9CB65F7DBE1C1A99E
+AE9E8141EB065D30C17A79C2FC3686F2D13A187C69353374DDE142619D7C6989
+9414C36749E400F0D56C0DD786448421F4D638A1D545BDA0DA9637953D299743
+7A4519B437DEAB7461B69C96DC33B3834897568ACF6C66628DEF7AE597ACCFBB
+E273232CC0BFE67E9B89B7F0AC82F5C629E512411A9060D02623BAB507671545
+09EA818A7C0A94A01007DD0D7DD286C22B9ED463836B1D328290B3836FAB5F25
+380917C153901773BBE997031F8267CC91FE3C1916DF6AC46E44791A0863198F
+8FB8478724C22BB2732F945B39E4541C0168C45FC18FC7CCAC13FBEA39A93806
+6DEF0FBD7507AD086EA89EB278DB92A9F44D9A8584754643FFFF9C411587D22A
+C317E99C08DD469A3A2CB264C3899725338B923F660E1DB69BDC42D5C8BE2193
+B3139B8F53777949C20CFFE8918249DA5606C5F826997E18664085BCFC8FE460
+8D8B5EE4D0EF5D9C2F78246F757F01D2C2CE8EE265DA8038A276EA69BB8651A5
+2418E8479CB00E750644F3745408AE4ECF34B6774AA58D43D28C46DF56A9CCE0
+D7EB1B3E4010F1914A6AD8B0ED7A9104A16A1B2DED8937A5779B2B7E6F724FCF
+FBAFD79D2B7840E3F6E4378CE20185DAF51CD5DCDA7F797E5EF992C9B7BD2089
+FEB3A7165FA82A23E5CB0C99003BD75E3B9B00D5308C5C71FA9A4B2E3FC31B84
+35AC901ABEF4AEDBD785E30DEB848014955D1D0B25932AD4420B4FA52830FC10
+EFDABB03B27E85BBBFA667C76E4B5A68F4BC2D2F0BF631E43DC0A18522911998
+834B89CBFE29DEF493B9E87B93D7D9D886FAAC41023231E069E6B0FE3BF904A6
+7149D092E733AA2CA5442C49CC496662F11EA262C67CD191E9BB8FCDF54DEFC5
+ABF141056F515EB48AE9DD502F285F2488119652DA821EA3BF2E7D9895601DBA
+0B042D7D2CB609A542734B3F63FC3AF4FDA552BA15DA5E02C23CEB0F0BB14DB5
+2100EC71E868218241E86741638AA14DC1FCE8C1CB035D61C1F9F67EE3D85BFD
+BF9EA07AEC4787D7C40557DCA541E7CBDCCDA950AE2E95ABF82633E20F2A58CF
+14D205265FF7A1A3524562F62C4C3FA62043B4518AFB0616BEA02145B679BEE9
+CF367A8E5C053F22A004B8ECC26CE1FD6C425A37F9F7EA73AF4A9E9E2366B573
+BA26C25CA60D1436CB40824EF20C87734EBF7FB87EFE47C0292750EA29667BFC
+5DA8A01867A94332D779082BDC1114E128ACC6518F8D9B3A21AD8AF7463A42E2
+FB7E29BBBA59189421BAF708893FBB471406F264DEF7F9CA2C42A4956F8CA7D5
+BAC73FCB2B21D6F16836D2E5BC7ED04638ED3D0C480B0E057B05075C0A92464C
+6F6E151C818246B845E5056ABD9DBD8219D4086DF9BE0E13F594450B737C0512
+DE7BCF813764645FC7696D572A873CF1075B1627279D6E3EC493627E06DBD02B
+C978BB7D39F80CF960354B963F4302281538C6EB420E55E899D9D101798D5CD9
+3E8FC2675D6A5CB2F2423542FB62CDD78A962EB2D63833E6DE848FEE15430A66
+AD244BD768A3BC8307C833997EFD0735A852B6539E7E873A62461F32820B062E
+ED77AF1F260D9B4EC55C60C0B2658528C088357C039DF1F3F85AE16917C77273
+55CE42CAC9C5499E07508FEC82BA810C6AF5AB0F597F3174F91DDD9007100491
+1859D303E60AE00ECED21FF7258B613B342C57C22947D60DA3143C3FBC073FB4
+E41E8268DA25ED1D3E030915576519155CCDA8053BBA3BDFBA018C368A077545
+DB789190EC4E7D7EB9AAB77E54F49B07783EEF138026C7101CD5315D14E0F9FB
+2BEFC34B5B1A03D2449A1ED3F26DCB75EA542C995EFE140B51B9508737817A9C
+962FE2A0B3650F7770C6310F8A0DDD48EC86BA3958F5343C61A2971B413B52F2
+38E66EC71F73DBC29E6798DF7CFCB3103F1841A4D8FCE51983F03EA288BC0045
+0D3565C494E7BFF2178F273FD714ECF7DCD6519A9BB36F95E05A3F2449F89DD9
+E564458349C34A3CD770EFF268495183A0
 0000000000000000000000000000000000000000000000000000000000000000
 0000000000000000000000000000000000000000000000000000000000000000
 0000000000000000000000000000000000000000000000000000000000000000
@@ -2313,8 +2307,8 @@
 @start /Fa 242[61 13[{ TeXbbad153fEncoding ReEncodeFont }1
 49.8132 /CMSY6 rf /Fb 134[32 1[43 32 34 24 24 24 1[34
 30 34 50 18 32 1[18 34 30 19 27 34 27 34 30 13[34 44
-1[41 47 1[54 3[22 1[47 39 2[43 1[45 6[18 3[30 1[30 30
-30 1[30 1[18 21 18 44[{ TeXf7b6d320Encoding ReEncodeFont }41
+1[41 47 1[54 3[22 1[47 39 2[43 1[45 6[18 3[30 1[30 1[30
+1[30 1[18 21 18 44[{ TeXf7b6d320Encoding ReEncodeFont }40
 49.8132 /CMR6 rf /Fc 135[33 3[24 29 4[40 58 18 2[22 36
 2[33 36 33 33 36 50[22 46[{ TeX74afc74cEncoding ReEncodeFont }14
 66.4176 /CMTI8 rf /Fd 134[43 43 59 43 45 32 32 34 1[45
@@ -2353,7 +2347,7 @@
 %%Page: 1 1
 TeXDict begin @landscape 1 0 bop -169 -357 a Fj(Org-Mo)t(de)45
 b(Reference)h(Card)g(\(1/2\))546 -242 y Fi(\(for)23 b(v)n(ersion)h
-(4.03\))-150 -39 y Fh(Getting)37 b(Started)-150 89 y
+(4.04\))-150 -39 y Fh(Getting)37 b(Started)-150 89 y
 Fg(\(add-to-list)i('auto-mode-alist)h('\("\\\\.org$")e(.)e
 (org-mode\)\))-150 172 y(\(define-key)i(global-map)h("\\C-cl")e
 ('org-store-link\))1504 148 y Ff(2)-150 254 y Fg(\(define-key)h
@@ -2566,7 +2560,7 @@
 %%Page: 2 2
 TeXDict begin @landscape 2 1 bop -169 -357 a Fj(Org-Mo)t(de)45
 b(Reference)h(Card)g(\(2/2\))546 -242 y Fi(\(for)23 b(v)n(ersion)h
-(4.03\))-150 -36 y Fh(Agenda)37 b(Views)-150 120 y Fi(add/mo)n(v)n(e)25
+(4.04\))-150 -36 y Fh(Agenda)37 b(Views)-150 120 y Fi(add/mo)n(v)n(e)25
 b(curren)n(t)f(\014le)g(to)g(fron)n(t)g(of)f(agenda)197
 b Fg(C-c)36 b([)-150 190 y Fi(remo)n(v)n(e)24 b(curren)n(t)g(\014le)g
 (from)f(y)n(our)g(agenda)299 b Fg(C-c)36 b(])-150 259
@@ -2761,7 +2755,7 @@
 Fg(org-CUA-compatibility)p Fi(.)4535 3770 y Fb(Cop)n(yrigh)n(t)4838
 3768 y(c)4821 3770 y Fa(\015)d Fb(2006)i(F)-5 b(ree)21
 b(Soft)n(w)n(are)i(F)-5 b(oundation,)20 b(Inc.)4795 3826
-y(v4.03)h(for)h(Org-Mo)r(de)e(4.03,)i(2006)4912 3882
+y(v4.04)h(for)h(Org-Mo)r(de)e(4.04,)i(2006)4912 3882
 y(Author:)k(Philip)18 b(Ro)r(ok)n(e)4473 3937 y(based)j(on)g(refcard)g
 (design)g(and)f(format)i(b)n(y)f(Stephen)f(Gildea)4242
 4022 y(P)n(ermission)28 b(is)f(gran)n(ted)i(to)f(mak)n(e)h(and)e
--- a/etc/orgcard.tex	Tue Jan 24 02:01:42 2006 +0000
+++ b/etc/orgcard.tex	Wed Jan 25 07:10:04 2006 +0000
@@ -1,4 +1,4 @@
-% Reference Card for Org Mode 4.03
+% Reference Card for Org Mode 4.04
 %
 %**start of header
 \newcount\columnsperpage
@@ -58,7 +58,7 @@
 % Thanks to Paul Rubin, Bob Chassell, Len Tower, and Richard Mlynarik
 % for their many good ideas.
 
-\def\orgversionnumber{4.03}
+\def\orgversionnumber{4.04}
 \def\year{2006}
 
 \def\shortcopyrightnotice{\vskip 1ex plus 2 fill
--- a/lisp/ChangeLog	Tue Jan 24 02:01:42 2006 +0000
+++ b/lisp/ChangeLog	Wed Jan 25 07:10:04 2006 +0000
@@ -1,9 +1,339 @@
+2006-01-24  Luc Teirlinck  <teirllm@auburn.edu>
+
+	* completion.el: Minor fixes in introductory comment.
+	(completion-def-wrapper): Fix alist.
+
+2006-01-25  Nick Roberts  <nickrob@snap.net.nz>
+
+	* thumbs.el (thumbs-new-image-size): New function.
+	(thumbs-increment-image-size-element)
+	(thumbs-decrement-image-size-element, thumbs-increment-image-size)
+	(thumbs-decrement-image-size): Delete.
+	(thumbs-resize-image-1): Rename from thumbs-resize-image.  Keep old
+	temp files and use to resize.
+	(thumbs-resize-image): Rename from thumbs-resize-image-interactive.
+	Use increment argument to enlarge/shrink.  Preserve point.
+	(thumbs-shrink-image): Rename from thumbs-resize-image-size-down.
+	(thumbs-enlarge-image): Rename from thumbs-resize-image-size-up
+	(thumbs-show-thumbs-list): Set thumbs-buffer to current-buffer.
+	(thumbs-mark, thumbs-unmark): Preserve point.
+	(thumbs-modify-image): Keep old temp files and use to modify.
+	Cleanup old temp files at load time.  Preserve point.
+	(thumbs-view-image-mode-map): Use new command names.
+
+2006-01-24  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* log-view.el (log-view-minor-wrap): First rev is the one at point.
+
+	* calendar/cal-menu.el: Avoid macros from calendar.el so as to break
+	the nastiest part of the cyclic dependency.
+	(cal-menu-update): Use dotimes and calendar-increment-month.
+
+	* calendar/calendar.el: Remove unnecessary leading stars in docstrings.
+	(calendar-week-start-day): Add an :initializer.
+	(calendar-mode-map): Use suppress-keymap, and command remapping.
+	(describe-calendar-mode): Setup xref-stack info for the back button.
+	(calendar-star-date): Insert before delete.
+	(calendar-set-mode-line): Add file-modified info if applicable.
+	(calendar-increment-month): New function.
+
+2006-01-24  Tobias C. Rittweiler  <tcr@freebits.de>  (tiny change)
+
+	* font-lock.el (lisp-font-lock-keywords-2):
+	Recognize "& keywords" only at word boundaries.
+
+2006-01-24  Nick Roberts  <nickrob@snap.net.nz>
+
+	* thumbs.el (thumbs-extra-images): New variable.  Make it buffer-local
+	and permanent-local.
+	(thumbs-max-image-number): New variable.  Make it
+	(thumbs-do-thumbs-insertion): Use them
+	(thumbs-per-line): Change default to 4.
+	(thumbs-marked-list): Rename from thumbs-markedL.
+	(thumbs-cleanup-thumbsdir, thumbs-delete-images)
+	(thumbs-rename-images): Use -list instead of L for internal variables.
+	(thumbs-call-convert): Use call-process instead of shell-command.
+	(thumbs-insert-thumb): Add filename as help-echo to each image.
+	(thumbs-show-from-dir): Rename from thumbs-show-all-from-dir.
+	Give dir to thumbs-show-thumbs-list.
+	(thumbs-show-thumbs-list): Set default-directory to that of images.
+	(thumbs-dired-show): Rename from thumbs-dired-show-all.
+	(thumbs-display-thumbs-buffer, thumbs-show-more-images): New functions.
+	(thumbs-mode-map): Bind "+" to thumbs-show-more-images.
+	(thumbs-view-image-mode-map): Bind "^" to thumbs-display-thumbs-buffer.
+
+2006-01-23  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* ses.el (ses-read-cell): Provide a default value.
+
+2006-01-23  Juanma Barranquero  <lekktu@gmail.com>
+
+	* term/w32-win.el (image-library-alist): Add additional names for
+	GIF library.
+
+2006-01-23  Arne J,Ax(Brgensen  <arne@arnested.dk>
+
+	* international/latexenc.el (latexenc-find-file-coding-system):
+	Add file-regular-p check.
+
+2006-01-22  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* simple.el (clone-buffer): Don't show the new buffer in the same
+	window.
+
+2006-01-23  Juri Linkov  <juri@jurta.org>
+
+	* faces.el (link, link-visited): New faces based on default values
+	of `info-xref' and `info-xref-visited'.
+
+	* info.el (info-xref): Inherit from `link'.
+	(info-xref-visited): Inherit from `link-visited'.
+
+	* cus-edit.el (custom-buffer-create-internal): Use widget type
+	`custom-manual' instead of `info-link' and don't set properties
+	`button-face' and `mouse-face' explicitly.
+	(custom-browse-group-tag, custom-browse-variable-tag)
+	(custom-browse-face-tag): Inherit from widget class
+	`custom-group-link' instead of `push-button'.
+	(custom-button-unraised): Inherit from `underline' face.
+	(custom-link): Inherit from `link' face.  Fix doc and group.
+	(custom-add-parent-links, custom-group-value-create): Don't set
+	properties `button-face' and `mouse-face' explicitly for
+	`custom-group-link' widget.
+	(custom-group-link): Add properties `button-face' and `mouse-face'
+	to widget definition.
+	(custom-field-keymap): New variable.  Put `custom-field-keymap' to
+	editable-field's :keymap property.
+	(custom-mode): Fix docstring: substitute keybindings for
+	`widget-forward' and `widget-backward' from `widget-keymap',
+	`widget-complete' from `custom-field-keymap', replace old
+	`Custom-move-and-invoke' with `widget-move-and-invoke'.  Untabify.
+
+	* desktop.el (desktop-load-file): Check for `fboundp' before
+	calling `symbol-function'.
+
+	* simple.el (clone-buffer, clone-indirect-buffer)
+	(clone-indirect-buffer-other-window): Use `read-buffer' instead of
+	`read-string'.  Fix prompts.
+
+	* play/doctor.el (doctor-mode-map): Rename from `doc-mode-map'.
+
+2006-01-23  Nick Roberts  <nickrob@snap.net.nz>
+
+	* thumbs.el (thumbs-file-alist): Avoid creating duplicate entries.
+
+2006-01-22  Luc Teirlinck  <teirllm@auburn.edu>
+
+	* startup.el (inhibit-splash-screen, initial-scratch-message):
+	Doc fixes.
+
+2006-01-22  Michael Albinus  <michael.albinus@gmx.de>
+
+	Sync with Tramp 2.0.52.
+
+	* net/tramp.el, net/tramp-ftp.el, net/tramp-util.el,
+	net/tramp-vc.el: Add code for unloading Tramp.  See comment before
+	`tramp-unload-tramp' for checklist.
+
+	* net/tramp.el: Require `timer-funcs' instead of `timer' if in
+	XEmacs.  Contributed by Steve Youngs <steve@sxemacs.org>.
+	(tramp-unload-file-name-handler-alist)
+	(tramp-unload-tramp): New defuns.
+	(tramp-advice-PC-expand-many-files): New defadvice.
+	(tramp-save-PC-expand-many-files, tramp-setup-complete) Defuns
+	removed.
+	(tramp-handle-expand-file-name): Remove double slash.
+	(tramp-handle-file-attributes-with-ls): Return t as 9th attribute.
+	It doesn't matter, because it will be converted later on.
+	(tramp-handle-file-ownership-preserved-p): Rewritten.  The old
+	implementation was just heuristic.
+	(tramp-post-connection): Set uid and gid properties.
+	(tramp-convert-file-attributes): Set file's gid change bit.
+	(tramp-get-remote-uid, tramp-get-remote-gid): New defuns.
+	(tramp-handle-expand-file-name): Use "~root" for tilde expansion
+	in case of su(do)? methods.  The home directory of the local user
+	will be taken else.
+	(tramp-open-connection-telnet)
+	(tramp-open-connection-rsh, tramp-open-connection-su)
+	(tramp-open-connection-multi): Set PS1 to "$ ".  Otherwise, a
+	local shell prompt could hurt.  Reported by Romain Francoise
+	<romain@orebokech.com>.
+	(tramp-let-maybe): Add `edebug-form-spec' property.
+	(tramp-handle-expand-file-name): Bind `default-directory' locally
+	to "/" in order to avoid problems with UNC shares or Cygwin
+	mounts.
+	(tramp-md5-function): Fix typo in error message.
+
+	* net/tramp-ftp.el (tramp-ftp-enable-ange-ftp): New defun.
+
+	* net/tramp-util.el (top): Apply `ignore' instead of `identity'
+	for byte-compiler pacification.
+
+2006-01-22  Andre Spiegel  <spiegel@gnu.org>
+
+	* vc-rcs.el (vc-rcs-state-heuristic): Use file-attributes with
+	ID-FORMAT `string'.  This allows us to get rid of
+	`vc-user-login-name UID'.
+
+	* vc-sccs.el (vc-sccs-state-heuristic): Likewise.
+
+2006-01-22  John Paul Wallington  <jpw@pobox.com>
+
+	* hl-line.el (hl-line-highlight, hl-line-move): Doc fixes.
+
+2006-01-21  Martin Rudalics  <rudalics@gmx.at>
+
+	* emacs-lisp/find-func.el (find-definition-noselect)
+	(find-variable-noselect): Search variables in C source code too.
+	(find-function-C-source, find-function-noselect, find-function)
+	(find-function-other-frame, find-variable-noselect, find-variable)
+	(find-variable-other-frame, find-variable-at-point):
+	Fix docstrings.
+
+2006-01-21  Francesco Potorti`  <pot@gnu.org>
+
+	* mail/rmailout.el (rmail-output): Don't use content-type if it is nil.
+
+2006-01-21  Agustin Martin  <agustin.martin@hispalinux.es>
+
+	* textmodes/flyspell.el (flyspell-emacs-popup, flypell-xemacs-popup):
+	Default to disabling the "Save affix" question.
+
+2006-01-21  Marien Zwart  <marienz@gentoo.org>  (tiny change)
+
+	* progmodes/python.el (python-mode) <eldoc-mode-hook>: Pass nil as
+	the first arg to run-python.
+
+2006-01-21  Eli Zaretskii  <eliz@gnu.org>
+
+	* startup.el (command-line-1): Handle --no-desktop if desktop.el
+	is not loaded.
+
+2006-01-20  Jay Belanger  <belanger@truman.edu>
+
+	* calc/calcalg2.el (calc-sum-rec): Fix the sum when the lower
+	limit is 0.
+
+	* calc/calc-arith.el (math-add-symb-fancy): Check the length of
+	the correct variable.
+
+2006-01-20  Carsten Dominik  <dominik@science.uva.nl>
+
+	* textmodes/org.el (org-open-at-point): Fixed bug with matching a
+	link.  Fixed buggy argument sequence in call to `org-view-tags'.
+	(org-compile-prefix-format): Set `org-prefix-has-tag'.
+	(org-prefix-has-tag): New variable.
+	(org-format-agenda-item): Remove tags from headline if
+	appropriate.
+	(org-agenda-remove-tags-when-in-prefix): New option.
+	(org-get-tags-at): New function.
+
+2006-01-20  Nick Roberts  <nickrob@snap.net.nz>
+
+	* thumbs.el (thumbs-buffer): New variable.  Make it buffer local.
+	(thumbs-find-image): Move image name and number from buffer name
+	to mode name.  Set thumbs-buffer.  Preserve point so that large
+	images remain visible.
+	(thumbs-file-alist): Construct list in thumbs-buffer and reverse
+	order.
+	(thumbs-show-image-num): Get image from thumbs-file-alist.  Set
+	mode name.
+	(thumbs-next-image, thumbs-previous-image): Make them work.
+
+2006-01-19  Luc Teirlinck  <teirllm@auburn.edu>
+
+	* cus-edit.el (custom-buffer-create-internal): State in the text above
+	the whole buffer buttons that they do not operate on hidden items.
+	(custom-face-menu): Use `custom-face-save' instead of
+	`custom-face-save-command'.
+	(custom-face-save-command): Make it an alias for `custom-face-save'
+	and declare it obsolete.
+	(custom-face-save): Doc fix.
+
+	* dired.el (dired-no-confirm): Add quote.
+	(dired-subdir-alist-pre-R): Add quote in
+	`make-variable-buffer-local' form and remove unbalanced parenthesis.
+
+2006-01-19  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* textmodes/table.el (table-mode-indicator): Typo in last change.
+
+2006-01-19  Richard M. Stallman  <rms@gnu.org>
+
+	* outline.el (hide-leaves): Don't call outline-end-of-heading.
+	Fixes bug reported in Nov 2005.
+
+	* isearch.el (isearch-forward): Doc fix.
+
+	* dired.el (dired-move-to-filename-regexp): Define as alias.
+	(dired-no-confirm): Use defcustom.
+	(dired-subdir-alist-pre-R): Put defvar at top level.
+
+	* battery.el (battery-linux-proc-acpi): Handle "last full capacity".
+
+	* textmodes/bibtex.el (bibtex-strings, bibtex-reference-keys):
+	Mark as risky.
+
+	* simple.el (set-mark-command): Doc fix.
+	(clone-indirect-buffer-other-window):
+	Read arg like clone-indirect-buffer.
+	(move-beginning-of-line): Skip invisible newlines.
+
+2006-01-19  Masatake YAMATO  <jet@gyve.org>
+
+	* progmodes/cpp.el (cpp-edit-load): Make the order of
+	listed conditions in a base C code buffer and its associate
+	CPP Edit buffer the same.
+
 2006-01-19  Kenichi Handa  <handa@m17n.org>
 
-	* international/mule.el (auto-coding-regexp-alist-lookup): New
-	function.
+	* mail/rmail.el (rmail-enable-mime): Docstring fixed.
+	(rmail-mime-feature): Likewise.
+	(rmail-require-mime-maybe): Use display-warning to show a warning
+	message.
+
+	* international/mule.el (auto-coding-regexp-alist-lookup): New fun.
 	(find-auto-coding): Use auto-coding-regexp-alist-lookup.
 
+2006-01-18  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* array.el: Move defvars out of eval-when-compile.
+	(array-make-template): Replace undeclared global var with a local one.
+	(array-mode): Inline initialization functions.
+	(array-init-local-variables, array-init-max-row)
+	(array-init-max-column, array-init-columns-per-line)
+	(array-init-field-width, array-init-rows-numbered)
+	(array-init-line-length, array-init-lines-per-row): Remove.
+
+	* play/doctor.el: Move defvars out of eval-when-compile.  Use dolist.
+	(doc-mode-map): Define explicitly.
+	(doctor-txtype): Use mapc.
+
+	* textmodes/table.el: Move defvars out of eval-when-compile.
+	Remove harmful code meant to avoid byte-compiler warnings.
+	(table-fixed-mode-indicator): Remove.  Use a more complex mode-line
+	specification that checks table-fixed-width-mode directly.
+	(table-recognize-region, table-recognize-cell):
+	Use restore-buffer-modified-p.
+	(table-fixed-width-mode): Remove code that refreshes
+	table-fixed-mode-indicator.
+	(*table--cell-describe-bindings, *table--cell-describe-mode):
+	Avoid obsolete name print-help-return-message.
+	(table--test-cell-list): Don't use replace-regexp from elisp.
+	(table--point-entered-cell-function, table--point-left-cell-function):
+	Don't set table-fixed-mode-indicator, use force-mode-line-update.
+
+	* textmodes/org.el: Move defvars out of eval-when-compile.  Move code
+	that was after the end of file.  Use buffer-file-name variable.
+	(org-timestamp-change): Use with-current-buffer.
+	(org-todo-list): Don't unnecessarily define a new buffer-local var.
+	(org-agenda-file-to-end, org-agenda-file-to-front): Remove unused arg
+	`file'.
+
+	* progmodes/fortran.el: Move defvars out of eval-when-compile.
+	(fortran-break-line): Remove unused var `opoint'.
+	(fortran-abbrev-start): Obey help-event-list.
+
 2006-01-18  Jesper Harder  <harder@phys.au.dk>
 
 	* mail/smtpmail.el (smtpmail-send-it): Use insert-buffer-substring.
@@ -11,25 +341,20 @@
 2006-01-18  Masatake YAMATO  <jet@gyve.org>
 
 	* progmodes/make-mode.el (makefile-imake-mode): New mode
-	derived from maiefile-mode.
+	derived from makefile-mode.
 	(makefile-imake-mode-syntax-table): New syntax table
 	derived from makefile-mode-syntax-table.
-	(makefile-mode): Write about makefile-imake-mode in 
-	doc string.
+	(makefile-mode): Write about makefile-imake-mode in doc string.
 	(makefile-mode-map): Bind "\C-c\C-m\C-i" to makefile-imake-mode.
 	(makefile-imake-font-lock-keywords): New font lock keywords.
 
-	* files.el (auto-mode-alist): Added Imakefile.
+	* files.el (auto-mode-alist): Add Imakefile.
 
 2006-01-17  Agustin Martin  <agustin.martin@hispalinux.es>
 
 	* textmodes/flyspell.el (ispell-kill-ispell-hook): Add to the hook when
 	loading the file rather than when turning on flyspell-mode.
 
-2006-01-13  Richard M. Stallman  <rms@gnu.org>
-
-	* font-lock.el (lisp-font-lock-keywords-1): Minor rearrangement.
-
 2006-01-16  Luc Teirlinck  <teirllm@auburn.edu>
 
 	* cus-edit.el (customize-rogue): Minor doc fix.
@@ -100,9 +425,8 @@
 	(term-mode): Make variables local here instead of doing it in
 	`term-emulate-terminal'.
 	(term-emulate-terminal): Delete incorrect optimization for cr+lf.
-	Scroll reverse needs to take into account the scroll
-	region.  Saving and restoring the cursor should save the color
-	attributes too.
+	Scroll reverse needs to take into account the scroll region.
+	Saving and restoring the cursor should save the color attributes too.
 	(term-reset-terminal): Reset the scroll region.
 	(term-handle-ansi-escape): Cursor up and down should take into
 	account the scroll region.
@@ -131,6 +455,10 @@
 	(Custom-reset-saved): Do not ask for confirmation in single option
 	buffers.
 
+2006-01-13  Richard M. Stallman  <rms@gnu.org>
+
+	* font-lock.el (lisp-font-lock-keywords-1): Minor rearrangement.
+
 2006-01-13  Romain Francoise  <romain@orebokech.com>
 
 	* add-log.el (add-change-log-entry, change-log-merge):
@@ -167,7 +495,7 @@
 	Use `org-expand-wide-chars'.
 	(org-open-file): Fix bug in program launch.
 	(org-get-time-of-day): Fix bug with times before 1am.
-	(org-agenda-menu): Addes tags commands.
+	(org-agenda-menu): Add tags commands.
 
 2006-01-13  Agustin Martin  <agustin.martin@hispalinux.es>
 
@@ -378,7 +706,7 @@
 
 	* emacs-lisp/find-func.el (find-definition-noselect): Fix typo in
 	the doc string: "functoin" => "function".
-	ldefs-boot.el: Likewise.
+	* ldefs-boot.el: Likewise.
 
 	* textmodes/bibtex.el (bibtex-validate-globally): Fix typo in a
 	message text: "Duplicat" => "Duplicate".
@@ -691,7 +1019,7 @@
 	that we set completion-ignore-case (i.e., binding via let is not
 	sufficient).
 	(bibtex-complete): Always set completion-ignore-case and
-	choose-completion-string-functions. The latter is needed because
+	choose-completion-string-functions.  The latter is needed because
 	choose-completion-string-functions keeps its value if we quit the
 	*Completions* buffer without requesting a completion.
 
@@ -753,7 +1081,7 @@
 	(bibtex-beginning-first-field): New functions.
 	(bibtex-skip-to-valid-entry): Use bibtex-valid-entry.  Fix regexp.
 	(bibtex-map-entries): Fix docstring.
-	(bibtex-flash-head): New arg prompt. Simplify.
+	(bibtex-flash-head): New arg prompt.  Simplify.
 	(bibtex-enclosing-field): Include code of bibtex-inside-field.
 	(bibtex-insert-kill): Simplify.  Always insert text past the
 	current field or entry.
@@ -789,7 +1117,7 @@
 	* progmodes/gud.el (gud-tooltip-dereference): Rename from
 	toggle-gud-tooltip-dereference.
 	(gud-tooltip-print-command): Move concatenation of "*" to expr to...
-	(gud-tooltip-tips): ...here when dereferencing..
+	(gud-tooltip-tips): ...here when dereferencing.
 
 2005-12-28  Bill Wohler  <wohler@newt.com>
 
@@ -1040,7 +1368,7 @@
 	* menu-bar.el (menu-find-file-existing): New function.
 	(menu-bar-file-menu): Use menu-find-file-existing for Open.
 
-	* tool-bar.el (tool-bar-setup): open changed to menu-find-file-existing.
+	* tool-bar.el (tool-bar-setup): Open changed to menu-find-file-existing.
 
 2005-12-22  Stefan Monnier  <monnier@iro.umontreal.ca>
 
@@ -1301,7 +1629,7 @@
 	* simple.el (last-buffer): Move here.
 	(get-next-valid-buffer): New function.
 	(next-buffer): Use frame-local buffer list, maintain buried buffer list.
-	(prev-buffer): Ditto. Rename to `previous-buffer'.
+	(prev-buffer): Ditto.  Rename to `previous-buffer'.
 
 	* menu-bar.el (menu-bar-update-buffers): Update uses of `prev-buffer'.
 	* bindings.el (global-map): Ditto.
@@ -1330,8 +1658,8 @@
 	(ispell-buffer-local-dict):
 	Don't set spell-personal-dictionary after killing process.
 	(ispell-buffer-local-words): Don't clear out ispell-buffer-local-name.
-	(ispell-tex-skip-alists)
-	(ispell-html-skip-alists, ispell-skip-region-alist): Mark as risky.
+	(ispell-tex-skip-alists, ispell-html-skip-alists)
+	(ispell-skip-region-alist): Mark as risky.
 
 	* net/newsticker.el (newsticker--retrieval-timer-list)
 	(newsticker--display-timer, newsticker-running-p)
@@ -1570,7 +1898,7 @@
 	* progmodes/gud.el (gud-tooltip-modes, gud-tooltip-display):
 	Add the gud groupname.
 	(gud-tooltip-mode): Add the tooltip groupname.
-	(gud-tooltip-echo-area): Add the gud groupname. Remove tag to
+	(gud-tooltip-echo-area): Add the gud groupname.  Remove tag to
 	avoid conflict with tooltip-use-echo-area.
 
 2005-12-10  Romain Francoise  <romain@orebokech.com>
@@ -1593,7 +1921,7 @@
 
 2005-12-10  David Koppelman  <koppel@ece.lsu.edu>
 
-	* hi-lock.el: (hi-lock-mode) Renamed from hi-lock-buffer-mode;
+	* hi-lock.el (hi-lock-mode): Rename from hi-lock-buffer-mode;
 	react if global-hi-lock-mode seems intended.
 	(global-hi-lock-mode) Renamed from hi-lock-mode.
 	(hi-lock-archaic-interface-message-used)
@@ -1736,8 +2064,8 @@
 
 2005-12-08  Kim F. Storm  <storm@cua.dk>
 
-	* emulation/cua-rect.el (cua--rectangle-aux-replace): Fix
-	indention of text on right side of replaced rectangle.
+	* emulation/cua-rect.el (cua--rectangle-aux-replace):
+	Fix indention of text on right side of replaced rectangle.
 
 2005-12-09  Nick Roberts  <nickrob@snap.net.nz>
 
@@ -1773,7 +2101,7 @@
 	* progmodes/cc-defs.el:
 	(i) Load cc-fix.elc for `push' and `pop' (for GNU Emacs 20.4)
 
-	* progmodes/cc-cmds.el (c-show-syntactic-information): change the
+	* progmodes/cc-cmds.el (c-show-syntactic-information): Change the
 	highlighting mechanism so it will work in XEmacs too.
 
 	* progmodes/cc-defs.el: Insert c-int-to-char.
@@ -1803,8 +2131,8 @@
 
 	* progmodes/cc-mode.el: Bind c-subword-mode to C-c C-w.
 
-	* progmodes/cc-subword.el, cc-cmds.el, cc-mode.el: Rename
-	"c-subword-move-mode" as "c-subword-mode".
+	* progmodes/cc-subword.el, cc-cmds.el, cc-mode.el:
+	Rename "c-subword-move-mode" as "c-subword-mode".
 
 	* progmodes/cc-mode.el: Added tty suitable bindings for C-c
 	<delete> and C-c C-<delete>.  (To the c-hungry- delete functions).
@@ -1836,8 +2164,8 @@
 2005-12-08  Martin Stjernholm  <bug-cc-mode@gnu.org>
 
 	* progmodes/cc-fonts.el, cc-vars.el
-	(gtkdoc-font-lock-doc-comments, gtkdoc-font-lock-doc-protection,
-	gtkdoc-font-lock-keywords): GtkDoc patterns contributed by
+	(gtkdoc-font-lock-doc-comments, gtkdoc-font-lock-doc-protection)
+	(gtkdoc-font-lock-keywords): GtkDoc patterns contributed by
 	Masatake YAMATO.
 
 	(c-doc-comment-style): Made GtkDoc default in C mode.
@@ -1861,7 +2189,7 @@
 	c-syntactic-context for calls to "criteria functions", for
 	consistency with other calls to user functions.
 
-	* progmodes/cc-cmds.el (c-indent-command): expunge use of
+	* progmodes/cc-cmds.el (c-indent-command): Expunge use of
 	`current-prefix-arg', since this might be the prefix arg to a
 	command which calls c-indent-command as a function.  Change the
 	interactive spec from "p" to "P".
@@ -1880,14 +2208,14 @@
 
 2005-12-08  Alan Mackenzie  <bug-cc-mode@gnu.org>
 
-	* progmodes/cc-cmds.el (c-mask-paragraph): correct, so that
+	* progmodes/cc-cmds.el (c-mask-paragraph): Correct, so that
 	auto-fill doesn't split a c-comment's last word from a hanging
 	"*/" when a space is typed between them after fill-column.
 
 	* progmodes/cc-defs.el: New macro c-delete-and-extract-region.
 
-	* progmodes/cc-styles.el (c-set-style,
-	c-setup-paragraph-variables): Abort the command if we're not in a
+	* progmodes/cc-styles.el (c-set-style)
+	(c-setup-paragraph-variables): Abort the command if we're not in a
 	CC Mode buffer.
 
 	* progmodes/cc-align.el (c-lineup-C-comments): Correct indentation
@@ -1918,25 +2246,25 @@
 
 2005-12-08  Martin Stjernholm  <bug-cc-mode@gnu.org>
 
-	* progmodes/cc-fonts.el (c-basic-matchers-before,
-	c-complex-decl-matchers): Fixed the "not-arrow-prefix" regexp used
+	* progmodes/cc-fonts.el (c-basic-matchers-before)
+	(c-complex-decl-matchers): Fixed the "not-arrow-prefix" regexp used
 	in Pike.
 
 	* progmodes/cc-langs.el (c-other-op-syntax-tokens): Only C++ has
 	digraphs.
 
 	* progmodes/cc-fonts.el, cc-langs.el, cc-engine.el
-	(c-cpp-message-directives, c-cpp-include-directives,
-	c-opt-cpp-macro-define, c-opt-cpp-macro-define-start,
-	c-cpp-expr-directives): Introduced new language constants to
+	(c-cpp-message-directives, c-cpp-include-directives)
+	(c-opt-cpp-macro-define, c-opt-cpp-macro-define-start)
+	(c-cpp-expr-directives): Introduced new language constants to
 	control cpp syntax in a cleaner way.
 
 	(c-cpp-expr-functions): Renamed from c-cpp-defined-fns.
 
 	(c-cpp-matchers, c-forward-to-cpp-define-body): Use them.
 
-	* progmodes/cc-langs.el, cc-fonts.el (c-string-escaped-newlines,
-	c-multiline-string-start-char): New language constants and
+	* progmodes/cc-langs.el, cc-fonts.el (c-string-escaped-newlines)
+	(c-multiline-string-start-char): New language constants and
 	variables to specify how newlines in string literals work.
 
 	(c-font-lock-invalid-string): Use them.
@@ -1952,15 +2280,15 @@
 	* progmodes/cc-engine.el, cc-langs.el
 	(c-opt-op-identifier-prefix): New language constant and variable.
 
-	(c-just-after-func-arglist-p, c-after-special-operator-id,
-	c-search-decl-header-end, c-inside-bracelist-p): Use it.
+	(c-just-after-func-arglist-p, c-after-special-operator-id)
+	(c-search-decl-header-end, c-inside-bracelist-p): Use it.
 
 	* progmodes/cc-align.el, cc-engine.el
 	(c-after-special-operator-id): New helper to handle C++ operator
 	identifiers.
 
-	(c-lineup-topmost-intro-cont, c-just-after-func-arglist-p,
-	c-guess-basic-syntax): Handle C++ operator identifiers in
+	(c-lineup-topmost-intro-cont, c-just-after-func-arglist-p)
+	(c-guess-basic-syntax): Handle C++ operator identifiers in
 	declarations.
 
 	* progmodes/cc-langs.el (c-assignment-operators): Added the
@@ -2030,7 +2358,7 @@
 	(c-point-syntax): Add a check for "virtual semicolons" in AWK
 	mode, so that the tentative extra newline doesn't change the
 	syntax of the following brace.
-	(c-electric-brace): restructure by extracting the above functions.
+	(c-electric-brace): Restructure by extracting the above functions.
 	Tidy up the coding somewhat.
 	(c-electric-semi&comma, c-electric-colon, c-electric-paren):
 	restructure a bit.
@@ -2055,9 +2383,9 @@
 	* progmodes/cc-subword.el: New functions and minor mode to handle
 	SillyCapsedStyleIndentifiers, contributed by Masatake YAMATO:
 
-	(c-forward-subword, c-backward-subword, c-mark-subword,
-	c-kill-subword, c-backward-kill-subword, c-transpose-subwords,
-	c-capitalize-subword, c-downcase-subword, c-upcase-subword):
+	(c-forward-subword, c-backward-subword, c-mark-subword)
+	(c-kill-subword, c-backward-kill-subword, c-transpose-subwords)
+	(c-capitalize-subword, c-downcase-subword, c-upcase-subword):
 	Functions corresponding to the standard word handling functions.
 
 	(c-subword-move-mode): Minor mode that replaces all the standard
@@ -2078,7 +2406,7 @@
 
 	Introduce an "awk" style, mainly for auto-newline and clean-ups.
 
-	* progmodes/cc-align.el: new function c-snug-1line-defun-close
+	* progmodes/cc-align.el: New function c-snug-1line-defun-close
 
 	* progmodes/cc-cmds.el: In c-electric-brace, add code for new
 	clean-up one-liner-defun.
@@ -2101,8 +2429,8 @@
 	* progmodes/cc-defs.el (c-tnt-chng-record-state): Don't signal an
 	error if the mark isn't set.
 
-	* progmodes/cc-engine.el (c-guess-continued-construct,
-	c-guess-basic-syntax): Use `c-forward-decl-or-cast-1' to more
+	* progmodes/cc-engine.el (c-guess-continued-construct)
+	(c-guess-basic-syntax): Use `c-forward-decl-or-cast-1' to more
 	accurately detect functions inside functions.
 
 	* progmodes/cc-engine.el (c-at-expression-start-p): New function
@@ -2123,8 +2451,8 @@
 	(c-forward-objc-directive): New function to move over any ObjC
 	directive.
 
-	(c-just-after-func-arglist-p, c-guess-basic-syntax,
-	c-basic-matchers-before): Use it.
+	(c-just-after-func-arglist-p, c-guess-basic-syntax)
+	(c-basic-matchers-before): Use it.
 
 	(c-font-lock-objc-iip-decl): Removed.
 
@@ -2134,8 +2462,8 @@
 	* progmodes/cc-styles.el (c-style-alist): Fixed several
 	inconsistencies in the Whitesmith style.
 
-	* progmodes/cc-align.el (c-lineup-after-whitesmith-blocks): New
-	lineup function to get lines after Whitesmith style blocks
+	* progmodes/cc-align.el (c-lineup-after-whitesmith-blocks):
+	New lineup function to get lines after Whitesmith style blocks
 	correctly indented.
 
 	(c-lineup-whitesmith-in-block): Backed out the compensation for
@@ -2170,10 +2498,10 @@
 2005-12-08  Alan Mackenzie  <bug-cc-mode@gnu.org>
 
 	* progmodes/cc-awk.el: Change the terminology of regexps: A char
-	list is now
-	[asdf], a char class [:alpha:].  Include code for char classes.
-	Set c-awk-NL-prop on lines ending in open strings.  (Bug fix.)
-	Add character classes (e.g. "[:alpha:]") into AWK Mode's regexps.
+	list is now [asdf], a char class [:alpha:].  Include code for char
+	classes.  Set c-awk-NL-prop on lines ending in open strings.  (Bug
+	fix.)  Add character classes (e.g. "[:alpha:]") into AWK Mode's
+	regexps.
 
 	Remove (nearly all of) the cruft associated with AWK Mode's former
 	concept of "virtual semicolons":
@@ -2195,7 +2523,7 @@
 	adapted for virtual semicolons.
 
 	* progmodes/cc-engine.el:
-	(c-ws*-string-limit-regexp): new regexp.
+	(c-ws*-string-limit-regexp): New regexp.
 	(c-forward-single-comment, c-backward-single-comment): Comment out
 	the (now redundant) "special" AWK stuff.
 
@@ -2207,9 +2535,8 @@
 
 	* progmodes/cc-fonts.el (c-font-lock-declarations): Always narrow
 	to the fontified region so that fontification doesn't occur
-	outside it
-	(could happen e.g. when fontifying a line with an unfinished
-	declaration).
+	outside it (could happen e.g. when fontifying a line with an
+	unfinished declaration).
 
 2005-12-08  Alan Mackenzie  <bug-cc-mode@gnu.org>
 
@@ -2322,7 +2649,7 @@
 	initialised in c-setup-paragraph-variables, used in string
 	scanning subroutines of c-beginning-of-statement.
 
-	* progmodes/cc-cmds.el (c-electric-brace): don't delete a comment
+	* progmodes/cc-cmds.el (c-electric-brace): Don't delete a comment
 	which precedes the newly inserted `{'.
 
 2005-12-08  Martin Stjernholm  <bug-cc-mode@gnu.org>
@@ -2358,8 +2685,8 @@
 	* progmodes/cc-engine.el (c-guess-basic-syntax): Simplified case
 	16D - can't be a class-close at that point.
 
-	* progmodes/cc-engine.el (c-guess-basic-syntax,
-	c-add-class-syntax): Don't narrow out the enclosing declaration
+	* progmodes/cc-engine.el (c-guess-basic-syntax)
+	(c-add-class-syntax): Don't narrow out the enclosing declaration
 	level.  This makes everything a lot easier, and it was actually
 	only four small places that needed it to work.  Some places that
 	previously did `widen' are removed now, which has the effect that
@@ -2385,7 +2712,7 @@
 
 	* progmodes/cc-langs.el (c-symbol-start): Include `@' in ObjC.
 
-	(c-decl-start-re): No no longer any need for special treatment of
+	(c-decl-start-re): No longer any need for special treatment of
 	ObjC due to the above.
 
 	(c-other-block-decl-kwds): Handle "extern" in ObjC too since it
@@ -2397,8 +2724,8 @@
 
 	(c-opt-identifier-prefix-key): New internal language constant.
 
-	(c-opt-identifier-concat-key, c-opt-after-id-concat-key,
-	c-identifier-start, c-identifier-key): Now completely calculated
+	(c-opt-identifier-concat-key, c-opt-after-id-concat-key)
+	(c-identifier-start, c-identifier-key): Now completely calculated
 	from other constants.
 
 	(c-identifier-last-sym-match): Decommissioned since it's no longer
@@ -2415,10 +2742,10 @@
 	* progmodes/cc-langs.el (c-filter-ops): New helper function to
 	simplify access to `c-operators' and its likes.
 
-	(c-operator-list, c-all-op-syntax-tokens,
-	c-nonsymbol-token-regexp, c-<>-multichar-token-regexp,
-	c-<-op-cont-regexp, c->-op-cont-regexp, c-expr-kwds,
-	c-primary-expr-regexp, c-cast-parens): Use it.
+	(c-operator-list, c-all-op-syntax-tokens)
+	(c-nonsymbol-token-regexp, c-<>-multichar-token-regexp)
+	(c-<-op-cont-regexp, c->-op-cont-regexp, c-expr-kwds)
+	(c-primary-expr-regexp, c-cast-parens): Use it.
 
 	* progmodes/cc-defs.el (c-lang-const): Fixes to allow use without
 	an explicit language in functions.
@@ -2432,8 +2759,8 @@
 	(c-type-decl-prefix-key): Removed some now unnecessary cruft from
 	the Pike value.
 
-	* progmodes/cc-engine.el (c-on-identifier,
-	c-simple-skip-symbol-backward): Small fix for handling "-"
+	* progmodes/cc-engine.el (c-on-identifier)
+	(c-simple-skip-symbol-backward): Small fix for handling "-"
 	correctly in `skip-chars-backward'.  Affected the operator lfun
 	syntax in Pike.
 
@@ -2443,8 +2770,8 @@
 	* progmodes/cc-langs.el (c-paren-nontype-kwds): The GCC keyword
 	"__attribute__" is followed by a parenthesis.
 
-	(c-type-start-kwds, c-prefix-spec-kwds, c-prefix-spec-kwds-re,
-	c-specifier-key, c-not-decl-init-keywords): Some cleanup using new
+	(c-type-start-kwds, c-prefix-spec-kwds, c-prefix-spec-kwds-re)
+	(c-specifier-key, c-not-decl-init-keywords): Some cleanup using new
 	language constants `c-type-start-kwds' and `c-prefix-spec-kwds'.
 
 	* progmodes/cc-fonts.el, cc-langs.el, cc-engine.el: Internal
@@ -2455,12 +2782,12 @@
 	declarations that can start anywhere.  Used for class declarations
 	in Pike.
 
-	(c-specifier-key, c-not-decl-init-keywords,
-	c-decl-prefix-or-start-re, c-find-decl-prefix-search,
-	c-find-decl-spots): Implement `c-decl-start-kwds'.
-
-	(c-other-decl-kwds, c-postfix-decl-spec-kwds, c-decl-hangon-kwds,
-	c-decl-hangon-key, c-forward-decl-or-cast-1): Separated the
+	(c-specifier-key, c-not-decl-init-keywords)
+	(c-decl-prefix-or-start-re, c-find-decl-prefix-search)
+	(c-find-decl-spots): Implement `c-decl-start-kwds'.
+
+	(c-other-decl-kwds, c-postfix-decl-spec-kwds, c-decl-hangon-kwds)
+	(c-decl-hangon-key, c-forward-decl-or-cast-1): Separated the
 	handling of the compiler specific extension keywords into a new
 	language constant `c-decl-hangon-kwds' that defines keyword
 	clauses to be ignored in declarations.
@@ -2470,10 +2797,10 @@
 	Necessary to stop at the declared identifier in e.g. IDL valuetype
 	declarations.
 
-	(c-typedef-decl-kwds, c-typeless-decl-kwds, c-type-list-kwds,
-	c-prefix-spec-kwds-re, c-postfix-spec-kwds,
-	c-after-suffixed-type-decl-key, c-opt-postfix-decl-spec-key,
-	c-forward-decl-or-cast-1): Recognize the declared identifier in
+	(c-typedef-decl-kwds, c-typeless-decl-kwds, c-type-list-kwds)
+	(c-prefix-spec-kwds-re, c-postfix-spec-kwds)
+	(c-after-suffixed-type-decl-key, c-opt-postfix-decl-spec-key)
+	(c-forward-decl-or-cast-1): Recognize the declared identifier in
 	class and enum declarations as such and not as part of the type.
 
 	(c-forward-decl-or-cast-1, c-forward-label): Relaxed the
@@ -2489,24 +2816,24 @@
 	* progmodes/cc-engine.el (c-maybe-labelp): Provide no default
 	value - this variable is always dynamically bound.
 
-	* progmodes/cc-engine.el, cc-fonts.el, cc-langs.el, cc-menus.el,
-	cc-mode.el, cc-styles.el, cc-vars.el, cc-align.el, cc-awk.el,
-	cc-cmds.el, cc-defs.el: Changed the policy for marking up
+	* progmodes/cc-engine.el, cc-fonts.el, cc-langs.el, cc-menus.el
+	* cc-mode.el, cc-styles.el, cc-vars.el, cc-align.el, cc-awk.el
+	* cc-cmds.el, cc-defs.el: Changed the policy for marking up
 	functions that might do hidden buffer changes: All such internal
 	functions are now marked instead of those that don't.
 
-	(c-beginning-of-macro, c-end-of-macro, c-(forward|backward)-comments,
-	c-(forward|backward)-single-comment, c-parse-state, c-on-identifier,
-	c-(fast-|slow-|)in-literal, c-literal-limits, c-collect-line-comments,
-	c-literal-type): Allow these functions to make hidden buffer changes,
+	(c-beginning-of-macro, c-end-of-macro, c-(forward|backward)-comments)
+	(c-(forward|backward)-single-comment, c-parse-state, c-on-identifier)
+	(c-(fast-|slow-|)in-literal, c-literal-limits, c-collect-line-comments)
+	(c-literal-type): Allow these functions to make hidden buffer changes,
 	so that they are free to use text property caching later on.
 
-	(c-electric-backspace, c-electric-delete-forward, c-electric-pound,
-	c-electric-brace, c-electric-slash, c-electric-star,
-	c-electric-semi&comma, c-electric-colon, c-electric-lt-gt,
-	c-electric-paren, c-electric-continued-statement, c-indent-command,
-	c-indent-region, c-mask-paragraph, c-indent-new-comment-line,
-	c-context-line-break): Added `c-save-buffer-state' calls to comply
+	(c-electric-backspace, c-electric-delete-forward, c-electric-pound)
+	(c-electric-brace, c-electric-slash, c-electric-star)
+	(c-electric-semi&comma, c-electric-colon, c-electric-lt-gt)
+	(c-electric-paren, c-electric-continued-statement, c-indent-command)
+	(c-indent-region, c-mask-paragraph, c-indent-new-comment-line)
+	(c-context-line-break): Added `c-save-buffer-state' calls to comply
 	with the changed semantics of the functions above.
 
 	* progmodes/cc-engine.el (c-beginning-of-statement-1): Fixed a bug
@@ -2521,10 +2848,10 @@
 	(completed statement) with `}' (statement completed by closing
 	brace or semicolon) and `$' (statement completed by EOL).
 
-	(c-awk-virtual-semicolon-ends-prev-line-p,
-	c-awk-virtual-semicolon-ends-line-p,
-	c-awk-skip-semantic-ws-forward, c-awk-skip-semantic-ws-backward,
-	c-awk-at-statement-end-p): new functions
+	(c-awk-virtual-semicolon-ends-prev-line-p)
+	(c-awk-virtual-semicolon-ends-line-p)
+	(c-awk-skip-semantic-ws-forward, c-awk-skip-semantic-ws-backward)
+	(c-awk-at-statement-end-p): New functions.
 
 	* progmodes/cc-cmds.el: Simplify the structure of functions
 	c-forward-over-illiterals, c-back-over-illiterals.  Enhance these
@@ -2596,8 +2923,8 @@
 	* progmodes/cc-align.el (c-lineup-arglist): Fixed bug when the
 	first argument starts with a special brace list.
 
-	* progmodes/cc-engine.el, cc-fonts.el (c-forward-decl-or-cast-1,
-	c-font-lock-declarations): Broke out the declaration and cast
+	* progmodes/cc-engine.el, cc-fonts.el (c-forward-decl-or-cast-1)
+	(c-font-lock-declarations): Broke out the declaration and cast
 	recognition from `c-font-lock-declarations' to a new function, so
 	that it can be used in the indentation engine.
 
@@ -2606,16 +2933,16 @@
 	wrong side of the search limit that could happen when the start
 	position is inside a literal.
 
-	* progmodes/cc-engine.el (c-parse-state,
-	c-invalidate-state-cache): Modified the use of `c-state-cache-end'
+	* progmodes/cc-engine.el (c-parse-state)
+	(c-invalidate-state-cache): Modified the use of `c-state-cache-end'
 	so that it's kept a little bit back to increase the hit rate.
 
 	(c-parse-state): Changed the macro handling and fixed some
 	glitches.  Macro context is checked more often than necessary now,
 	but otoh less garbage conses are generated.
 
-	* progmodes/cc-engine.el (c-parse-state,
-	c-invalidate-state-cache): Cache the last position where
+	* progmodes/cc-engine.el (c-parse-state)
+	(c-invalidate-state-cache): Cache the last position where
 	`c-state-cache' applies.  This can speed up refontification quite
 	a bit in blocks where there are many non-brace parens before the
 	point.
@@ -2640,8 +2967,8 @@
 	* progmodes/cc-engine.el (c-add-stmt-syntax): Narrowed down the
 	special case for "else if" clauses.
 
-	* progmodes/cc-engine.el (c-looking-at-inexpr-block,
-	c-add-stmt-syntax): Use `c-recognize-paren-inexpr-blocks'.
+	* progmodes/cc-engine.el (c-looking-at-inexpr-block)
+	(c-add-stmt-syntax): Use `c-recognize-paren-inexpr-blocks'.
 
 	* progmodes/cc-langs.el (c-recognize-paren-inexpr-blocks): New
 	language variable to recognize the gcc extension with statement
@@ -2658,8 +2985,8 @@
 	`c-beginning-of-statement-1' instead of duplicating parts of it.
 	This fixes bogus label recognition.
 
-	* progmodes/cc-engine.el (c-add-type, c-check-type,
-	c-forward-name, c-forward-type): Improved storage of template
+	* progmodes/cc-engine.el (c-add-type, c-check-type)
+	(c-forward-name, c-forward-type): Improved storage of template
 	types in `c-found-types' so that they can be recognized better.
 
 	(c-syntactic-content): Added option to skip past nested parens.
@@ -2672,8 +2999,8 @@
 	(c-forward-type): Handle that `c-last-identifier-range' might be
 	nil from `c-forward-name'.
 
-	* progmodes/cc-defs.el: (c-safe-scan-lists,
-	c-(go-)?(up|down)-list-(forward|backward)): Added limit arguments.
+	* progmodes/cc-defs.el (c-safe-scan-lists)
+	(c-(go-)?(up|down)-list-(forward|backward)): Added limit arguments.
 
 	* progmodes/cc-defs.el (c-save-buffer-state): Use `unwind-protect'
 	to work even if the form fails.
@@ -2705,20 +3032,20 @@
 	* progmodes/cc-langs.el (c-unterminated-block-comment-regexp):
 	Fixed a bug in the regexp that caused extreme backtracking.
 
-	* progmodes/cc-langs.el (c-block-comment-starter,
-	c-block-comment-ender): New language constants to specify in a
+	* progmodes/cc-langs.el (c-block-comment-starter)
+	(c-block-comment-ender): New language constants to specify in a
 	single place how block comments look.
 
-	(c-comment-start-regexp, c-block-comment-start-regexp,
-	comment-start, comment-end, comment-start-skip,
-	c-syntactic-ws-start, c-syntactic-ws-end, c-nonwhite-syntactic-ws,
-	c-syntactic-ws, c-nonempty-syntactic-ws,
-	c-single-line-syntactic-ws, c-syntactic-eol): Now built from
+	(c-comment-start-regexp, c-block-comment-start-regexp)
+	(comment-start, comment-end, comment-start-skip)
+	(c-syntactic-ws-start, c-syntactic-ws-end, c-nonwhite-syntactic-ws)
+	(c-syntactic-ws, c-nonempty-syntactic-ws)
+	(c-single-line-syntactic-ws, c-syntactic-eol): Now built from
 	`c-line-comment-starter', `c-block-comment-starter' and
 	`c-block-comment-ender'.
 
-	(c-block-comment-regexp, c-unterminated-block-comment-regexp): New
-	language constants to break up things a bit.
+	(c-block-comment-regexp, c-unterminated-block-comment-regexp):
+	New language constants to break up things a bit.
 
 	(c-simple-ws): New language constant for simple whitespace.
 
@@ -2910,14 +3237,13 @@
 2005-12-08  Martin Stjernholm  <bug-cc-mode@gnu.org>
 
 	* progmodes/cc-defs.el, cc-engine.el (c-mode-is-new-awk-p):
-	Removed;
-	(c-major-mode-is 'awk-mode) can be used instead now.
+	Removed; (c-major-mode-is 'awk-mode) can be used instead now.
 
 	* progmodes/cc-mode.el: Always set up AWK mode since emacsen where
 	it doesn't work no longer are supported.
 
-	* progmodes/cc-mode.el, cc-styles.el, cc-vars.el, cc-defs.el,
-	cc-engine.el, cc-fonts.el, cc-langs.el, cc-cmds.el: CC Mode now
+	* progmodes/cc-mode.el, cc-styles.el, cc-vars.el, cc-defs.el
+	* cc-engine.el, cc-fonts.el, cc-langs.el, cc-cmds.el: CC Mode now
 	requires support for the syntax-table' text property, which rules
 	out Emacs 19 and XEmacs < 21.4.  Removed various compatibility
 	cruft associated with those versions.
@@ -2934,9 +3260,9 @@
 	variable and use an extra quoted face name instead.  All the
 	emacsen flavors handle that correctly.
 
-	* progmodes/cc-fonts.el (c-font-lock-complex-decl-prepare,
-	c-font-lock-declarators, c-font-lock-declarations,
-	c-complex-decl-matchers, c-basic-matchers-after): Use a text
+	* progmodes/cc-fonts.el (c-font-lock-complex-decl-prepare)
+	(c-font-lock-declarators, c-font-lock-declarations)
+	(c-complex-decl-matchers, c-basic-matchers-after): Use a text
 	property to mark the items in in declarator lists to handle
 	refontification inside multiline declarations better.
 
@@ -3000,7 +3326,7 @@
 
 2005-12-07  Bill Wohler  <wohler@newt.com>
 
-	* files.el (auto-mode-alist): Remove mh-letter-mode. Unnecessary,
+	* files.el (auto-mode-alist): Remove mh-letter-mode.  Unnecessary,
 	and causes problems with non-MH users (such as Gnus users).
 
 2005-12-08  Nick Roberts  <nickrob@snap.net.nz>
@@ -3017,12 +3343,12 @@
 
 2005-12-07  Kim F. Storm  <storm@cua.dk>
 
-	* ido.el (ido-completion-map): Renamed from ido-mode-map.
+	* ido.el (ido-completion-map): Rename from ido-mode-map.
 	(ido-common-completion-map, ido-file-completion-map)
 	(ido-file-dir-completion-map, ido-buffer-completion-map):
-	Renamed from ido-mode-....-map.
-	(ido-init-completion-maps): Renamed from ido-init-mode-maps.
-	(ido-setup-completion-map): Renamed from ido-define-mode-map.
+	Rename from ido-mode-....-map.
+	(ido-init-completion-maps): Rename from ido-init-mode-maps.
+	(ido-setup-completion-map): Rename from ido-define-mode-map.
 	(ido-read-internal): Bind minibuffer-local-filename-completion-map
 	to ido-completion-map.
 
@@ -3076,7 +3402,7 @@
 
 	* progmodes/cc-defs.el (c-emacs-features): Don't assume point-min==1.
 
-2005-12-06  Nozomu Ando <nand@mac.com>  (tiny patch)
+2005-12-06  Nozomu Ando  <nand@mac.com>  (tiny patch)
 
 	* mail/smtpmail.el (smtpmail-try-auth-methods): Make password
 	prompts work for AUTH PLAIN.  Also reported by Steve Allan
@@ -3115,7 +3441,7 @@
 	(org-agenda-get-deadlines, org-agenda-get-scheduled)
 	(org-agenda-get-blocks): Use `org-get-category'.
 	(org-context-in-file-links): Rename from
-	`org-line-numbers-in-file-links' .
+	`org-line-numbers-in-file-links'.
 
 2005-12-06  Romain Francoise  <romain@orebokech.com>
 
@@ -3259,7 +3585,7 @@
 
 2005-12-02  Ken Manheimer  <ken.manheimer@gmail.com>
 
-	* allout.el:(eval-when-compile): Remove unnecessary load of cl.
+	* allout.el (eval-when-compile): Remove unnecessary load of cl.
 	Add fset of allout-real-isearch-abort during compile to fix
 	byte-compilation warnings.
 	(allout-mode-p): Move definition of this macro above all uses, or
@@ -3669,8 +3995,8 @@
 
 	(hi-lock-face-phrase-buffer): Call hi-lock-buffer-mode.  Use new
 	arguments for hi-lock-set-pattern.
-	(hi-lock-unface-buffer, hi-lock-set-file-patterns): Call
-	font-lock-fontify-buffer.
+	(hi-lock-unface-buffer, hi-lock-set-file-patterns):
+	Call font-lock-fontify-buffer.
 	(hi-lock-find-file-hook, hi-lock-current-line)
 	(hi-lock-refontify, hi-lock-set-patterns): Delete unused functions.
 
@@ -3699,8 +4025,8 @@
 	(org-plain-list-ordered-item-terminator): New options.
 	(org-at-item-p, org-beginning-of-item, org-end-of-item)
 	(org-get-indentation, org-get-string-indentation)
-	(org-maybe-renumber-ordered-list, org-renumber-ordered-list): New
-	functions.
+	(org-maybe-renumber-ordered-list, org-renumber-ordered-list):
+	New functions.
 	(org-move-item-down, org-move-item-up): New commands.
 	(org-export-as-html): New classes for CSS support.  Bug fix in
 	regular expression detecting fixed-width regions.  Respect
@@ -3884,7 +4210,7 @@
 	* man.el (Man-highlight-references): Doc fix.  Reformat code in a
 	more Lisp-ish way.
 
-2005-11-19  Slawomir Nowaczyk  <slawomir.nowaczyk.847@student.lu.se> (tiny change)
+2005-11-19  Slawomir Nowaczyk  <slawomir.nowaczyk.847@student.lu.se>  (tiny change)
 
 	* ls-lisp.el (ls-lisp-format-file-size): Format file size with 9
 	digits, not 8, to avoid misalignment for files larger than 100MB.
@@ -3914,15 +4240,15 @@
 	(org-export-icalendar): Use `org-icalendar-combined-name'.
 	(org-cycle-agenda-files, org-agenda-file-to-end)
 	(org-agenda-file-to-front): New commands.
-	(org-table-tab-jumps-over-hlines,org-export-html-style): New
-	options.
+	(org-table-tab-jumps-over-hlines, org-export-html-style):
+	New options.
 	(org-table-next-field): Use `org-table-tab-jumps-over-hlines'.
-	(org-at-table.el-p, org-set-autofill-regexps,org-html-protect):
+	(org-at-table.el-p, org-set-autofill-regexps, org-html-protect):
 	New functions.
 	(org-fill-paragraph): Call `org-table-align' in tables.
 	(org-mode): Call `org-set-autofill-regexps'.
 	(org-export-as-html): Support for local handformatted lists.
-	Modified to produce valid HTML 4.0. Use `org-export-html-style'.
+	Modified to produce valid HTML 4.0.  Use `org-export-html-style'.
 	(org-export-local-list-max-depth): New option.
 	(org-html-expand): Use `org-html-protect'.
 
@@ -4370,9 +4696,9 @@
 	(apropos-variable): Doc fix.  Use apropos-read-pattern.
 	(apropos-command): Doc fix.  Use apropos-read-pattern and
 	apropos-parse-pattern.  Call apropos-print with nosubst=t.
-	(apropos, apropos-value): Doc fix. Use apropos-read-pattern and
+	(apropos, apropos-value): Doc fix.  Use apropos-read-pattern and
 	apropos-parse-pattern.
-	(apropos-documentation): Doc fix. Use apropos-read-pattern and
+	(apropos-documentation): Doc fix.  Use apropos-read-pattern and
 	apropos-parse-pattern.  Locally bind apropos-sort-by-scores to
 	apropos-documentation-sort-by-scores.  Call apropos-print with
 	nosubst=t.
@@ -4440,7 +4766,7 @@
 2005-11-10  Masatake YAMATO  <jet@gyve.org>
 
 	* add-log.el (add-log-current-defun): Handle class::method
-	notation of c++. Fix incorrect comment.
+	notation of c++.  Fix incorrect comment.
 
 2005-11-10  Alan Mackenzie  <acm@muc.de>
 
@@ -4574,7 +4900,7 @@
 
 	* replace.el (occur-engine): Add marker at end of line, too.
 
-2005-11-04 Ken Manheimer  <ken.manheimer@gmail.com>
+2005-11-04  Ken Manheimer  <ken.manheimer@gmail.com>
 
 	* pgg-pgp.el (pgg-pgp-encrypt-region, pgg-pgp-decrypt-region)
 	(pgg-pgp-encrypt-symmetric-region, pgg-pgp-encrypt-symmetric)
@@ -4599,7 +4925,7 @@
 	* font-lock.el: Don't deal with font-lock-face-attributes here,
 	move the code ...
 
-	* startup.el (command-line): ... here. Use face-spec-set instead
+	* startup.el (command-line): ... here.  Use face-spec-set instead
 	of custom-declare-face.
 
 	* faces.el (face-spec-set): Reset the face if spec is not nil.
@@ -4616,7 +4942,7 @@
 
 2005-11-04  Ulf Jasper  <ulf.jasper@web.de>
 
-	* newsticker.el: Commentary updated. Code formatting changed.
+	* newsticker.el: Commentary updated.  Code formatting changed.
 	(newsticker-version): Change to "1.9".
 	(newsticker, newsticker-feed): Doc fix.
 	(newsticker-url-list): Doc fix.  Add option "Weekly".
@@ -4636,7 +4962,7 @@
 	(newsticker-mode): Doc fix.
 	(newsticker-mode): Change mode-line-format.
 	(newsticker-start): Remove debug output.
-	(newsticker-start-ticker): Doc fix.  Add Autoload cookie.
+	(newsticker-start-ticker): Doc fix.  Add autoload cookie.
 	(newsticker-w3m-show-inline-images): Code formatting.
 	(newsticker-next-item): Call `force-mode-line-update'.
 	(newsticker-previous-item): Call `force-mode-line-update'.
@@ -4789,8 +5115,8 @@
 2005-11-04  Henrik Enberg  <henrik.enberg@telia.com>
 
 	(rcirc-browse-url-map, rcirc-browse-url-at-point)
-	(rcirc-browse-url-at-mouse, rcirc-mangle-text): Make urls
-	mouse and RET clickable.
+	(rcirc-browse-url-at-mouse, rcirc-mangle-text):
+	Make urls mouse and RET clickable.
 
 2005-11-04  Henrik Enberg  <henrik.enberg@telia.com>
 
@@ -4941,7 +5267,7 @@
 	* progmodes/fortran.el (fortran-blink-match):
 	Use `blink-matching-delay'.
 
-2005-11-02  John Mongan <jmongan@mccammon.ucsd.edu>  (tiny change)
+2005-11-02  John Mongan  <jmongan@mccammon.ucsd.edu>  (tiny change)
 
 	* progmodes/f90.el (f90-match-end): Use `blink-matching-delay'.
 
@@ -4981,7 +5307,7 @@
 	* vc-sccs.el: Update copyright year.
 	* ezimage.el: Likewise.
 
-2005-11-01  KOBAYASHI Yasuhiro <kobayays@otsukakj.co.jp>  (tiny change)
+2005-11-01  KOBAYASHI Yasuhiro  <kobayays@otsukakj.co.jp>  (tiny change)
 
 	* info.el (Info-fontify-node): Use `string-width' for fontifying
 	underlined titles.
@@ -5212,7 +5538,7 @@
 	* pgg.el (pgg-encrypt-region, pgg-encrypt-symmetric-region)
 	(pgg-encrypt-symmetric, pgg-encrypt, pgg-decrypt-region)
 	(pgg-decrypt, pgg-sign-region, pgg-sign): Add optional
-	'passphrase' argument, so the passphrase can be managed externally
+	`passphrase' argument, so the passphrase can be managed externally
 	and then passed in to the system.
 
 	* pgg.el (pgg-read-passphrase, pgg-add-passphrase-cache)
@@ -5228,7 +5554,7 @@
 	externally and passed in to the system.
 
 	* pgg-gpg.el (pgg-gpg-possibly-cache-passphrase): Add optional
-	'notruncate' argument, so the passphrase cache can be used
+	`notruncate' argument, so the passphrase cache can be used
 	reliably with identifiers besides a pgp packet's key id.
 
 2005-10-29  Sascha Wilde  <swilde@sha-bang.de>
@@ -5295,12 +5621,12 @@
 	(pgg-decrypt): Convey provided passphrase in subordinate call to
 	pgg-decrypt-region.
 
-2005-10-20  Ken Manheimer <ken.manheimer+emacs@gmail.com>
+2005-10-20  Ken Manheimer  <ken.manheimer+emacs@gmail.com>
 
 	* pgg.el (pgg-encrypt-region, pgg-encrypt-symmetric-region)
 	(pgg-encrypt-symmetric, pgg-encrypt, pgg-decrypt-region)
 	(pgg-decrypt, pgg-sign-region, pgg-sign): Add optional
-	'passphrase' argument, so the passphrase can be managed externally
+	`passphrase' argument, so the passphrase can be managed externally
 	and then passed in to the system.
 
 	* pgg.el (pgg-read-passphrase, pgg-add-passphrase-cache)
@@ -5316,7 +5642,7 @@
 	externally and passed in to the system.
 
 	* pgg-gpg.el (pgg-gpg-possibly-cache-passphrase): Add optional
-	'notruncate' argument, so the passphrase cache can be used
+	`notruncate' argument, so the passphrase cache can be used
 	reliably with identifiers besides a pgp packet's key id.
 
 2005-10-29  Sascha Wilde  <swilde@sha-bang.de>
@@ -5333,7 +5659,7 @@
 
 2005-10-28  Bill Wohler  <wohler@newt.com>
 
-	* help-mode.el (help-url): New button type. Calls browse-url.
+	* help-mode.el (help-url): New button type.  Calls browse-url.
 	(help-xref-url-regexp): New regexp to recognize URLs in docstring.
 	Similar to Info nodes: URL `url'.
 	(help-make-xrefs): Create help-url buttons for
@@ -5392,7 +5718,7 @@
 	* calc/calc-arith.el (calc-mul-symb-fancy): Add checks for
 	multiplication by an identity matrix; don't turn multiplication by
 	an inverse matrix into division.
-	(math-div-symbol-fancy):  Replace division by matrices with
+	(math-div-symbol-fancy): Replace division by matrices with
 	multiplication by inverse.
 
 	* calc/calc-misc.el (calcFunc-inv): Check for symbolic matrices.
@@ -5525,7 +5851,7 @@
 	* progmodes/gdb-ui.el (gdb-ann3): Bind mouse-3 in left fringe
 	to gdb-mouse-toggle-breakpoint-fringe.
 	(gdb-mouse-toggle-breakpoint-margin): Rename from
-	gdb-mouse-toggle-breakpoint. Fix doc.
+	gdb-mouse-toggle-breakpoint.  Fix doc.
 	(gdb-mouse-toggle-breakpoint-fringe): New defun.
 	(gdb-put-string): Add optional SPROPS arg.  Add props to string.
 	(gdb-put-breakpoint-icon): Add gdb-bptno and gdb-enabled
@@ -5769,7 +6095,7 @@
 	(outlineify-sticky, outlinify-sticky): Add autoload cookie.
 	(my-mark-marker): Use `(featurep 'xemacs)'.
 
-2005-10-23  Lars Hansen <larsh@soem.dk>
+2005-10-23  Lars Hansen  <larsh@soem.dk>
 
 	* emacs-lisp/bytecomp.el (byte-compile-lambda): New arg add-lambda.
 	(byte-compile-file-form-defmumble, byte-compile-defun)
@@ -6057,7 +6383,7 @@
 
 	* calc/calc-units.el (math-standard-units): Add units, adjust
 	symbols and update values.
-	(math-unit-prefixes):  Add more prefixes.
+	(math-unit-prefixes): Add more prefixes.
 
 2005-10-19  Romain Francoise  <romain@orebokech.com>
 
@@ -6136,12 +6462,12 @@
 	lisp/toolbar/tool-bar to lisp and "delete" lisp/toolbar.  Place
 	the low resolution images in their own directory (low-color).
 
-	* toolbar/attach.*, toolbar/cancel.*, toolbar/close.*,
-	* toolbar/copy.*, toolbar/cut.*, toolbar/diropen.*, toolbar/exit.*:
-	* toolbar/help.*, toolbar/home.*, toolbar/index.*, toolbar/info.*:
-	* toolbar/mail.*, toolbar/new.*, toolbar/open.*, toolbar/paste.*:
-	* toolbar/preferences.*, toolbar/print.*, toolbar/save.*:
-	* toolbar/saveas.*, toolbar/search.*, toolbar/search-replace.*:
+	* toolbar/attach.*, toolbar/cancel.*, toolbar/close.*
+	* toolbar/copy.*, toolbar/cut.*, toolbar/diropen.*, toolbar/exit.*
+	* toolbar/help.*, toolbar/home.*, toolbar/index.*, toolbar/info.*
+	* toolbar/mail.*, toolbar/new.*, toolbar/open.*, toolbar/paste.*
+	* toolbar/preferences.*, toolbar/print.*, toolbar/save.*
+	* toolbar/saveas.*, toolbar/search.*, toolbar/search-replace.*
 	* toolbar/spell.*, toolbar/undo.*: Move to etc/images.
 
 	* toolbar/lc-copy.*: Move to etc/images/low-color/copy.*.
@@ -6241,7 +6567,7 @@
 
 	* diff-mode.el (diff-mode): Doc fix.
 
-2005-10-16  David Reitter <david.reitter@gmail.com>
+2005-10-16  David Reitter  <david.reitter@gmail.com>
 
 	* mail/sendmail.el (send-mail-function): Use mailclient-send-it
 	as default on darwin and windows systems.
@@ -6433,8 +6759,8 @@
 
 2005-10-12  Bill Wohler  <wohler@newt.com>
 
-	* makefile.w32-in (MH-E-SRC): New. Used by mh-autoloads.
-	(mh-autoloads): New. Builds mh-e/mh-loaddefs.el. Rebuilds if any
+	* makefile.w32-in (MH-E-SRC): New.  Used by mh-autoloads.
+	(mh-autoloads): New.  Builds mh-e/mh-loaddefs.el.  Rebuilds if any
 	files in MH-E-SRC have been updated.
 	(updates, compile, recompile, bootstrap): Depend on mh-autoloads.
 
@@ -7073,7 +7399,7 @@
 
 	* toolbar/rescan.*: Move and rename to etc/images/refresh.*.
 
-2005-09-30  Eric M. Ludlam <zappo@gnu.org>
+2005-09-30  Eric M. Ludlam  <zappo@gnu.org>
 
 	* speedbar.el: New version 1.0pre3.
 
@@ -7275,7 +7601,7 @@
 	color rxvt terminals by using the code xterm.el used to use before
 	2005-04-09 in order to match the colors used by rxvt.
 
-2005-09-24  Emanuele Giaquinta <emanuele.giaquinta@gmail.com>  (tiny change)
+2005-09-24  Emanuele Giaquinta  <emanuele.giaquinta@gmail.com>  (tiny change)
 
 	* term/rxvt.el (rxvt-register-default-colors): Add support for 88
 	colors rxvt-unicode terminals by using the same code as xterm.el.
@@ -8058,7 +8384,7 @@
 2005-09-02  Dan Nicolaescu  <dann@ics.uci.edu>
 
 	* term/xterm.el (terminal-init-xterm): Add eval-when-compile to
-	fix compilation warning. Reorder the key definitions to group
+	fix compilation warning.  Reorder the key definitions to group
 	together keys emitted by the current version of xterm.
 
 	* progmodes/vhdl-mode.el (vhdl-highlight-faces)
@@ -8140,7 +8466,7 @@
 	(vhdl-get-visible-signals): Fix signal name searching.
 	(vhdl-port-flatten, vhdl-port-reverse-direction): Better message.
 	(vhdl-fixup-whitespace-region): Fix for character
-	literals (e.g. ':').
+	literals (e.g. `:').
 
 2005-08-31  Juanma Barranquero  <lekktu@gmail.com>
 
@@ -8933,7 +9259,7 @@
 2005-08-10  Lars Hansen  <larsh@soem.dk>
 
 	* desktop.el (desktop-buffer-mode-handlers):
-	Make non-customizable. Add autoload cookie.  Change initial value to
+	Make non-customizable.  Add autoload cookie.  Change initial value to
 	nil; add elements in respective modules instead.  Fix doc string.
 	(desktop-load-file): New function.
 	(desktop-minor-mode-handlers): New autoloaded variable.
@@ -8949,7 +9275,7 @@
 	indicate-buffer-boundaries, indicate-empty-lines and
 	show-trailing-whitespace.
 	(desktop-clear): Allow desktop-clear-preserve-buffers to contain
-	regexps. Don't use desktop-clear-preserve-buffers-regexp.
+	regexps.  Don't use desktop-clear-preserve-buffers-regexp.
 	(desktop-clear-preserve-buffers-regexp): Delete.
 	(desktop-clear-preserve-buffers): Update initial value and docstring.
 	(desktop-save-buffer): Fix doc string.
@@ -9575,7 +9901,7 @@
 	not `bookmark-exit-hooks'.  Fix docstring.
 	(bookmark-bmenu-select): "?\ " -> "?\s".
 
-2005-07-25  Ari Roponen <arjuropo@cc.jyu.fi>  (tiny change)
+2005-07-25  Ari Roponen  <arjuropo@cc.jyu.fi>  (tiny change)
 
 	* startup.el (command-line): Fix typo.
 
@@ -9624,7 +9950,7 @@
 	(xterm-rxvt-set-background-mode): Remove, not used anymore.
 
 	* term/rxvt.el (function-key-map): Use substitute-key-definition
-	to bind {C,S,C-S}-{f1-f10}. Add a few missing key bindings.
+	to bind {C,S,C-S}-{f1-f10}.  Add a few missing key bindings.
 
 	* term/cygwin.el: New file.
 
@@ -10338,7 +10664,7 @@
 	(mac-services-mail-to): New functions.
 	(mac-application-menu-map): Bind them.
 
-2005-07-12  wulei <milton@wulei.net>  (tiny change)
+2005-07-12  wulei  <milton@wulei.net>  (tiny change)
 
 	* progmodes/gdb-ui.el: Add note about buffering with Windows.
 
@@ -12611,7 +12937,7 @@
 
 	* textmodes/ispell.el (ispell-check-version):
 	Use match-string-no-properties.
-	(ispell-region,	ispell-buffer-local-parsing, ispell-buffer-local-dict)
+	(ispell-region, ispell-buffer-local-parsing, ispell-buffer-local-dict)
 	(ispell-buffer-local-words): Likewise.
 
 	* progmodes/make-mode.el (makefile-shell-face): Make this a no-op
@@ -14811,12 +15137,12 @@
 	with mode-require-final-newline.
 	(mode-require-final-newline): Doc fix.
 
-2005-05-01  Stefan Monnier <monnier@iro.umontreal.ca>
+2005-05-01  Stefan Monnier  <monnier@iro.umontreal.ca>
 
 	* international/latexenc.el (latexenc-find-file-coding-system):
 	Fix regular expressions.
 
-2005-05-01  David Kastrup <dak@gnu.org>
+2005-05-01  David Kastrup  <dak@gnu.org>
 
 	* international/latexenc.el (latexenc-find-file-coding-system):
 	Fix regular expressions.
@@ -14883,7 +15209,7 @@
 	(org-prefix-format-compiled): New variable.
 	(org-compile-prefix-format): New function.
 	(org-timeline, org-agenda, org-diary): Call org-compile-prefix-format.
-	(org-agenda-prefix-format,org-timeline-prefix-format): New options.
+	(org-agenda-prefix-format, org-timeline-prefix-format): New options.
 	(org-agenda-get-scheduled): Check if file is opened in `org-mode'.
 	(org-get-entries-from-diary): Use `org-get-time-of-day' for
 	consistency with entries from `org-mode' files.
@@ -15494,7 +15820,7 @@
 	(org-mode): Insert first line "*-* mode: org-mode -*-" when called
 	interactively in empty file and option
 	`org-insert-mode-line-in-empty-file' has been set.
-	(org-agenda-todo,org-agenda-priority): Modify to use
+	(org-agenda-todo, org-agenda-priority): Modify to use
 	`org-agenda-change-all-lines'.
 	(org-warning-face): Change color on dark background
 
@@ -16641,16 +16967,16 @@
 
 2005-03-25  Werner Lemberg  <wl@gnu.org>
 
-	* calc/calc-forms.el, calc/calc-sel.el:
-	* midnight.el, vc-cvs.el:
-	* emacs-lisp/cl-macs.el:
-	* emulation/vip.el:
-	* eshell/esh-io.el, eshell/esh-var.el:
-	* mail/supercite.el:
+	* calc/calc-forms.el, calc/calc-sel.el
+	* midnight.el, vc-cvs.el
+	* emacs-lisp/cl-macs.el
+	* emulation/vip.el
+	* eshell/esh-io.el, eshell/esh-var.el
+	* mail/supercite.el
 	* progmodes/ebnf-abn.el, progmodes/ebnf-bnf.el
 	* progmodes/ebnf-ebx.el, progmodes/ebnf-dtd.el, progmodes/ebnf-iso.el
 	* progmodes/ebnf-yac.el, progmodes/ebnf2ps.el, progmodes/idlwave.el
-	* progmodes/sh-script.el, progmodes/xscheme.el:
+	* progmodes/sh-script.el, progmodes/xscheme.el
 	* textmodes/refbib.el, textmodes/refer.el, textmodes/reftex-cite.el
 	* textmodes/reftex-index.el, textmodes/reftex-parse.el
 	* textmodes/reftex-ref.el, textmodes/reftex-vars.el
@@ -16767,7 +17093,7 @@
 
 2005-03-23  David Ponce  <david@dponce.com>
 
-	* recentf.el: (recentf-keep): New option.
+	* recentf.el (recentf-keep): New option.
 	(recentf-menu-action): Default to `find-file'.
 	(recentf-keep-non-readable-files-flag)
 	(recentf-keep-non-readable-files-p)
@@ -17966,9 +18292,9 @@
 2005-02-19  Michael Kifer  <kifer@cs.stonybrook.edu>
 
 	* ediff.el (ediff-set-diff-overlays-in-one-buffer)
-	(ediff-set-fine-overlays-in-one-buffer,ediff-goto-word): Make sure
+	(ediff-set-fine-overlays-in-one-buffer, ediff-goto-word): Make sure
 	we use the syntax table of the correct buffer.
-	(ediff-same-file-contents,ediff-same-contents): Enhancements thanks to
+	(ediff-same-file-contents, ediff-same-contents): Enhancements thanks to
 	Felix Gatzemeier.
 
 	* ediff-init.el (ediff-hide-face): Check for definedness of functions.
@@ -18842,7 +19168,7 @@
 	(rmail-movemail-variant-in-use): New variables.
 	(rmail-remote-password, rmail-remote-password-required):
 	New customization variables.
-	(rmail-probe,rmail-autodetect, rmail-movemail-variant-p): New funs.
+	(rmail-probe, rmail-autodetect, rmail-movemail-variant-p): New funs.
 	(rmail-parse-url): New function.
 	(rmail-get-new-mail, rmail-insert-inbox-text): Update for use
 	with GNU mailutils movemail.
--- a/lisp/ChangeLog.10	Tue Jan 24 02:01:42 2006 +0000
+++ b/lisp/ChangeLog.10	Wed Jan 25 07:10:04 2006 +0000
@@ -19133,6 +19133,10 @@
 
 	* menu-bar.el (menu-bar-showhide-menu): Rename functions for toggling.
 
+2002-02-10  Stephen J. Turnbull  <stephen@xemacs.org>
+
+	* ediff-init.el (ediff-has-gutter-support): What was this?
+
 2002-02-10  Michael Kifer  <kifer@cs.stonybrook.edu>
 
 	* viper-util.el (viper-read-key-sequence): Fix so it'll read
@@ -19142,8 +19146,6 @@
 	* viper.el (describe-key, describe-key-briefly): Get rid of
 	viper-events-to-keys.
 
-	* ediff-init.el (ediff-has-gutter-support): Steven Turnbull's patch.
-
 	* ediff-wind.el (ediff-setup-control-frame):
 	Use ediff-has-gutter-support.
 
--- a/lisp/battery.el	Tue Jan 24 02:01:42 2006 +0000
+++ b/lisp/battery.el	Wed Jan 25 07:10:04 2006 +0000
@@ -271,6 +271,8 @@
 %h Remaining time in hours
 %t Remaining time in the form `h:min'"
   (let ((design-capacity 0)
+	(last-full-capacity 0)
+	full-capacity
 	(warn 0)
 	(low 0)
 	capacity rate rate-type charging-state minutes hours)
@@ -310,18 +312,25 @@
 	  (when (re-search-forward "design capacity: +\\([0-9]+\\) m[AW]h$"
 				   nil t)
 	    (incf design-capacity (string-to-number (match-string 1))))
+	  (when (re-search-forward "last full capacity: +\\([0-9]+\\) m[AW]h$"
+				   nil t)
+	    (incf last-full-capacity (string-to-number (match-string 1))))
 	  (when (re-search-forward
 		 "design capacity warning: +\\([0-9]+\\) m[AW]h$" nil t)
 	    (incf warn (string-to-number (match-string 1))))
 	  (when (re-search-forward "design capacity low: +\\([0-9]+\\) m[AW]h$"
 				   nil t)
 	    (incf low (string-to-number (match-string 1)))))))
+    (setq full-capacity (if (> last-full-capacity 0)
+			    last-full-capacity design-capacity))
     (and capacity rate
 	 (setq minutes (if (zerop rate) 0
 			 (floor (* (/ (float (if (string= charging-state
 							  "charging")
-						 (- design-capacity capacity)
-					       capacity)) rate) 60)))
+						 (- full-capacity capacity)
+					       capacity))
+				      rate)
+				   60)))
 	       hours (/ minutes 60)))
     (list (cons ?c (or (and capacity (number-to-string capacity)) "N/A"))
 	  (cons ?L (or (when (file-exists-p "/proc/acpi/ac_adapter/AC/state")
@@ -368,10 +377,10 @@
 	  (cons ?t (or (and minutes
 			    (format "%d:%02d" hours (- minutes (* 60 hours))))
 		       "N/A"))
-	  (cons ?p (or (and design-capacity capacity
+	  (cons ?p (or (and full-capacity capacity
 			    (number-to-string
 			     (floor (/ capacity
-				       (/ (float design-capacity) 100)))))
+				       (/ (float full-capacity) 100)))))
 		       "N/A")))))
 
 
--- a/lisp/calc/calc-arith.el	Tue Jan 24 02:01:42 2006 +0000
+++ b/lisp/calc/calc-arith.el	Wed Jan 25 07:10:04 2006 +0000
@@ -1201,7 +1201,7 @@
 	       (and (math-known-scalarp b)
 		    (math-add (nth 1 a) b))))
       (and (eq (car-safe b) 'calcFunc-idn)
-	   (= (length a) 2)
+	   (= (length b) 2)
 	   (or (and (math-square-matrixp a)
 		    (math-add a (math-mimic-ident (nth 1 b) a)))
 	       (and (math-known-scalarp a)
--- a/lisp/calc/calcalg2.el	Tue Jan 24 02:01:42 2006 +0000
+++ b/lisp/calc/calcalg2.el	Wed Jan 25 07:10:04 2006 +0000
@@ -2012,7 +2012,7 @@
 		      n (1+ n)
 		      t1 (cdr t1)))
 	      (setq n (math-build-polynomial-expr poly high))
-	      (if (memq low '(0 1))
+	      (if (= low 1)
 		  n
 		(math-sub n (math-build-polynomial-expr poly
 							(math-sub low 1))))))
--- a/lisp/calendar/cal-menu.el	Tue Jan 24 02:01:42 2006 +0000
+++ b/lisp/calendar/cal-menu.el	Wed Jan 25 07:10:04 2006 +0000
@@ -1,6 +1,6 @@
 ;;; cal-menu.el --- calendar functions for menu bar and popup menu support
 
-;; Copyright (C) 1994, 1995, 2001, 2002, 2003, 2004, 2005
+;; Copyright (C) 1994, 1995, 2001, 2002, 2003, 2004, 2005, 2006
 ;;   Free Software Foundation, Inc.
 
 ;; Author: Edward M. Reingold <reingold@cs.uiuc.edu>
@@ -42,7 +42,9 @@
 (defvar displayed-month)
 (defvar displayed-year)
 
-(eval-when-compile (require 'calendar))
+;; Don't require calendar because calendar requires us.
+;; (eval-when-compile (require 'calendar))
+(defvar calendar-mode-map)
 
 (define-key calendar-mode-map [menu-bar edit] 'undefined)
 (define-key calendar-mode-map [menu-bar search] 'undefined)
@@ -211,14 +213,14 @@
   (condition-case nil
       (if (eq major-mode 'calendar-mode)
           (let ((l))
-            (calendar-for-loop;; Show 11 years--5 before, 5 after year of
-                   ;; middle month
-             i from (- displayed-year 5) to (+ displayed-year 5) do
-             (setq l (cons (vector (format "For Year %s" i)
-                                   (list (list 'lambda 'nil '(interactive)
-                                               (list 'list-holidays i i)))
-                                   t)
-                           l)))
+            ;; Show 11 years--5 before, 5 after year of middle month
+            (dotimes (i 11)
+              (let ((y (+ displayed-year -5 i)))
+                (push (vector (format "For Year %s" y)
+                              (list (list 'lambda 'nil '(interactive)
+                                          (list 'list-holidays y y)))
+                              t)
+                      l)))
             (setq l (cons ["Mark Holidays" mark-calendar-holidays t]
                           (cons ["Unmark Calendar" calendar-unmark t]
                                 (cons "--" l))))
@@ -231,22 +233,18 @@
                            (calendar-date-string (calendar-current-date) t t))
                   . cal-menu-today-holidays))
             (let ((title
-                   (let ((m1 displayed-month)
-                         (y1 displayed-year)
-                         (m2 displayed-month)
-                         (y2 displayed-year))
-                     (increment-calendar-month m1 y1 -1)
-                     (increment-calendar-month m2 y2 1)
-                     (if (= y1 y2)
+                   (let ((my1 (calendar-increment-month -1))
+                         (my2 (calendar-increment-month 1)))
+                     (if (= (cdr my1) (cdr my2))
                          (format "%s-%s, %d"
-                                 (calendar-month-name m1 'abbrev)
-                                 (calendar-month-name m2 'abbrev)
-                                 y2)
+                                 (calendar-month-name (car my1) 'abbrev)
+                                 (calendar-month-name (car my2) 'abbrev)
+                                 (cdr my2))
                        (format "%s, %d-%s, %d"
-                               (calendar-month-name m1 'abbrev)
-                               y1
-                               (calendar-month-name m2 'abbrev)
-                               y2)))))
+                               (calendar-month-name (car my1) 'abbrev)
+                               (cdr my1)
+                               (calendar-month-name (car my2) 'abbrev)
+                               (cdr my2))))))
               (define-key  calendar-mode-map [menu-bar Holidays 3-month]
                 `(,(format "For Window (%s)" title)
                   . list-calendar-holidays)))
--- a/lisp/calendar/calendar.el	Tue Jan 24 02:01:42 2006 +0000
+++ b/lisp/calendar/calendar.el	Wed Jan 25 07:10:04 2006 +0000
@@ -1,7 +1,7 @@
 ;;; calendar.el --- calendar functions
 
 ;; Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1997,
-;;   2000, 2001, 2002, 2003, 2004, 2005  Free Software Foundation, Inc.
+;;   2000, 2001, 2002, 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
 
 ;; Author: Edward M. Reingold <reingold@cs.uiuc.edu>
 ;; Maintainer: Glenn Morris <rgm@gnu.org>
@@ -98,11 +98,10 @@
 
 ;;; Code:
 
-(eval-when-compile
-  (defvar displayed-month)
-  (defvar displayed-year)
-  (defvar calendar-month-name-array)
-  (defvar calendar-starred-day))
+(defvar displayed-month)
+(defvar displayed-year)
+(defvar calendar-month-name-array)
+(defvar calendar-starred-day)
 
 (defun calendar-version ()
   (interactive)
@@ -146,7 +145,7 @@
 
 ;;;###autoload
 (defcustom calendar-offset 0
-  "*The offset of the principal month from the center of the calendar window.
+  "The offset of the principal month from the center of the calendar window.
 0 means the principal month is in the center (default), -1 means on the left,
 +1 means on the right.  Larger (or smaller) values push the principal month off
 the screen."
@@ -155,7 +154,7 @@
 
 ;;;###autoload
 (defcustom view-diary-entries-initially nil
-  "*Non-nil means display current date's diary entries on entry to calendar.
+  "Non-nil means display current date's diary entries on entry to calendar.
 The diary is displayed in another window when the calendar is first displayed,
 if the current date is visible.  The number of days of diary entries displayed
 is governed by the variable `number-of-diary-entries'.  This variable can
@@ -165,14 +164,14 @@
 
 ;;;###autoload
 (defcustom mark-diary-entries-in-calendar nil
-  "*Non-nil means mark dates with diary entries, in the calendar window.
+  "Non-nil means mark dates with diary entries, in the calendar window.
 The marking symbol is specified by the variable `diary-entry-marker'."
   :type 'boolean
   :group 'diary)
 
 ;;;###autoload
 (defcustom calendar-remove-frame-by-deleting nil
-  "*Determine how the calendar mode removes a frame no longer needed.
+  "Determine how the calendar mode removes a frame no longer needed.
 If nil, make an icon of the frame.  If non-nil, delete the frame."
   :type 'boolean
   :group 'view)
@@ -224,7 +223,7 @@
   (if (not (display-color-p))
       "+"
     'diary)
-  "*How to mark dates that have diary entries.
+  "How to mark dates that have diary entries.
 The value can be either a single-character string or a face."
   :type '(choice string face)
   :group 'diary)
@@ -233,7 +232,7 @@
   (if (not (display-color-p))
       "="
     'calendar-today)
-  "*How to mark today's date in the calendar.
+  "How to mark today's date in the calendar.
 The value can be either a single-character string or a face.
 Marking today's date is done only if you set up `today-visible-calendar-hook'
 to request that."
@@ -244,14 +243,14 @@
   (if (not (display-color-p))
       "*"
     'holiday)
-  "*How to mark notable dates in the calendar.
+  "How to mark notable dates in the calendar.
 The value can be either a single-character string or a face."
   :type '(choice string face)
   :group 'calendar)
 
 ;;;###autoload
 (defcustom view-calendar-holidays-initially nil
-  "*Non-nil means display holidays for current three month period on entry.
+  "Non-nil means display holidays for current three month period on entry.
 The holidays are displayed in another window when the calendar is first
 displayed."
   :type 'boolean
@@ -259,14 +258,14 @@
 
 ;;;###autoload
 (defcustom mark-holidays-in-calendar nil
-  "*Non-nil means mark dates of holidays in the calendar window.
+  "Non-nil means mark dates of holidays in the calendar window.
 The marking symbol is specified by the variable `calendar-holiday-marker'."
   :type 'boolean
   :group 'holidays)
 
 ;;;###autoload
 (defcustom all-hebrew-calendar-holidays nil
-  "*If nil, show only major holidays from the Hebrew calendar.
+  "If nil, show only major holidays from the Hebrew calendar.
 This means only those Jewish holidays that appear on secular calendars.
 
 If t, show all the holidays that would appear in a complete Hebrew calendar."
@@ -275,7 +274,7 @@
 
 ;;;###autoload
 (defcustom all-christian-calendar-holidays nil
-  "*If nil, show only major holidays from the Christian calendar.
+  "If nil, show only major holidays from the Christian calendar.
 This means only those Christian holidays that appear on secular calendars.
 
 If t, show all the holidays that would appear in a complete Christian
@@ -285,7 +284,7 @@
 
 ;;;###autoload
 (defcustom all-islamic-calendar-holidays nil
-  "*If nil, show only major holidays from the Islamic calendar.
+  "If nil, show only major holidays from the Islamic calendar.
 This means only those Islamic holidays that appear on secular calendars.
 
 If t, show all the holidays that would appear in a complete Islamic
@@ -294,13 +293,13 @@
   :group 'holidays)
 
 (defcustom diary-file-name-prefix-function (function (lambda (str) str))
-  "*The function that will take a diary file name and return the desired prefix."
+  "The function that will take a diary file name and return the desired prefix."
   :type 'function
   :group 'diary)
 
 ;;;###autoload
 (defcustom all-bahai-calendar-holidays nil
-  "*If nil, show only major holidays from the Baha'i calendar.
+  "If nil, show only major holidays from the Baha'i calendar.
 These are the days on which work and school must be suspended.
 
 If t, show all the holidays that would appear in a complete Baha'i
@@ -310,14 +309,14 @@
 
 ;;;###autoload
 (defcustom calendar-load-hook nil
-  "*List of functions to be called after the calendar is first loaded.
+  "List of functions to be called after the calendar is first loaded.
 This is the place to add key bindings to `calendar-mode-map'."
   :type 'hook
   :group 'calendar-hooks)
 
 ;;;###autoload
 (defcustom initial-calendar-window-hook nil
-  "*List of functions to be called when the calendar window is first opened.
+  "List of functions to be called when the calendar window is first opened.
 The functions invoked are called after the calendar window is opened, but
 once opened is never called again.  Leaving the calendar with the `q' command
 and reentering it will cause these functions to be called again."
@@ -326,7 +325,7 @@
 
 ;;;###autoload
 (defcustom today-visible-calendar-hook nil
-  "*List of functions called whenever the current date is visible.
+  "List of functions called whenever the current date is visible.
 This can be used, for example, to replace today's date with asterisks; a
 function `calendar-star-date' is included for this purpose:
     (setq today-visible-calendar-hook 'calendar-star-date)
@@ -346,7 +345,7 @@
 
 ;;;###autoload
 (defcustom today-invisible-calendar-hook nil
-  "*List of functions called whenever the current date is not visible.
+  "List of functions called whenever the current date is not visible.
 
 The corresponding variable `today-visible-calendar-hook' is the list of
 functions called when the calendar function was called when the current
@@ -360,7 +359,7 @@
 
 ;;;###autoload
 (defcustom calendar-move-hook nil
-  "*List of functions called whenever the cursor moves in the calendar.
+  "List of functions called whenever the cursor moves in the calendar.
 
 For example,
 
@@ -372,7 +371,7 @@
 
 ;;;###autoload
 (defcustom diary-file "~/diary"
-  "*Name of the file in which one's personal diary of dates is kept.
+  "Name of the file in which one's personal diary of dates is kept.
 
 The file's entries are lines beginning with any of the forms
 specified by the variable `american-date-diary-pattern', by default:
@@ -480,37 +479,37 @@
 
 ;;;###autoload
 (defcustom diary-nonmarking-symbol "&"
-  "*Symbol indicating that a diary entry is not to be marked in the calendar."
+  "Symbol indicating that a diary entry is not to be marked in the calendar."
   :type 'string
   :group 'diary)
 
 ;;;###autoload
 (defcustom hebrew-diary-entry-symbol "H"
-  "*Symbol indicating a diary entry according to the Hebrew calendar."
+  "Symbol indicating a diary entry according to the Hebrew calendar."
   :type 'string
   :group 'diary)
 
 ;;;###autoload
 (defcustom islamic-diary-entry-symbol "I"
-  "*Symbol indicating a diary entry according to the Islamic calendar."
+  "Symbol indicating a diary entry according to the Islamic calendar."
   :type 'string
   :group 'diary)
 
 ;;;###autoload
 (defcustom bahai-diary-entry-symbol "B"
-  "*Symbol indicating a diary entry according to the Baha'i calendar."
+  "Symbol indicating a diary entry according to the Baha'i calendar."
   :type 'string
   :group 'diary)
 
 ;;;###autoload
 (defcustom diary-include-string "#include"
-  "*The string indicating inclusion of another file of diary entries.
+  "The string indicating inclusion of another file of diary entries.
 See the documentation for the function `include-other-diary-files'."
   :type 'string
   :group 'diary)
 
 (defcustom diary-glob-file-regexp-prefix "^\\#"
-  "*The regular expression that gets pre-pended to each of the attribute-regexp's for file-wide specifiers."
+  "The regular expression that gets pre-pended to each of the attribute-regexp's for file-wide specifiers."
   :type 'regexp
   :group 'diary)
 
@@ -531,7 +530,7 @@
 ;;;    (" *\\[box:\\([-a-z]+\\)\\]$" 1 :box)
 ;;;    (" *\\[stipple:\\([-a-z]+\\)\\]$" 1 :stipple)
     )
-  "*A list of (regexp regnum attr attrtype) lists where the
+  "A list of (regexp regnum attr attrtype) lists where the
 regexp says how to find the tag, the regnum says which
 parenthetical sub-regexp this regexp looks for, and the attr says
 which attribute of the face (or that this _is_ a face) is being
@@ -546,14 +545,14 @@
 
 ;;;###autoload
 (defcustom sexp-diary-entry-symbol "%%"
-  "*The string used to indicate a sexp diary entry in `diary-file'.
+  "The string used to indicate a sexp diary entry in `diary-file'.
 See the documentation for the function `list-sexp-diary-entries'."
   :type 'string
   :group 'diary)
 
 ;;;###autoload
 (defcustom abbreviated-calendar-year t
-  "*Interpret a two-digit year DD in a diary entry as either 19DD or 20DD.
+  "Interpret a two-digit year DD in a diary entry as either 19DD or 20DD.
 For the Gregorian calendar; similarly for the Hebrew, Islamic and
 Baha'i calendars.  If this variable is nil, years must be written in
 full."
@@ -562,7 +561,7 @@
 
 ;;;###autoload
 (defcustom european-calendar-style nil
-  "*Use the European style of dates in the diary and in any displays.
+  "Use the European style of dates in the diary and in any displays.
 If this variable is t, a date 1/2/1990 would be interpreted as February 1,
 1990.  The default European date styles (see `european-date-diary-pattern')
 are
@@ -589,7 +588,7 @@
     (monthname " *" day "[^,0-9]")
     (monthname " *" day ", *" year "[^0-9]")
     (dayname "\\W"))
-  "*List of pseudo-patterns describing the American patterns of date used.
+  "List of pseudo-patterns describing the American patterns of date used.
 See the documentation of `diary-date-forms' for an explanation."
   :type '(repeat (choice (cons :tag "Backup"
 			       :value (backup . nil)
@@ -609,7 +608,7 @@
     (backup day " *" monthname "\\W+\\<\\([^*0-9]\\|\\([0-9]+[:aApP]\\)\\)")
     (day " *" monthname " *" year "[^0-9]")
     (dayname "\\W"))
-  "*List of pseudo-patterns describing the European patterns of date used.
+  "List of pseudo-patterns describing the European patterns of date used.
 See the documentation of `diary-date-forms' for an explanation."
   :type '(repeat (choice (cons :tag "Backup"
 			       :value (backup . nil)
@@ -626,7 +625,7 @@
   (if european-calendar-style
       european-date-diary-pattern
     american-date-diary-pattern)
-  "*List of pseudo-patterns describing the forms of date used in the diary.
+  "List of pseudo-patterns describing the forms of date used in the diary.
 The patterns on the list must be MUTUALLY EXCLUSIVE and should not match
 any portion of the diary entry itself, just the date component.
 
@@ -664,7 +663,7 @@
 ;;;###autoload
 (defcustom european-calendar-display-form
   '((if dayname (concat dayname ", ")) day " " monthname " " year)
-  "*Pseudo-pattern governing the way a date appears in the European style.
+  "Pseudo-pattern governing the way a date appears in the European style.
 See the documentation of `calendar-date-display-form' for an explanation."
   :type 'sexp
   :group 'calendar)
@@ -672,7 +671,7 @@
 ;;;###autoload
 (defcustom american-calendar-display-form
   '((if dayname (concat dayname ", ")) monthname " " day ", " year)
-  "*Pseudo-pattern governing the way a date appears in the American style.
+  "Pseudo-pattern governing the way a date appears in the American style.
 See the documentation of `calendar-date-display-form' for an explanation."
   :type 'sexp
   :group 'calendar)
@@ -681,7 +680,7 @@
   (if european-calendar-style
       european-calendar-display-form
     american-calendar-display-form)
-  "*Pseudo-pattern governing the way a date appears.
+  "Pseudo-pattern governing the way a date appears.
 
 Used by the function `calendar-date-string', a pseudo-pattern is a list of
 expressions that can involve the keywords `month', `day', and `year', all
@@ -722,7 +721,7 @@
 
 ;;;###autoload
 (defcustom print-diary-entries-hook 'lpr-buffer
-  "*List of functions called after a temporary diary buffer is prepared.
+  "List of functions called after a temporary diary buffer is prepared.
 The buffer shows only the diary entries currently visible in the diary
 buffer.  The default just does the printing.  Other uses might include, for
 example, rearranging the lines into order by day and time, saving the buffer
@@ -732,7 +731,7 @@
 
 ;;;###autoload
 (defcustom list-diary-entries-hook nil
-  "*List of functions called after diary file is culled for relevant entries.
+  "List of functions called after diary file is culled for relevant entries.
 It is to be used for diary entries that are not found in the diary file.
 
 A function `include-other-diary-files' is provided for use as the value of
@@ -763,14 +762,14 @@
 
 ;;;###autoload
 (defcustom diary-hook nil
-  "*List of functions called after the display of the diary.
+  "List of functions called after the display of the diary.
 Can be used for appointment notification."
   :type 'hook
   :group 'diary)
 
 ;;;###autoload
 (defcustom diary-display-hook nil
-  "*List of functions that handle the display of the diary.
+  "List of functions that handle the display of the diary.
 If nil (the default), `simple-diary-display' is used.  Use `ignore' for no
 diary display.
 
@@ -796,7 +795,7 @@
 
 ;;;###autoload
 (defcustom nongregorian-diary-listing-hook nil
-  "*List of functions called for listing diary file and included files.
+  "List of functions called for listing diary file and included files.
 As the files are processed for diary entries, these functions are used
 to cull relevant entries.  You can use either or both of
 `list-hebrew-diary-entries', `list-islamic-diary-entries' and
@@ -810,7 +809,7 @@
 
 ;;;###autoload
 (defcustom mark-diary-entries-hook nil
-  "*List of functions called after marking diary entries in the calendar.
+  "List of functions called after marking diary entries in the calendar.
 
 A function `mark-included-diary-files' is also provided for use as the
 `mark-diary-entries-hook'; it enables you to use shared diary files together
@@ -828,7 +827,7 @@
 
 ;;;###autoload
 (defcustom nongregorian-diary-marking-hook nil
-  "*List of functions called for marking diary file and included files.
+  "List of functions called for marking diary file and included files.
 As the files are processed for diary entries, these functions are used
 to cull relevant entries.  You can use either or both of
 `mark-hebrew-diary-entries', `mark-islamic-diary-entries' and
@@ -842,7 +841,7 @@
 
 ;;;###autoload
 (defcustom diary-list-include-blanks nil
-  "*If nil, do not include days with no diary entry in the list of diary entries.
+  "If nil, do not include days with no diary entry in the list of diary entries.
 Such days will then not be shown in the fancy diary buffer, even if they
 are holidays."
   :type 'boolean
@@ -850,7 +849,7 @@
 
 ;;;###autoload
 (defcustom holidays-in-diary-buffer t
-  "*Non-nil means include holidays in the diary display.
+  "Non-nil means include holidays in the diary display.
 The holidays appear in the mode line of the diary buffer, or in the
 fancy diary buffer next to the date.  This slows down the diary functions
 somewhat; setting it to nil makes the diary display faster."
@@ -880,7 +879,7 @@
     (holiday-fixed 10 31 "Halloween")
     (holiday-fixed 11 11 "Veteran's Day")
     (holiday-float 11 4 4 "Thanksgiving"))
-  "*General holidays.  Default value is for the United States.
+  "General holidays.  Default value is for the United States.
 See the documentation for `calendar-holidays' for details."
   :type 'sexp
   :group 'holidays)
@@ -891,7 +890,7 @@
 (defcustom oriental-holidays
   '((if (fboundp 'atan)
 	(holiday-chinese-new-year)))
-  "*Oriental holidays.
+  "Oriental holidays.
 See the documentation for `calendar-holidays' for details."
   :type 'sexp
   :group 'holidays)
@@ -900,7 +899,7 @@
 (put 'local-holidays 'risky-local-variable t)
 ;;;###autoload
 (defcustom local-holidays nil
-  "*Local holidays.
+  "Local holidays.
 See the documentation for `calendar-holidays' for details."
   :type 'sexp
   :group 'holidays)
@@ -909,7 +908,7 @@
 (put 'other-holidays 'risky-local-variable t)
 ;;;###autoload
 (defcustom other-holidays nil
-  "*User defined holidays.
+  "User defined holidays.
 See the documentation for `calendar-holidays' for details."
   :type 'sexp
   :group 'holidays)
@@ -1013,7 +1012,7 @@
 ;;;###autoload
 (defcustom hebrew-holidays (append hebrew-holidays-1 hebrew-holidays-2
 				hebrew-holidays-3 hebrew-holidays-4)
-  "*Jewish holidays.
+  "Jewish holidays.
 See the documentation for `calendar-holidays' for details."
   :type 'sexp
   :group 'holidays)
@@ -1064,7 +1063,7 @@
     (holiday-fixed 12 25 "Christmas")
     (if all-christian-calendar-holidays
         (holiday-julian 12 25 "Eastern Orthodox Christmas")))
-  "*Christian holidays.
+  "Christian holidays.
 See the documentation for `calendar-holidays' for details."
   :type 'sexp
   :group 'holidays)
@@ -1099,7 +1098,7 @@
         (holiday-islamic 10 1 "Id-al-Fitr"))
     (if all-islamic-calendar-holidays
         (holiday-islamic 12 10 "Id-al-Adha")))
-  "*Islamic holidays.
+  "Islamic holidays.
 See the documentation for `calendar-holidays' for details."
   :type 'sexp
   :group 'holidays)
@@ -1141,7 +1140,7 @@
 	(holiday-fixed 11 26 "Day of the Covenant"))
     (if all-bahai-calendar-holidays
 	(holiday-fixed 11 28 "Ascension of `Abdu'l-Baha")))
-  "*Baha'i holidays.
+  "Baha'i holidays.
 See the documentation for `calendar-holidays' for details."
   :type 'sexp
   :group 'holidays)
@@ -1173,7 +1172,7 @@
                    (/ calendar-daylight-savings-ends-time (float 60))
                    calendar-daylight-time-zone-name)
                 ""))))
-  "*Sun-related holidays.
+  "Sun-related holidays.
 See the documentation for `calendar-holidays' for details."
   :type 'sexp
   :group 'holidays)
@@ -1184,7 +1183,7 @@
   (append general-holidays local-holidays other-holidays
           christian-holidays hebrew-holidays islamic-holidays
           bahai-holidays oriental-holidays solar-holidays)
-  "*List of notable days for the command \\[holidays].
+  "List of notable days for the command \\[holidays].
 
 Additional holidays are easy to add to the list, just put them in the
 list `other-holidays' in your .emacs file.  Similarly, by setting any
@@ -1304,6 +1303,15 @@
      (and (< macro-y 0) (> ,mon 1) (setq ,yr (1- ,yr)))
      (if (< ,yr 1) (setq ,yr (1- ,yr))))) ; 0 AD -> -1 BC, etc
 
+(defun calendar-increment-month (n &optional mon yr)
+  "Return the Nth month after MON/YR.
+The return value is a pair (MONTH . YEAR).
+MON defaults to `displayed-month'.  YR defaults to `displayed-year'."
+  (unless mon (setq mon displayed-month))
+  (unless yr (setq mon displayed-year))
+  (increment-calendar-month mon yr n)
+  (cons mon yr))
+
 (defmacro calendar-for-loop (var from init to final do &rest body)
   "Execute a for loop."
   (declare (debug (symbolp "from" form "to" form "do" body)))
@@ -1313,6 +1321,7 @@
 
 (defmacro calendar-sum (index initial condition expression)
   "For INDEX = INITIAL et seq, as long as CONDITION holds, sum EXPRESSION."
+  (declare (debug (symbolp form form form)))
   `(let ((,index ,initial)
          (sum 0))
     (while ,condition
@@ -2140,7 +2149,7 @@
 
 ;;;###autoload
 (defcustom calendar-week-start-day 0
-  "*The day of the week on which a week in the calendar begins.
+  "The day of the week on which a week in the calendar begins.
 0 means Sunday (default), 1 means Monday, and so on.
 
 If you change this variable directly (without using customize)
@@ -2148,160 +2157,159 @@
 update the calendar display to reflect the change, otherwise
 movement commands will not work correctly."
   :type 'integer
+  ;; Change the initialize so that if you reload calendar.el, it will not
+  ;; cause a redraw (which may fail, e.g. with "invalid byte-code in
+  ;; calendar.elc" because of the "byte-compile-dynamic").
+  :initialize 'custom-initialize-default
   :set (lambda (sym val)
          (set sym val)
          (redraw-calendar))
   :group 'calendar)
 
 (defcustom calendar-debug-sexp nil
-  "*Turn debugging on when evaluating a sexp in the diary or holiday list."
+  "Turn debugging on when evaluating a sexp in the diary or holiday list."
   :type 'boolean
   :group 'calendar)
 
 (defvar calendar-mode-map nil)
 (if calendar-mode-map
     nil
-  (setq calendar-mode-map (make-sparse-keymap))
-  (require 'cal-menu)
-  (calendar-for-loop i from 0 to 9 do
-       (define-key calendar-mode-map (int-to-string i) 'digit-argument))
-  (let ((l (list 'narrow-to-region 'mark-word 'mark-sexp 'mark-paragraph
-                 'mark-defun 'mark-whole-buffer 'mark-page
-                 'downcase-region 'upcase-region 'kill-region
-                 'copy-region-as-kill 'capitalize-region 'write-region)))
-    (while l
-      (substitute-key-definition (car l) 'calendar-not-implemented
-				 calendar-mode-map global-map)
-      (setq l (cdr l))))
-  (define-key calendar-mode-map "-"     'negative-argument)
-  (define-key calendar-mode-map ">"     'scroll-calendar-right)
-  (define-key calendar-mode-map "\C-x>" 'scroll-calendar-right)
-  (define-key calendar-mode-map [prior] 'scroll-calendar-right-three-months)
-  (define-key calendar-mode-map "\ev"   'scroll-calendar-right-three-months)
-  (define-key calendar-mode-map "<"     'scroll-calendar-left)
-  (define-key calendar-mode-map "\C-x<" 'scroll-calendar-left)
-  (define-key calendar-mode-map [next]  'scroll-calendar-left-three-months)
-  (define-key calendar-mode-map "\C-v"  'scroll-calendar-left-three-months)
-  (define-key calendar-mode-map "\C-b"  'calendar-backward-day)
-  (define-key calendar-mode-map "\C-p"  'calendar-backward-week)
-  (define-key calendar-mode-map "\e{"   'calendar-backward-month)
-  (define-key calendar-mode-map "\C-x[" 'calendar-backward-year)
-  (define-key calendar-mode-map "\C-f"  'calendar-forward-day)
-  (define-key calendar-mode-map "\C-n"  'calendar-forward-week)
-  (define-key calendar-mode-map [left]  'calendar-backward-day)
-  (define-key calendar-mode-map [up]    'calendar-backward-week)
-  (define-key calendar-mode-map [right] 'calendar-forward-day)
-  (define-key calendar-mode-map [down]  'calendar-forward-week)
-  (define-key calendar-mode-map "\e}"   'calendar-forward-month)
-  (define-key calendar-mode-map "\C-x]" 'calendar-forward-year)
-  (define-key calendar-mode-map "\C-a"  'calendar-beginning-of-week)
-  (define-key calendar-mode-map "\C-e"  'calendar-end-of-week)
-  (define-key calendar-mode-map "\ea"   'calendar-beginning-of-month)
-  (define-key calendar-mode-map "\ee"   'calendar-end-of-month)
-  (define-key calendar-mode-map "\e<"   'calendar-beginning-of-year)
-  (define-key calendar-mode-map "\e>"   'calendar-end-of-year)
-  (define-key calendar-mode-map "\C-@"  'calendar-set-mark)
-  ;; Many people are used to typing C-SPC and getting C-@.
-  (define-key calendar-mode-map [?\C- ] 'calendar-set-mark)
-  (define-key calendar-mode-map "\C-x\C-x" 'calendar-exchange-point-and-mark)
-  (define-key calendar-mode-map "\e=" 'calendar-count-days-region)
-  (define-key calendar-mode-map "gd"  'calendar-goto-date)
-  (define-key calendar-mode-map "gD"  'calendar-goto-day-of-year)
-  (define-key calendar-mode-map "gj"  'calendar-goto-julian-date)
-  (define-key calendar-mode-map "ga"  'calendar-goto-astro-day-number)
-  (define-key calendar-mode-map "gh"  'calendar-goto-hebrew-date)
-  (define-key calendar-mode-map "gi"  'calendar-goto-islamic-date)
-  (define-key calendar-mode-map "gb"  'calendar-goto-bahai-date)
-  (define-key calendar-mode-map "gC"  'calendar-goto-chinese-date)
-  (define-key calendar-mode-map "gk"  'calendar-goto-coptic-date)
-  (define-key calendar-mode-map "ge"  'calendar-goto-ethiopic-date)
-  (define-key calendar-mode-map "gp"  'calendar-goto-persian-date)
-  (define-key calendar-mode-map "gc"  'calendar-goto-iso-date)
-  (define-key calendar-mode-map "gw"  'calendar-goto-iso-week)
-  (define-key calendar-mode-map "gf"  'calendar-goto-french-date)
-  (define-key calendar-mode-map "gml"  'calendar-goto-mayan-long-count-date)
-  (define-key calendar-mode-map "gmpc" 'calendar-previous-calendar-round-date)
-  (define-key calendar-mode-map "gmnc" 'calendar-next-calendar-round-date)
-  (define-key calendar-mode-map "gmph" 'calendar-previous-haab-date)
-  (define-key calendar-mode-map "gmnh" 'calendar-next-haab-date)
-  (define-key calendar-mode-map "gmpt" 'calendar-previous-tzolkin-date)
-  (define-key calendar-mode-map "gmnt" 'calendar-next-tzolkin-date)
-  (define-key calendar-mode-map "Aa"   'appt-add)
-  (define-key calendar-mode-map "Ad"   'appt-delete)
-  (define-key calendar-mode-map "S"   'calendar-sunrise-sunset)
-  (define-key calendar-mode-map "M"   'calendar-phases-of-moon)
-  (define-key calendar-mode-map " "   'scroll-other-window)
-  (define-key calendar-mode-map (kbd "DEL") 'scroll-other-window-down)
-  (define-key calendar-mode-map "\C-c\C-l" 'redraw-calendar)
-  (define-key calendar-mode-map "."   'calendar-goto-today)
-  (define-key calendar-mode-map "o"   'calendar-other-month)
-  (define-key calendar-mode-map "q"   'exit-calendar)
-  (define-key calendar-mode-map "a"   'list-calendar-holidays)
-  (define-key calendar-mode-map "h"   'calendar-cursor-holidays)
-  (define-key calendar-mode-map "x"   'mark-calendar-holidays)
-  (define-key calendar-mode-map "u"   'calendar-unmark)
-  (define-key calendar-mode-map "m"   'mark-diary-entries)
-  (define-key calendar-mode-map "d"   'diary-view-entries)
-  (define-key calendar-mode-map "D"   'view-other-diary-entries)
-  (define-key calendar-mode-map "s"   'show-all-diary-entries)
-  (define-key calendar-mode-map "pd"  'calendar-print-day-of-year)
-  (define-key calendar-mode-map "pC"  'calendar-print-chinese-date)
-  (define-key calendar-mode-map "pk"  'calendar-print-coptic-date)
-  (define-key calendar-mode-map "pe"  'calendar-print-ethiopic-date)
-  (define-key calendar-mode-map "pp"  'calendar-print-persian-date)
-  (define-key calendar-mode-map "pc"  'calendar-print-iso-date)
-  (define-key calendar-mode-map "pj"  'calendar-print-julian-date)
-  (define-key calendar-mode-map "pa"  'calendar-print-astro-day-number)
-  (define-key calendar-mode-map "ph"  'calendar-print-hebrew-date)
-  (define-key calendar-mode-map "pi"  'calendar-print-islamic-date)
-  (define-key calendar-mode-map "pb"  'calendar-print-bahai-date)
-  (define-key calendar-mode-map "pf"  'calendar-print-french-date)
-  (define-key calendar-mode-map "pm"  'calendar-print-mayan-date)
-  (define-key calendar-mode-map "po"  'calendar-print-other-dates)
-  (define-key calendar-mode-map "id"  'insert-diary-entry)
-  (define-key calendar-mode-map "iw"  'insert-weekly-diary-entry)
-  (define-key calendar-mode-map "im"  'insert-monthly-diary-entry)
-  (define-key calendar-mode-map "iy"  'insert-yearly-diary-entry)
-  (define-key calendar-mode-map "ia"  'insert-anniversary-diary-entry)
-  (define-key calendar-mode-map "ib"  'insert-block-diary-entry)
-  (define-key calendar-mode-map "ic"  'insert-cyclic-diary-entry)
-  (define-key calendar-mode-map "ihd" 'insert-hebrew-diary-entry)
-  (define-key calendar-mode-map "ihm" 'insert-monthly-hebrew-diary-entry)
-  (define-key calendar-mode-map "ihy" 'insert-yearly-hebrew-diary-entry)
-  (define-key calendar-mode-map "iid" 'insert-islamic-diary-entry)
-  (define-key calendar-mode-map "iim" 'insert-monthly-islamic-diary-entry)
-  (define-key calendar-mode-map "iiy" 'insert-yearly-islamic-diary-entry)
-  (define-key calendar-mode-map "iBd" 'insert-bahai-diary-entry)
-  (define-key calendar-mode-map "iBm" 'insert-monthly-bahai-diary-entry)
-  (define-key calendar-mode-map "iBy" 'insert-yearly-bahai-diary-entry)
-  (define-key calendar-mode-map "?"   'calendar-goto-info-node)
-  (define-key calendar-mode-map "tm" 'cal-tex-cursor-month)
-  (define-key calendar-mode-map "tM" 'cal-tex-cursor-month-landscape)
-  (define-key calendar-mode-map "td" 'cal-tex-cursor-day)
-  (define-key calendar-mode-map "tw1" 'cal-tex-cursor-week)
-  (define-key calendar-mode-map "tw2" 'cal-tex-cursor-week2)
-  (define-key calendar-mode-map "tw3" 'cal-tex-cursor-week-iso)
-  (define-key calendar-mode-map "tw4" 'cal-tex-cursor-week-monday)
-  (define-key calendar-mode-map "tfd" 'cal-tex-cursor-filofax-daily)
-  (define-key calendar-mode-map "tfw" 'cal-tex-cursor-filofax-2week)
-  (define-key calendar-mode-map "tfW" 'cal-tex-cursor-filofax-week)
-  (define-key calendar-mode-map "tfy" 'cal-tex-cursor-filofax-year)
-  (define-key calendar-mode-map "ty" 'cal-tex-cursor-year)
-  (define-key calendar-mode-map "tY" 'cal-tex-cursor-year-landscape))
+  (let ((map (make-keymap)))
+    (suppress-keymap map)
+    (dolist (c '(narrow-to-region mark-word mark-sexp mark-paragraph
+                 mark-defun mark-whole-buffer mark-page
+                 downcase-region upcase-region kill-region
+                 copy-region-as-kill capitalize-region write-region))
+      (define-key map (vector 'remap c) 'calendar-not-implemented))
+    (define-key map ">"     'scroll-calendar-right)
+    (define-key map "\C-x>" 'scroll-calendar-right)
+    (define-key map [prior] 'scroll-calendar-right-three-months)
+    (define-key map "\ev"   'scroll-calendar-right-three-months)
+    (define-key map "<"     'scroll-calendar-left)
+    (define-key map "\C-x<" 'scroll-calendar-left)
+    (define-key map [next]  'scroll-calendar-left-three-months)
+    (define-key map "\C-v"  'scroll-calendar-left-three-months)
+    (define-key map "\C-b"  'calendar-backward-day)
+    (define-key map "\C-p"  'calendar-backward-week)
+    (define-key map "\e{"   'calendar-backward-month)
+    (define-key map "\C-x[" 'calendar-backward-year)
+    (define-key map "\C-f"  'calendar-forward-day)
+    (define-key map "\C-n"  'calendar-forward-week)
+    (define-key map [left]  'calendar-backward-day)
+    (define-key map [up]    'calendar-backward-week)
+    (define-key map [right] 'calendar-forward-day)
+    (define-key map [down]  'calendar-forward-week)
+    (define-key map "\e}"   'calendar-forward-month)
+    (define-key map "\C-x]" 'calendar-forward-year)
+    (define-key map "\C-a"  'calendar-beginning-of-week)
+    (define-key map "\C-e"  'calendar-end-of-week)
+    (define-key map "\ea"   'calendar-beginning-of-month)
+    (define-key map "\ee"   'calendar-end-of-month)
+    (define-key map "\e<"   'calendar-beginning-of-year)
+    (define-key map "\e>"   'calendar-end-of-year)
+    (define-key map "\C-@"  'calendar-set-mark)
+    ;; Many people are used to typing C-SPC and getting C-@.
+    (define-key map [?\C- ] 'calendar-set-mark)
+    (define-key map "\C-x\C-x" 'calendar-exchange-point-and-mark)
+    (define-key map "\e=" 'calendar-count-days-region)
+    (define-key map "gd"  'calendar-goto-date)
+    (define-key map "gD"  'calendar-goto-day-of-year)
+    (define-key map "gj"  'calendar-goto-julian-date)
+    (define-key map "ga"  'calendar-goto-astro-day-number)
+    (define-key map "gh"  'calendar-goto-hebrew-date)
+    (define-key map "gi"  'calendar-goto-islamic-date)
+    (define-key map "gb"  'calendar-goto-bahai-date)
+    (define-key map "gC"  'calendar-goto-chinese-date)
+    (define-key map "gk"  'calendar-goto-coptic-date)
+    (define-key map "ge"  'calendar-goto-ethiopic-date)
+    (define-key map "gp"  'calendar-goto-persian-date)
+    (define-key map "gc"  'calendar-goto-iso-date)
+    (define-key map "gw"  'calendar-goto-iso-week)
+    (define-key map "gf"  'calendar-goto-french-date)
+    (define-key map "gml"  'calendar-goto-mayan-long-count-date)
+    (define-key map "gmpc" 'calendar-previous-calendar-round-date)
+    (define-key map "gmnc" 'calendar-next-calendar-round-date)
+    (define-key map "gmph" 'calendar-previous-haab-date)
+    (define-key map "gmnh" 'calendar-next-haab-date)
+    (define-key map "gmpt" 'calendar-previous-tzolkin-date)
+    (define-key map "gmnt" 'calendar-next-tzolkin-date)
+    (define-key map "Aa"   'appt-add)
+    (define-key map "Ad"   'appt-delete)
+    (define-key map "S"   'calendar-sunrise-sunset)
+    (define-key map "M"   'calendar-phases-of-moon)
+    (define-key map " "   'scroll-other-window)
+    (define-key map (kbd "DEL") 'scroll-other-window-down)
+    (define-key map "\C-c\C-l" 'redraw-calendar)
+    (define-key map "."   'calendar-goto-today)
+    (define-key map "o"   'calendar-other-month)
+    (define-key map "q"   'exit-calendar)
+    (define-key map "a"   'list-calendar-holidays)
+    (define-key map "h"   'calendar-cursor-holidays)
+    (define-key map "x"   'mark-calendar-holidays)
+    (define-key map "u"   'calendar-unmark)
+    (define-key map "m"   'mark-diary-entries)
+    (define-key map "d"   'diary-view-entries)
+    (define-key map "D"   'view-other-diary-entries)
+    (define-key map "s"   'show-all-diary-entries)
+    (define-key map "pd"  'calendar-print-day-of-year)
+    (define-key map "pC"  'calendar-print-chinese-date)
+    (define-key map "pk"  'calendar-print-coptic-date)
+    (define-key map "pe"  'calendar-print-ethiopic-date)
+    (define-key map "pp"  'calendar-print-persian-date)
+    (define-key map "pc"  'calendar-print-iso-date)
+    (define-key map "pj"  'calendar-print-julian-date)
+    (define-key map "pa"  'calendar-print-astro-day-number)
+    (define-key map "ph"  'calendar-print-hebrew-date)
+    (define-key map "pi"  'calendar-print-islamic-date)
+    (define-key map "pb"  'calendar-print-bahai-date)
+    (define-key map "pf"  'calendar-print-french-date)
+    (define-key map "pm"  'calendar-print-mayan-date)
+    (define-key map "po"  'calendar-print-other-dates)
+    (define-key map "id"  'insert-diary-entry)
+    (define-key map "iw"  'insert-weekly-diary-entry)
+    (define-key map "im"  'insert-monthly-diary-entry)
+    (define-key map "iy"  'insert-yearly-diary-entry)
+    (define-key map "ia"  'insert-anniversary-diary-entry)
+    (define-key map "ib"  'insert-block-diary-entry)
+    (define-key map "ic"  'insert-cyclic-diary-entry)
+    (define-key map "ihd" 'insert-hebrew-diary-entry)
+    (define-key map "ihm" 'insert-monthly-hebrew-diary-entry)
+    (define-key map "ihy" 'insert-yearly-hebrew-diary-entry)
+    (define-key map "iid" 'insert-islamic-diary-entry)
+    (define-key map "iim" 'insert-monthly-islamic-diary-entry)
+    (define-key map "iiy" 'insert-yearly-islamic-diary-entry)
+    (define-key map "iBd" 'insert-bahai-diary-entry)
+    (define-key map "iBm" 'insert-monthly-bahai-diary-entry)
+    (define-key map "iBy" 'insert-yearly-bahai-diary-entry)
+    (define-key map "?"   'calendar-goto-info-node)
+    (define-key map "tm" 'cal-tex-cursor-month)
+    (define-key map "tM" 'cal-tex-cursor-month-landscape)
+    (define-key map "td" 'cal-tex-cursor-day)
+    (define-key map "tw1" 'cal-tex-cursor-week)
+    (define-key map "tw2" 'cal-tex-cursor-week2)
+    (define-key map "tw3" 'cal-tex-cursor-week-iso)
+    (define-key map "tw4" 'cal-tex-cursor-week-monday)
+    (define-key map "tfd" 'cal-tex-cursor-filofax-daily)
+    (define-key map "tfw" 'cal-tex-cursor-filofax-2week)
+    (define-key map "tfW" 'cal-tex-cursor-filofax-week)
+    (define-key map "tfy" 'cal-tex-cursor-filofax-year)
+    (define-key map "ty" 'cal-tex-cursor-year)
+    (define-key map "tY" 'cal-tex-cursor-year-landscape)
+    (setq calendar-mode-map map)
+    ;; Require cal-menu after initializing calendar-mode-map because it uses it.
+    (require 'cal-menu)))
 
 (defun describe-calendar-mode ()
   "Create a help buffer with a brief description of the `calendar-mode'."
   (interactive)
-  (with-output-to-temp-buffer "*Help*"
+  (help-setup-xref (list #'describe-calendar-mode) (interactive-p))
+  (with-output-to-temp-buffer (help-buffer)
     (princ
      (format
       "Calendar Mode:\nFor a complete description, type %s\n%s\n"
       (substitute-command-keys
        "\\<calendar-mode-map>\\[describe-mode] from within the calendar")
       (substitute-command-keys "\\{calendar-mode-map}")))
-    (save-excursion
-      (set-buffer standard-output)
-      (help-mode))
     (print-help-return-message)))
 
 ;; Calendar mode is suitable only for specially formatted data.
@@ -2451,12 +2459,11 @@
          (s (car strings))
          (strings (cdr strings))
          (i 0))
-    (while strings
+    (dolist (string strings)
       (setq s (concat s
                       (make-string (max 0 (/ (+ n i) m)) char)
-                      (car strings)))
-      (setq i (1+ i))
-      (setq strings (cdr strings)))
+                      string))
+      (setq i (1+ i)))
     (substring s 0 length)))
 
 (defun update-calendar-mode-line ()
@@ -2478,7 +2485,7 @@
         list)
     (walk-windows (lambda (w)
 		    (if (memq (window-buffer w) calendar-buffers)
-			(setq list (cons w list))))
+			(push w list)))
                   nil t)
     list))
 
@@ -2488,15 +2495,12 @@
          (buffers (list "*Yahrzeits*" lunar-phases-buffer holiday-buffer
                         fancy-diary-buffer diary-buffer calendar-buffer
                         other-calendars-buffer))
-         (buffer-list nil)
-         b)
-    (while buffers
-      (setq b (car buffers))
+         (buffer-list nil))
+    (dolist (b buffers)
       (setq b (cond ((stringp b) (get-buffer b))
                     ((bufferp b) b)
                     (t nil)))
-      (if b (setq buffer-list (cons b buffer-list)))
-      (setq buffers (cdr buffers)))
+      (if b (push b buffer-list)))
     buffer-list))
 
 (defun exit-calendar ()
@@ -2642,7 +2646,7 @@
   (let ((date (calendar-cursor-to-date t)))
     (if (null arg)
         (progn
-          (setq calendar-mark-ring (cons date calendar-mark-ring))
+          (push date calendar-mark-ring)
           ;; Since the top of the mark ring is the marked date in the
           ;; calendar, the mark ring in the calendar is one longer than
           ;; in other buffers to get the same effect.
@@ -2949,16 +2953,18 @@
   "Replace the date under the cursor in the calendar window with asterisks.
 This function can be used with the `today-visible-calendar-hook' run after the
 calendar window has been prepared."
-  (let ((inhibit-read-only t))
-    (make-local-variable 'calendar-starred-day)
+  (let ((inhibit-read-only t)
+        (modified (buffer-modified-p)))
     (forward-char 1)
-    (setq calendar-starred-day
-          (string-to-number
-           (buffer-substring (point) (- (point) 2))))
+    (set (make-local-variable 'calendar-starred-day)
+         (string-to-number
+          (buffer-substring (point) (- (point) 2))))
+    ;; Insert before deleting, to better preserve markers.
+    (insert "**")
+    (forward-char -2)
     (delete-char -2)
-    (insert "**")
-    (backward-char 1)
-    (set-buffer-modified-p nil)))
+    (forward-char 1)
+    (restore-buffer-modified-p modified)))
 
 (defun calendar-mark-today ()
   "Mark the date under the cursor in the calendar window.
@@ -3048,48 +3054,48 @@
   (interactive)
   (let* ((date (calendar-cursor-to-date t)))
     (with-current-buffer (get-buffer-create other-calendars-buffer)
-      (setq buffer-read-only nil)
-      (calendar-set-mode-line
-       (concat (calendar-date-string date) " (Gregorian)"))
-      (erase-buffer)
-      (insert
-       (mapconcat 'identity
-                  (list (calendar-day-of-year-string date)
-                        (format "ISO date: %s" (calendar-iso-date-string date))
-                        (format "Julian date: %s"
-                                (calendar-julian-date-string date))
-                        (format
-                         "Astronomical (Julian) day number (at noon UTC): %s.0"
-                         (calendar-astro-date-string date))
-                        (format "Fixed (RD) date: %s"
-                                (calendar-absolute-from-gregorian date))
-                        (format "Hebrew date (before sunset): %s"
-                                (calendar-hebrew-date-string date))
-                        (format "Persian date: %s"
-                                (calendar-persian-date-string date))
-                        (let ((i (calendar-islamic-date-string date)))
-                          (if (not (string-equal i ""))
-                              (format "Islamic date (before sunset): %s" i)))
-			(let ((b (calendar-bahai-date-string date)))
-			  (if (not (string-equal b ""))
-			      (format "Baha'i date (before sunset): %s" b)))
-                        (format "Chinese date: %s"
-                                (calendar-chinese-date-string date))
-                        (let ((c (calendar-coptic-date-string date)))
-                          (if (not (string-equal c ""))
-                              (format "Coptic date: %s" c)))
-                        (let ((e (calendar-ethiopic-date-string date)))
-                          (if (not (string-equal e ""))
-                              (format "Ethiopic date: %s" e)))
-                        (let ((f (calendar-french-date-string date)))
-                          (if (not (string-equal f ""))
-                              (format "French Revolutionary date: %s" f)))
-                        (format "Mayan date: %s"
-                                (calendar-mayan-date-string date)))
-                  "\n"))
-      (goto-char (point-min))
-      (set-buffer-modified-p nil)
-      (setq buffer-read-only t)
+      (let ((inhibit-read-only t)
+            (modified (buffer-modified-p)))
+        (calendar-set-mode-line
+         (concat (calendar-date-string date) " (Gregorian)"))
+        (erase-buffer)
+        (apply
+         'insert
+         (delq nil
+               (list
+                (calendar-day-of-year-string date) "\n"
+                (format "ISO date: %s\n" (calendar-iso-date-string date))
+                (format "Julian date: %s\n"
+                        (calendar-julian-date-string date))
+                (format "Astronomical (Julian) day number (at noon UTC): %s.0\n"
+                        (calendar-astro-date-string date))
+                (format "Fixed (RD) date: %s\n"
+                        (calendar-absolute-from-gregorian date))
+                (format "Hebrew date (before sunset): %s\n"
+                        (calendar-hebrew-date-string date))
+                (format "Persian date: %s\n"
+                        (calendar-persian-date-string date))
+                (let ((i (calendar-islamic-date-string date)))
+                  (if (not (string-equal i ""))
+                      (format "Islamic date (before sunset): %s\n" i)))
+                (let ((b (calendar-bahai-date-string date)))
+                  (if (not (string-equal b ""))
+                      (format "Baha'i date (before sunset): %s\n" b)))
+                (format "Chinese date: %s\n"
+                        (calendar-chinese-date-string date))
+                (let ((c (calendar-coptic-date-string date)))
+                  (if (not (string-equal c ""))
+                      (format "Coptic date: %s\n" c)))
+                (let ((e (calendar-ethiopic-date-string date)))
+                  (if (not (string-equal e ""))
+                      (format "Ethiopic date: %s\n" e)))
+                (let ((f (calendar-french-date-string date)))
+                  (if (not (string-equal f ""))
+                      (format "French Revolutionary date: %s\n" f)))
+                (format "Mayan date: %s\n"
+                        (calendar-mayan-date-string date)))))
+        (goto-char (point-min))
+        (restore-buffer-modified-p modified))
       (display-buffer other-calendars-buffer))))
 
 (defun calendar-print-day-of-year ()
@@ -3099,11 +3105,15 @@
 
 (defun calendar-set-mode-line (str)
   "Set mode line to STR, centered, surrounded by dashes."
-  (setq mode-line-format
-        (calendar-string-spread
-         (list str) ?-
+  (let* ((edges (window-edges))
          ;; As per doc of window-width, total visible mode-line length.
-         (let ((edges (window-edges))) (- (nth 2 edges) (nth 0 edges))))))
+         (width (- (nth 2 edges) (nth 0 edges))))
+    (setq mode-line-format
+          (if buffer-file-name
+              `("-" mode-line-modified
+                ,(calendar-string-spread (list str) ?- (- width 6))
+                "---")
+            (calendar-string-spread (list str) ?- width)))))
 
 (defun calendar-mod (m n)
   "Non-negative remainder of M/N with N instead of 0."
--- a/lisp/completion.el	Tue Jan 24 02:01:42 2006 +0000
+++ b/lisp/completion.el	Wed Jan 25 07:10:04 2006 +0000
@@ -82,11 +82,11 @@
 ;;  SAVING/LOADING COMPLETIONS
 ;;   Completions are automatically saved from one session to another
 ;; (unless save-completions-flag or enable-completion is nil).
-;; Activating this minor-mode calling completion-initialize) causes Emacs
-;; to load a completions database for a saved completions file
+;; Activating this minor-mode (calling completion-initialize) loads
+;; a completions database for a saved completions file
 ;; (default: ~/.completions).  When you exit, Emacs saves a copy of the
-;; completions that you
-;; often use.  When you next start, Emacs loads in the saved completion file.
+;; completions that you often use.  When you next start, Emacs loads in
+;; the saved completion file.
 ;;
 ;;   The number of completions saved depends loosely on
 ;; *saved-completions-decay-factor*.  Completions that have never been
@@ -2250,13 +2250,14 @@
 TYPE is the type of the wrapper to be added.  Can be :before or :under."
   (put function-name 'completion-function
        (cdr (assq type
-                  '((:separator 'use-completion-before-separator)
-                    (:before 'use-completion-before-point)
-                    (:backward-under 'use-completion-backward-under)
-                    (:backward 'use-completion-backward)
-                    (:under 'use-completion-under-point)
-                    (:under-or-before 'use-completion-under-or-before-point)
-                    (:minibuffer-separator 'use-completion-minibuffer-separator))))))
+                  '((:separator . use-completion-before-separator)
+                    (:before . use-completion-before-point)
+                    (:backward-under . use-completion-backward-under)
+                    (:backward . use-completion-backward)
+                    (:under . use-completion-under-point)
+                    (:under-or-before . use-completion-under-or-before-point)
+                    (:minibuffer-separator
+		     . use-completion-minibuffer-separator))))))
 
 (defun use-completion-minibuffer-separator ()
   (let ((completion-syntax-table completion-standard-syntax-table))
@@ -2354,7 +2355,7 @@
     (if dynamic-completion-mode
         (add-hook (car x) (cdr x))
       (remove-hook (car x) (cdr x))))
-  
+
   ;; "Complete" Key Keybindings.  We don't want to use a minor-mode
   ;; map because these have too high a priority.  We could/should
   ;; probably change the interpretation of minor-mode-map-alist such
--- a/lisp/cus-edit.el	Tue Jan 24 02:01:42 2006 +0000
+++ b/lisp/cus-edit.el	Wed Jan 25 07:10:04 2006 +0000
@@ -1470,22 +1470,19 @@
 			       (if custom-raised-buttons
 				   "`Raised' text indicates"
 				 "Square brackets indicate")))
-	(widget-create 'info-link
+	(widget-create 'custom-manual
 		       :tag "Custom file"
-		       :button-face 'custom-link
-		       :mouse-face 'highlight
 		       "(emacs)Saving Customizations")
 	(widget-insert
 	 " for information on how to save in a different file.\n
 See ")
-	(widget-create 'info-link
+	(widget-create 'custom-manual
 		       :tag "Help"
-		       :button-face 'custom-link
-		       :mouse-face 'highlight
 		       :help-echo "Read the online help."
 		       "(emacs)Easy Customization")
 	(widget-insert " for more information.\n\n")
-	(widget-insert "Operate on everything in this buffer:\n "))
+	(widget-insert "Operate on all settings in this buffer that \
+are not marked HIDDEN:\n "))
     (widget-insert " "))
   (widget-create 'push-button
 		 :tag "Set for Current Session"
@@ -1496,10 +1493,8 @@
   (if (not custom-buffer-verbose-help)
       (progn
 	(widget-insert " ")
-	(widget-create 'info-link
+	(widget-create 'custom-manual
 		       :tag "Help"
-		       :button-face 'custom-link
-		       :mouse-face 'highlight
 		       :help-echo "Read the online help."
 		       "(emacs)Easy Customization")))
   (when (or custom-file user-init-file)
@@ -1647,7 +1642,7 @@
   (let ((custom-buffer-style 'tree))
     (custom-toggle-parent widget)))
 
-(define-widget 'custom-browse-group-tag 'push-button
+(define-widget 'custom-browse-group-tag 'custom-group-link
   "Show parent in other window when activated."
   :tag "Group"
   :tag-glyph "folder"
@@ -1657,7 +1652,7 @@
   (let ((parent (widget-get widget :parent)))
     (customize-group-other-window (widget-value parent))))
 
-(define-widget 'custom-browse-variable-tag 'push-button
+(define-widget 'custom-browse-variable-tag 'custom-group-link
   "Show parent in other window when activated."
   :tag "Option"
   :tag-glyph "option"
@@ -1667,7 +1662,7 @@
   (let ((parent (widget-get widget :parent)))
     (customize-variable-other-window (widget-value parent))))
 
-(define-widget 'custom-browse-face-tag 'push-button
+(define-widget 'custom-browse-face-tag 'custom-group-link
   "Show parent in other window when activated."
   :tag "Face"
   :tag-glyph "face"
@@ -2009,13 +2004,7 @@
   :group 'custom-faces)
 
 (defface custom-button-unraised
-  '((((min-colors 88)
-      (class color) (background light)) :foreground "blue1" :underline t)
-    (((class color) (background light)) :foreground "blue" :underline t)
-    (((min-colors 88)
-      (class color) (background dark)) :foreground "cyan1" :underline t)
-    (((class color) (background dark)) :foreground "cyan" :underline t)
-    (t :underline t))
+  '((t :inherit underline))
   "Face for custom buffer buttons if `custom-raised-buttons' is nil."
   :version "22.1"
   :group 'custom-faces)
@@ -2070,15 +2059,10 @@
 (put 'custom-state-face 'face-alias 'custom-state)
 
 (defface custom-link
-  '((((min-colors 88)
-      (class color) (background light)) :foreground "blue1" :underline t)
-    (((class color) (background light)) :foreground "blue" :underline t)
-    (((min-colors 88)
-      (class color) (background dark)) :foreground "cyan1" :underline t)
-    (((class color) (background dark)) :foreground "cyan" :underline t)
-    (t :underline t))
-  "Face for Info links in customization buffers."
-  :group 'info)
+  '((t :inherit link))
+  "Face for links in customization buffers."
+  :version "22.1"
+  :group 'custom-faces)
 
 (define-widget 'custom 'default
   "Customize a user option."
@@ -2245,8 +2229,6 @@
 		  (insert " ")
 		  (push (widget-create-child-and-convert
 			 widget 'custom-group-link
-			 :button-face 'custom-link
-			 :mouse-face 'highlight
 			 :tag (custom-unlispify-tag-name symbol)
 			 symbol)
 			buttons)
@@ -3323,7 +3305,7 @@
 (defvar custom-face-menu
   `(("Set for Current Session" custom-face-set)
     ,@(when (or custom-file user-init-file)
-	'(("Save for Future Sessions" custom-face-save-command)))
+	'(("Save for Future Sessions" custom-face-save)))
     ("Undo Edits" custom-redraw
      (lambda (widget)
        (memq (widget-get widget :custom-state) '(modified changed))))
@@ -3448,13 +3430,8 @@
     (custom-face-state-set widget)
     (custom-redraw-magic widget)))
 
-(defun custom-face-save-command (widget)
+(defun custom-face-save (widget)
   "Save in `.emacs' the face attributes in WIDGET."
-  (custom-face-save widget)
-  (custom-save-all))
-
-(defun custom-face-save (widget)
-  "Prepare for saving WIDGET's face attributes, but don't write `.emacs'."
   (let* ((symbol (widget-value widget))
 	 (child (car (widget-get widget :children)))
 	 (value (custom-post-filter-face-spec (widget-value child)))
@@ -3480,6 +3457,10 @@
     (custom-face-state-set widget)
     (custom-redraw-magic widget)))
 
+;; For backward compatibility.
+(define-obsolete-function-alias 'custom-face-save-command 'custom-face-save
+  "22.1")
+
 (defun custom-face-reset-saved (widget)
   "Restore WIDGET to the face's default attributes."
   (let* ((symbol (widget-value widget))
@@ -3607,6 +3588,8 @@
 
 (define-widget 'custom-group-link 'link
   "Show parent in other window when activated."
+  :button-face 'custom-link
+  :mouse-face 'highlight
   :help-echo "Create customization buffer for this group."
   :action 'custom-group-link-action)
 
@@ -3805,8 +3788,6 @@
 	   (if (eq custom-buffer-style 'links)
 	       (push (widget-create-child-and-convert
 		      widget 'custom-group-link
-		      :button-face 'custom-link
-		      :mouse-face 'highlight
 		      :tag "Go to Group"
 		      symbol)
 		     buttons)
@@ -4400,6 +4381,15 @@
     ["Erase Customization" Custom-reset-standard t]
     ["Info" (info "(emacs)Easy Customization") t]))
 
+(defvar custom-field-keymap
+  (let ((map (copy-keymap widget-field-keymap)))
+    (define-key map "\C-c\C-c" 'Custom-set)
+    (define-key map "\C-x\C-s" 'Custom-save)
+    map)
+  "Keymap used inside editable fields in customization buffers.")
+
+(widget-put (get 'editable-field 'widget-type) :keymap custom-field-keymap)
+
 (defun Custom-goto-parent ()
   "Go to the parent group listed at the top of this buffer.
 If several parents are listed, go to the first of them."
@@ -4425,17 +4415,18 @@
 
 The following commands are available:
 
-Move to next button or editable field.     \\[widget-forward]
-Move to previous button or editable field. \\[widget-backward]
-\\<widget-field-keymap>\
+\\<widget-keymap>\
+Move to next button, link or editable field.     \\[widget-forward]
+Move to previous button, link or editable field. \\[widget-backward]
+\\<custom-field-keymap>\
 Complete content of editable text field.   \\[widget-complete]
 \\<custom-mode-map>\
-Invoke button under the mouse pointer.     \\[Custom-move-and-invoke]
-Invoke button under point.		   \\[widget-button-press]
+Invoke button under the mouse pointer.     \\[widget-move-and-invoke]
+Invoke button under point.                 \\[widget-button-press]
 Set all options from current text.         \\[Custom-set]
 Make values in current text permanent.     \\[Custom-save]
-Make text match actual option values.	   \\[Custom-reset-current]
-Reset options to permanent settings.	   \\[Custom-reset-saved]
+Make text match actual option values.      \\[Custom-reset-current]
+Reset options to permanent settings.       \\[Custom-reset-saved]
 Erase customizations; set options
   and buffer text to the standard values.  \\[Custom-reset-standard]
 
--- a/lisp/desktop.el	Tue Jan 24 02:01:42 2006 +0000
+++ b/lisp/desktop.el	Wed Jan 25 07:10:04 2006 +0000
@@ -966,7 +966,7 @@
 (defun desktop-load-file (function)
   "Load the file where auto loaded FUNCTION is defined."
   (when function
-    (let ((fcell (symbol-function function)))
+    (let ((fcell (and (fboundp function) (symbol-function function))))
       (when (and (listp fcell)
                  (eq 'autoload (car fcell)))
         (load (cadr fcell))))))
--- a/lisp/dired.el	Tue Jan 24 02:01:42 2006 +0000
+++ b/lisp/dired.el	Wed Jan 25 07:10:04 2006 +0000
@@ -286,6 +286,9 @@
 This is an alist of the form (SUBDIR . SWITCHES).")
 (make-variable-buffer-local 'dired-switches-alist)
 
+(defvaralias 'dired-move-to-filename-regexp
+  'directory-listing-before-filename-regexp)
+
 (defvar dired-subdir-regexp "^. \\([^\n\r]+\\)\\(:\\)[\n\r]"
   "Regexp matching a maybe hidden subdirectory line in `ls -lR' output.
 Subexpression 1 is the subdirectory proper, no trailing colon.
@@ -2514,11 +2517,18 @@
       (set-window-start w2 1)
       )))
 
-(defvar dired-no-confirm nil
+(defcustom dired-no-confirm nil
   "A list of symbols for commands Dired should not confirm.
 Command symbols are `byte-compile', `chgrp', `chmod', `chown', `compress',
 `copy', `delete', `hardlink', `load', `move', `print', `shell', `symlink',
-`touch' and `uncompress'.")
+`touch' and `uncompress'."
+  :group 'dired
+  :type '(set (const byte-compile) (const chgrp)
+	      (const chmod) (const chown) (const compress)
+	      (const copy) (const delete) (const hardlink)
+	      (const load) (const move) (const print)
+	      (const shell) (const symlink) (const touch)
+	      (const uncompress)))
 
 (defun dired-mark-pop-up (bufname op-symbol files function &rest args)
   "Return FUNCTION's result on ARGS after showing which files are marked.
@@ -3091,9 +3101,9 @@
   (if (eq major-mode 'dired-mode) (dired-sort-set-modeline))
   (or no-revert (revert-buffer)))
 
-(make-variable-buffer-local
- (defvar dired-subdir-alist-pre-R nil
-   "Value of `dired-subdir-alist' before -R switch added."))
+(defvar dired-subdir-alist-pre-R nil
+  "Value of `dired-subdir-alist' before -R switch added.")
+(make-variable-buffer-local 'dired-subdir-alist-pre-R)
 
 (defun dired-sort-R-check (switches)
   "Additional processing of -R in ls option string SWITCHES.
--- a/lisp/emacs-lisp/find-func.el	Tue Jan 24 02:01:42 2006 +0000
+++ b/lisp/emacs-lisp/find-func.el	Wed Jan 25 07:10:04 2006 +0000
@@ -165,7 +165,7 @@
 defined in C.")
 
 (defun find-function-C-source (fun-or-var file type)
-  "Find the source location where SUBR-OR-VAR is defined in FILE.
+  "Find the source location where FUN-OR-VAR is defined in FILE.
 TYPE should be nil to find a function, or `defvar' to find a variable."
   (unless find-function-C-source-directory
     (setq find-function-C-source-directory
@@ -243,7 +243,7 @@
 (defun find-function-noselect (function)
   "Return a pair (BUFFER . POINT) pointing to the definition of FUNCTION.
 
-Finds the Emacs Lisp library containing the definition of FUNCTION
+Finds the source file containing the definition of FUNCTION
 in a buffer and the point of the definition.  The buffer is
 not selected.
 
@@ -335,7 +335,7 @@
 (defun find-function (function)
   "Find the definition of the FUNCTION near point.
 
-Finds the Emacs Lisp library containing the definition of the function
+Finds the source file containing the definition of the function
 near point (selected by `function-called-at-point') in a buffer and
 places point before the definition.
 Set mark before moving, if the buffer already existed.
@@ -356,7 +356,7 @@
 
 ;;;###autoload
 (defun find-function-other-frame (function)
-  "Find, in ananother frame, the definition of FUNCTION near point.
+  "Find, in another frame, the definition of FUNCTION near point.
 
 See `find-function' for more details."
   (interactive (find-function-read))
@@ -364,24 +364,25 @@
 
 ;;;###autoload
 (defun find-variable-noselect (variable &optional file)
-  "Return a pair `(BUFFER . POINT)' pointing to the definition of SYMBOL.
+  "Return a pair `(BUFFER . POINT)' pointing to the definition of VARIABLE.
 
-Finds the Emacs Lisp library containing the definition of SYMBOL
-in a buffer, and the point of the definition.  It does not switch
-to the buffer or display it.
+Finds the library containing the definition of VARIABLE in a buffer and
+the point of the definition.  The buffer is not selected.
 
 The library where VARIABLE is defined is searched for in FILE or
 `find-function-source-path', if non nil, otherwise in `load-path'."
   (if (not variable)
-      (error "You didn't specify a variable"))
-  (let ((library (or file (symbol-file variable 'defvar))))
-    (find-function-search-for-symbol variable 'defvar library)))
+      (error "You didn't specify a variable")
+    (let ((library (or file
+                       (symbol-file variable 'defvar)
+                       (help-C-file-name variable 'var))))
+      (find-function-search-for-symbol variable 'defvar library))))
 
 ;;;###autoload
 (defun find-variable (variable)
   "Find the definition of the VARIABLE near point.
 
-Finds the Emacs Lisp library containing the definition of the variable
+Finds the library containing the definition of the variable
 near point (selected by `variable-at-point') in a buffer and
 places point before the definition.
 
@@ -403,7 +404,7 @@
 
 ;;;###autoload
 (defun find-variable-other-frame (variable)
-  "Find, in annother frame, the definition of VARIABLE near point.
+  "Find, in another frame, the definition of VARIABLE near point.
 
 See `find-variable' for more details."
   (interactive (find-function-read 'defvar))
@@ -412,18 +413,22 @@
 ;;;###autoload
 (defun find-definition-noselect (symbol type &optional file)
   "Return a pair `(BUFFER . POINT)' pointing to the definition of SYMBOL.
-TYPE says what type of definition: nil for a function,
-`defvar' or `defface' for a variable or face.  This function
-does not switch to the buffer or display it.
+TYPE says what type of definition: nil for a function, `defvar' for a
+variabke, `defface' for a face.  This function does not switch to the
+buffer nor display it.
 
 The library where SYMBOL is defined is searched for in FILE or
 `find-function-source-path', if non nil, otherwise in `load-path'."
-  (if (not symbol)
-      (error "You didn't specify a symbol"))
-  (if (null type)
-      (find-function-noselect symbol)
+  (cond
+   ((not symbol)
+    (error "You didn't specify a symbol"))
+   ((null type)
+    (find-function-noselect symbol))
+   ((eq type 'defvar)
+    (find-variable-noselect symbol file))
+   (t
     (let ((library (or file (symbol-file symbol type))))
-      (find-function-search-for-symbol symbol type library))))
+      (find-function-search-for-symbol symbol type library)))))
 
 ;; For symmetry, this should be called find-face; but some programs
 ;; assume that, if that name is defined, it means something else.
@@ -480,7 +485,7 @@
 
 ;;;###autoload
 (defun find-variable-at-point ()
-  "Find directly the function at point in the other window."
+  "Find directly the variable at point in the other window."
   (interactive)
   (let ((symb (variable-at-point)))
     (when (and symb (not (equal symb 0)))
--- a/lisp/faces.el	Tue Jan 24 02:01:42 2006 +0000
+++ b/lisp/faces.el	Wed Jan 25 07:10:04 2006 +0000
@@ -1918,6 +1918,28 @@
   :group 'basic-faces
   :version "22.1")
 
+(defface link
+  '((((class color) (min-colors 88) (background light))
+     :foreground "blue1" :underline t)
+    (((class color) (background light))
+     :foreground "blue" :underline t)
+    (((class color) (min-colors 88) (background dark))
+     :foreground "cyan1" :underline t)
+    (((class color) (background dark))
+     :foreground "cyan" :underline t)
+    (t :inherit underline))
+  "Basic face for unvisited links."
+  :group 'basic-faces
+  :version "22.1")
+
+(defface link-visited
+  '((default :inherit link)
+    (((class color) (background light)) :foreground "magenta4")
+    (((class color) (background dark)) :foreground "violet"))
+  "Basic face for visited links."
+  :group 'basic-faces
+  :version "22.1")
+
 (defface highlight
   '((((class color) (min-colors 88) (background light))
      :background "darkseagreen2")
--- a/lisp/font-lock.el	Tue Jan 24 02:01:42 2006 +0000
+++ b/lisp/font-lock.el	Wed Jan 25 07:10:04 2006 +0000
@@ -2127,7 +2127,7 @@
        ;; Constant values.
        ("\\<:\\sw+\\>" 0 font-lock-builtin-face)
        ;; ELisp and CLisp `&' keywords as types.
-       ("\\&\\sw+\\>" . font-lock-type-face)
+       ("\\<\\&\\sw+\\>" . font-lock-type-face)
        ;; ELisp regexp grouping constructs
        ((lambda (bound)
           (catch 'found
--- a/lisp/gnus/ChangeLog	Tue Jan 24 02:01:42 2006 +0000
+++ b/lisp/gnus/ChangeLog	Wed Jan 25 07:10:04 2006 +0000
@@ -1,3 +1,62 @@
+2006-01-25  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+	* mm-uu.el (mm-uu-dissect-text-parts): Ignore it if a given part
+	is dissected into a single part of which the type is the same as
+	the given one.
+
+2006-01-21  Kevin Ryde  <user42@zip.com.au>
+
+	* mailcap.el (mailcap-parse-mailcap-extras): "test" key must go
+	into alists as symbol not string, since that's what
+	mailcap-viewer-passes-test and mailcap-mailcap-entry-passes-test
+	look for.
+
+2006-01-24  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+	* mm-uu.el (mm-uu-dissect-text-parts): Reduce the number of
+	recursive calls.
+
+2006-01-24  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+	* mm-view.el (mm-w3m-standalone-supports-m17n-p): New variable.
+	(mm-w3m-standalone-supports-m17n-p): New function.
+	(mm-inline-text-html-render-with-w3m-standalone): Use it to alter
+	w3m usage.
+
+	* gnus-art.el (gnus-article-wash-html-with-w3m-standalone): Use
+	mm-w3m-standalone-supports-m17n-p to alter w3m usage.
+
+2006-01-23  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+	* mm-uu.el (mm-uu-dissect-text-parts): Decode content transfer
+	encoding.
+
+2006-01-20  Reiner Steib  <Reiner.Steib@gmx.de>
+
+	* mml.el (mml-attach-file): Describe `description' in doc string.
+	(mml-menu): Add Emacs MIME manual and PGG manual.
+
+2006-01-19  Reiner Steib  <Reiner.Steib@gmx.de>
+
+	* spam.el (spam-group-ham-mark-p, spam-group-spam-mark-p)
+	(spam-group-spam-marks, spam-list-articles, spam-group-ham-marks):
+	Revert 2006-01-08 change because the functions will be used in No
+	Gnus.
+
+2006-01-19  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+	* mm-bodies.el (mm-decode-body): Don't decode decoded body.
+
+	* mm-uu.el (mm-uu-dissect-text-parts): Dissect dissected parts.
+
+2006-01-17  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+	* mm-decode.el (mm-inlined-types): Add application/pgp.
+	(mm-automatic-display): Ditto.
+
+	* mm-uu.el (mm-uu-dissect-text-parts): Recognize application/pgp
+	part as text.
+
 2006-01-16  Katsumi Yamaoka  <yamaoka@jpl.org>
 
 	* nnrss.el: Update copyright.
--- a/lisp/gnus/gnus-art.el	Tue Jan 24 02:01:42 2006 +0000
+++ b/lisp/gnus/gnus-art.el	Wed Jan 25 07:10:04 2006 +0000
@@ -2541,15 +2541,18 @@
 
 (defun gnus-article-wash-html-with-w3m-standalone ()
   "Wash the current buffer with w3m."
-  (unless (mm-coding-system-p charset)
-    ;; The default.
-    (setq charset 'iso-8859-1))
-  (let ((coding-system-for-write charset)
-	(coding-system-for-read charset))
-    (call-process-region
-     (point-min) (point-max)
-     "w3m" t t nil "-dump" "-T" "text/html"
-     "-I" (symbol-name charset) "-O" (symbol-name charset))))
+  (if (mm-w3m-standalone-supports-m17n-p)
+      (progn
+	(unless (mm-coding-system-p charset) ;; Bound by `article-wash-html'.
+	  ;; The default.
+	  (setq charset 'iso-8859-1))
+	(let ((coding-system-for-write charset)
+	      (coding-system-for-read charset))
+	  (call-process-region
+	   (point-min) (point-max)
+	   "w3m" t t nil "-dump" "-T" "text/html"
+	   "-I" (symbol-name charset) "-O" (symbol-name charset))))
+    (mm-inline-wash-with-stdin nil "w3m" "-dump" "-T" "text/html")))
 
 (defun article-hide-list-identifiers ()
   "Remove list identifies from the Subject header.
--- a/lisp/gnus/mailcap.el	Tue Jan 24 02:01:42 2006 +0000
+++ b/lisp/gnus/mailcap.el	Wed Jan 25 07:10:04 2006 +0000
@@ -528,7 +528,12 @@
 		    (skip-chars-forward ";"))
 		(setq done t))))
 	  (setq	value (buffer-substring val-pos (point))))
-	(setq results (cons (cons name value) results))
+	;; `test' as symbol, others like "copiousoutput" and "needsx11" as
+	;; strings
+	(setq results (cons (cons (if (string-equal name "test")
+                                      'test
+                                    name)
+                                  value) results))
 	(skip-chars-forward " \";\n\t"))
       results)))
 
--- a/lisp/gnus/mm-bodies.el	Tue Jan 24 02:01:42 2006 +0000
+++ b/lisp/gnus/mm-bodies.el	Wed Jan 25 07:10:04 2006 +0000
@@ -1,7 +1,7 @@
 ;;; mm-bodies.el --- Functions for decoding MIME things
 
 ;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-;;   2005 Free Software Foundation, Inc.
+;;   2005, 2006 Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
 ;;	MORIOKA Tomohiko <morioka@jaist.ac.jp>
@@ -248,7 +248,8 @@
   (save-excursion
     (when encoding
       (mm-decode-content-transfer-encoding encoding type))
-    (when (featurep 'mule)  ; Fixme: Wrong test for unibyte session.
+    (when (and (featurep 'mule) ;; Fixme: Wrong test for unibyte session.
+	       (not (eq charset 'gnus-decoded)))
       (let ((coding-system (mm-charset-to-coding-system charset)))
 	(if (and (not coding-system)
 		 (listp mail-parse-ignored-charsets)
@@ -261,8 +262,7 @@
 		   ;;in XEmacs
 		   (mm-multibyte-p)
 		   (or (not (eq coding-system 'ascii))
-		       (setq coding-system mail-parse-charset))
-		   (not (eq coding-system 'gnus-decoded)))
+		       (setq coding-system mail-parse-charset)))
 	  (mm-decode-coding-region (point-min) (point-max)
 				   coding-system))
 	(setq buffer-file-coding-system
--- a/lisp/gnus/mm-decode.el	Tue Jan 24 02:01:42 2006 +0000
+++ b/lisp/gnus/mm-decode.el	Wed Jan 25 07:10:04 2006 +0000
@@ -1,7 +1,7 @@
 ;;; mm-decode.el --- Functions for decoding MIME things
 
 ;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-;;   2005 Free Software Foundation, Inc.
+;;   2005, 2006 Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
 ;;	MORIOKA Tomohiko <morioka@jaist.ac.jp>
@@ -279,7 +279,9 @@
     "application/x-emacs-lisp"
     "application/pgp-signature" "application/x-pkcs7-signature"
     "application/pkcs7-signature" "application/x-pkcs7-mime"
-    "application/pkcs7-mime")
+    "application/pkcs7-mime"
+    ;; Mutt still uses this even though it has already been withdrawn.
+    "application/pgp")
   "List of media types that are to be displayed inline.
 See also `mm-inline-media-tests', which says how to display a media
 type inline."
@@ -302,7 +304,9 @@
     "application/emacs-lisp" "application/x-emacs-lisp"
     "application/x-pkcs7-signature"
     "application/pkcs7-signature" "application/x-pkcs7-mime"
-    "application/pkcs7-mime")
+    "application/pkcs7-mime"
+    ;; Mutt still uses this even though it has already been withdrawn.
+    "application/pgp")
   "A list of MIME types to be displayed automatically."
   :type '(repeat regexp)
   :group 'mime-display)
--- a/lisp/gnus/mm-uu.el	Tue Jan 24 02:01:42 2006 +0000
+++ b/lisp/gnus/mm-uu.el	Wed Jan 25 07:10:04 2006 +0000
@@ -511,21 +511,40 @@
 
 (defun mm-uu-dissect-text-parts (handle)
   "Dissect text parts and put uu handles into HANDLE."
-  (let ((buffer (mm-handle-buffer handle))
-	type children)
+  (let ((buffer (mm-handle-buffer handle)))
     (cond ((stringp buffer)
 	   (dolist (elem (cdr handle))
 	     (mm-uu-dissect-text-parts elem)))
 	  ((bufferp buffer)
-	   (when (and (setq type (mm-handle-media-type handle))
-		      (stringp type)
-		      (string-match "\\`text/" type)
-		      (with-current-buffer buffer
-			(setq children
-			      (mm-uu-dissect t (mm-handle-type handle)))))
-	     (kill-buffer buffer)
-	     (setcar handle (car children))
-	     (setcdr handle (cdr children))))
+	   (let ((type (mm-handle-media-type handle))
+		 (case-fold-search t) ;; string-match
+		 encoding children)
+	     (when (and
+		    (stringp type)
+		    ;; Mutt still uses application/pgp even though
+		    ;; it has already been withdrawn.
+		    (string-match "\\`text/\\|\\`application/pgp\\'" type)
+		    (setq children
+			  (with-current-buffer buffer
+			    (if (setq encoding (mm-handle-encoding handle))
+				;; Inherit the multibyteness of the `buffer'.
+				(with-temp-buffer
+				  (insert-buffer-substring buffer)
+				  (mm-decode-content-transfer-encoding
+				   encoding type)
+				  (mm-uu-dissect t (mm-handle-type handle)))
+			      (mm-uu-dissect t (mm-handle-type handle))))))
+	       ;; Ignore it if a given part is dissected into a single
+	       ;; part of which the type is the same as the given one.
+	       (if (and (<= (length children) 2)
+			(string-equal (mm-handle-media-type (cadr children))
+				      type))
+		   (kill-buffer (mm-handle-buffer (cadr children)))
+		 (kill-buffer buffer)
+		 (setcdr handle (cdr children))
+		 (setcar handle (car children)) ;; "multipart/mixed"
+		 (dolist (elem (cdr children))
+		   (mm-uu-dissect-text-parts elem))))))
 	  (t
 	   (dolist (elem handle)
 	     (mm-uu-dissect-text-parts elem))))))
--- a/lisp/gnus/mm-view.el	Tue Jan 24 02:01:42 2006 +0000
+++ b/lisp/gnus/mm-view.el	Wed Jan 25 07:10:04 2006 +0000
@@ -262,29 +262,57 @@
 	      (delete-region ,(point-min-marker)
 			     ,(point-max-marker)))))))))
 
+(defvar mm-w3m-standalone-supports-m17n-p (if (featurep 'mule) 'undecided)
+  "*T means the w3m command supports the m17n feature.")
+
+(defun mm-w3m-standalone-supports-m17n-p ()
+  "Say whether the w3m command supports the m17n feature."
+  (cond ((eq mm-w3m-standalone-supports-m17n-p t) t)
+	((eq mm-w3m-standalone-supports-m17n-p nil) nil)
+	((not (featurep 'mule)) (setq mm-w3m-standalone-supports-m17n-p nil))
+	((condition-case nil
+	     (let ((coding-system-for-write 'iso-2022-jp)
+		   (coding-system-for-read 'iso-2022-jp)
+		   (str (mm-decode-coding-string "\
+\e$B#D#o#e#s!!#w#3#m!!#s#u#p#p#o#r#t#s!!#m#1#7#n!)\e(B" 'iso-2022-jp)))
+	       (mm-with-multibyte-buffer
+		 (insert str)
+		 (call-process-region
+		  (point-min) (point-max) "w3m" t t nil "-dump"
+		  "-T" "text/html" "-I" "iso-2022-jp" "-O" "iso-2022-jp")
+		 (goto-char (point-min))
+		 (search-forward str nil t)))
+	   (error nil))
+	 (setq mm-w3m-standalone-supports-m17n-p t))
+	(t
+	 ;;(message "You had better upgrade your w3m command")
+	 (setq mm-w3m-standalone-supports-m17n-p nil))))
+
 (defun mm-inline-text-html-render-with-w3m-standalone (handle)
   "Render a text/html part using w3m."
-  (let ((source (mm-get-part handle))
-	(charset (mail-content-type-get (mm-handle-type handle) 'charset))
-	cs)
-    (unless (and charset
-		 (setq cs (mm-charset-to-coding-system charset))
-		 (not (eq cs 'ascii)))
-      ;; The default.
-      (setq charset "iso-8859-1"
-	    cs 'iso-8859-1))
-    (mm-insert-inline
-     handle
-     (mm-with-unibyte-buffer
-       (insert source)
-       (mm-enable-multibyte)
-       (let ((coding-system-for-write 'binary)
-	     (coding-system-for-read cs))
-	 (call-process-region
-	  (point-min) (point-max)
-	  "w3m" t t nil "-dump" "-T" "text/html"
-	  "-I" charset "-O" charset))
-       (buffer-string)))))
+  (if (mm-w3m-standalone-supports-m17n-p)
+      (let ((source (mm-get-part handle))
+	    (charset (mail-content-type-get (mm-handle-type handle) 'charset))
+	    cs)
+	(unless (and charset
+		     (setq cs (mm-charset-to-coding-system charset))
+		     (not (eq cs 'ascii)))
+	  ;; The default.
+	  (setq charset "iso-8859-1"
+		cs 'iso-8859-1))
+	(mm-insert-inline
+	 handle
+	 (mm-with-unibyte-buffer
+	   (insert source)
+	   (mm-enable-multibyte)
+	   (let ((coding-system-for-write 'binary)
+		 (coding-system-for-read cs))
+	     (call-process-region
+	      (point-min) (point-max)
+	      "w3m" t t nil "-dump" "-T" "text/html"
+	      "-I" charset "-O" charset))
+	   (buffer-string))))
+    (mm-inline-render-with-stdin handle nil "w3m" "-dump" "-T" "text/html")))
 
 (defun mm-links-remove-leading-blank ()
   ;; Delete the annoying three spaces preceding each line of links
--- a/lisp/gnus/mml.el	Tue Jan 24 02:01:42 2006 +0000
+++ b/lisp/gnus/mml.el	Wed Jan 25 07:10:04 2006 +0000
@@ -38,6 +38,7 @@
   (autoload 'gnus-add-minor-mode "gnus-ems")
   (autoload 'gnus-make-local-hook "gnus-util")
   (autoload 'message-fetch-field "message")
+  (autoload 'message-info "message")
   (autoload 'fill-flowed-encode "flow-fill")
   (autoload 'message-posting-charset "message"))
 
@@ -916,7 +917,14 @@
     ;;["Narrow" mml-narrow-to-part t]
     ["Quote MML" mml-quote-region t]
     ["Validate MML" mml-validate t]
-    ["Preview" mml-preview t]))
+    ["Preview" mml-preview t]
+    "----"
+    ["Emacs MIME manual" (lambda () (interactive) (message-info 4))
+     ,@(if (featurep 'xemacs) '(t)
+	 '(:help "Display the Emacs MIME manual"))]
+    ["PGG manual" (lambda () (interactive) (message-info 16))
+     ,@(if (featurep 'xemacs) '(t)
+	 '(:help "Display the PGG manual"))]))
 
 (defvar mml-mode nil
   "Minor mode for editing MML.")
@@ -1035,9 +1043,12 @@
 The file is not inserted or encoded until you send the message with
 `\\[message-send-and-exit]' or `\\[message-send]'.
 
-FILE is the name of the file to attach.  TYPE is its content-type, a
-string of the form \"type/subtype\".  DESCRIPTION is a one-line
-description of the attachment."
+FILE is the name of the file to attach.  TYPE is its
+content-type, a string of the form \"type/subtype\".  DESCRIPTION
+is a one-line description of the attachment.  The DISPOSITION
+specifies how the attachment is intended to be displayed.  It can
+be either \"inline\" (displayed automatically within the message
+body) or \"attachment\" (separate from the body)."
   (interactive
    (let* ((file (mml-minibuffer-read-file "Attach file: "))
 	  (type (mml-minibuffer-read-type file))
--- a/lisp/gnus/spam.el	Tue Jan 24 02:01:42 2006 +0000
+++ b/lisp/gnus/spam.el	Wed Jan 25 07:10:04 2006 +0000
@@ -467,14 +467,28 @@
   "Logical exclusive `or'."
   (and (or a b) (not (and a b))))
 
+(defun spam-group-ham-mark-p (group mark &optional spam)
+  (when (stringp group)
+    (let* ((marks (spam-group-ham-marks group spam))
+	   (marks (if (symbolp mark)
+		      marks
+		    (mapcar 'symbol-value marks))))
+      (memq mark marks))))
+
+(defun spam-group-spam-mark-p (group mark)
+  (spam-group-ham-mark-p group mark t))
+
 (defun spam-group-ham-marks (group &optional spam)
   (when (stringp group)
-    (let ((marks (car (if spam
-			  (gnus-parameter-spam-marks group)
-			(gnus-parameter-ham-marks group)))))
-      (if (listp (car marks))
-	  (car marks)
-	marks))))
+    (let* ((marks (if spam
+		      (gnus-parameter-spam-marks group)
+		    (gnus-parameter-ham-marks group)))
+	   (marks (car marks))
+	   (marks (if (listp (car marks)) (car marks) marks)))
+      marks)))
+
+(defun spam-group-spam-marks (group)
+  (spam-group-ham-marks group t))
 
 (defun spam-group-spam-contents-p (group)
   (if (stringp group)
@@ -1036,12 +1050,23 @@
       (nth 2 flist))))
 
 (defun spam-list-articles (articles classification)
-  (let ((marks (mapcar 'eval (spam-group-ham-marks gnus-newsgroup-name
-						   (eq classification 'spam))))
-	list)
+  (let ((mark-check (if (eq classification 'spam)
+			'spam-group-spam-mark-p
+		      'spam-group-ham-mark-p))
+	list mark-cache-yes mark-cache-no)
     (dolist (article articles)
-      (if (memq (gnus-summary-article-mark article) marks)
-	  (push article list)))
+      (let ((mark (gnus-summary-article-mark article)))
+	(unless (memq mark mark-cache-no)
+	  (if (memq mark mark-cache-yes)
+	      (push article list)
+	    ;; else, we have to actually check the mark
+	    (if (funcall mark-check
+			 gnus-newsgroup-name
+			 mark)
+		(progn
+		  (push article list)
+		  (push mark mark-cache-yes))
+	      (push mark mark-cache-no))))))
     list))
 
 (defun spam-register-routine (classification
--- a/lisp/hl-line.el	Tue Jan 24 02:01:42 2006 +0000
+++ b/lisp/hl-line.el	Wed Jan 25 07:10:04 2006 +0000
@@ -1,7 +1,7 @@
 ;;; hl-line.el --- highlight the current line
 
 ;; Copyright (C) 1998, 2000, 2001, 2002, 2003, 2004,
-;;   2005 Free Software Foundation, Inc.
+;;   2005, 2006 Free Software Foundation, Inc.
 
 ;; Author:  Dave Love <fx@gnu.org>
 ;; Maintainer: FSF
@@ -58,7 +58,7 @@
 ;; it to nil to avoid highlighting specific buffers, when the global
 ;; mode is used.
 
-;; In default whole the line is highlighted. The range of highlighting
+;; By default the whole line is highlighted.  The range of highlighting
 ;; can be changed by defining an appropriate function as the
 ;; buffer-local value of `hl-line-range-function'.
 
@@ -130,7 +130,7 @@
     (remove-hook 'pre-command-hook #'hl-line-unhighlight t)))
 
 (defun hl-line-highlight ()
-  "Active the Hl-Line overlay on the current line."
+  "Activate the Hl-Line overlay on the current line."
   (if hl-line-mode	; Might be changed outside the mode function.
       (progn
         (unless hl-line-overlay
@@ -179,9 +179,9 @@
       (delete-overlay global-hl-line-overlay)))
 
 (defun hl-line-move (overlay)
-  "Move the hl-line-mode overlay.
+  "Move the Hl-Line overlay.
 If `hl-line-range-function' is non-nil, move the OVERLAY to the position
-where the function returns. If `hl-line-range-function' is nil, fill
+where the function returns.  If `hl-line-range-function' is nil, fill
 the line including the point by OVERLAY."
   (let (tmp b e)
     (if hl-line-range-function
--- a/lisp/info.el	Tue Jan 24 02:01:42 2006 +0000
+++ b/lisp/info.el	Wed Jan 25 07:10:04 2006 +0000
@@ -129,21 +129,14 @@
 (put 'info-menu-5 'face-alias 'info-menu-star)
 
 (defface info-xref
-  '((((min-colors 88)
-      (class color) (background light)) :foreground "blue1" :underline t)
-    (((class color) (background light)) :foreground "blue" :underline t)
-    (((min-colors 88)
-      (class color) (background dark)) :foreground "cyan1" :underline t)
-    (((class color) (background dark)) :foreground "cyan" :underline t)
-    (t :underline t))
-  "Face for Info cross-references."
+  '((t :inherit link))
+  "Face for unvisited Info cross-references."
   :group 'info)
 
 (defface info-xref-visited
-  '((default :inherit info-xref)
-    (((class color) (background light)) :foreground "magenta4")
-    (((class color) (background dark)) :foreground "violet"))
+  '((t :inherit link-visited))
   "Face for visited Info cross-references."
+  :version "22.1"
   :group 'info)
 
 (defcustom Info-fontify-visited-nodes t
--- a/lisp/international/latexenc.el	Tue Jan 24 02:01:42 2006 +0000
+++ b/lisp/international/latexenc.el	Wed Jan 25 07:10:04 2006 +0000
@@ -1,6 +1,6 @@
 ;;; latexenc.el --- guess correct coding system in LaTeX files
 
-;; Copyright (C) 2005 Free Software Foundation, Inc.
+;; Copyright (C) 2005, 2006 Free Software Foundation, Inc.
 
 ;; Author: Arne J,Ax(Brgensen <arne@arnested.dk>
 ;; Keywords: mule, coding system, latex
@@ -167,6 +167,7 @@
                   (setq latexenc-main-file (tex-guess-main-file)))))
             ;; if we found a master/main file get the coding system from it
             (if (and latexenc-main-file
+		     (file-regular-p latexenc-main-file)
                      (file-readable-p latexenc-main-file))
                 (let* ((latexenc-dont-use-tex-guess-main-file-flag t)
                        (latexenc-dont-use-TeX-master-flag t)
--- a/lisp/isearch.el	Tue Jan 24 02:01:42 2006 +0000
+++ b/lisp/isearch.el	Wed Jan 25 07:10:04 2006 +0000
@@ -517,8 +517,8 @@
 Type LFD (C-j) to match end of line.
 Type \\[isearch-repeat-forward] to search again forward,\
  \\[isearch-repeat-backward] to search again backward.
-Type \\[isearch-yank-word-or-char] to yank word from buffer onto end of search\
- string and search for it.
+Type \\[isearch-yank-word-or-char] to yank next word or character in buffer
+  onto the end of the search string, and search for it.
 Type \\[isearch-del-char] to delete character from end of search string.
 Type \\[isearch-yank-char] to yank char from buffer onto end of search\
  string and search for it.
--- a/lisp/log-view.el	Tue Jan 24 02:01:42 2006 +0000
+++ b/lisp/log-view.el	Wed Jan 25 07:10:04 2006 +0000
@@ -1,7 +1,7 @@
 ;;; log-view.el --- Major mode for browsing RCS/CVS/SCCS log output
 
-;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004,
-;;   2005 Free Software Foundation, Inc.
+;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+;;           Free Software Foundation, Inc.
 
 ;; Author: Stefan Monnier <monnier@cs.yale.edu>
 ;; Keywords: rcs sccs cvs log version-control
@@ -225,8 +225,8 @@
 
 (defun log-view-minor-wrap (buf f)
   (let ((data (with-current-buffer buf
-		(let* ((beg (if mark-active (region-beginning) (point)))
-		       (end (if mark-active (region-end) (point)))
+		(let* ((beg (point))
+		       (end (if mark-active (mark) (point)))
 		       (fr (log-view-current-tag beg))
 		       (to (log-view-current-tag end)))
 		  (when (string-equal fr to)
@@ -235,8 +235,11 @@
 		      (log-view-msg-next)
 		      (setq to (log-view-current-tag))))
 		  (cons
-		   (cons (log-view-current-file) to)
-		   (cons (log-view-current-file) fr))))))
+                   ;; The first revision has to be the one at point, for
+                   ;; operations that only take one revision
+                   ;; (e.g. cvs-mode-edit).
+		   (cons (log-view-current-file) fr)
+		   (cons (log-view-current-file) to))))))
     (let ((cvs-branch-prefix (cdar data))
 	  (cvs-secondary-branch-prefix (and (cdar data) (cddr data)))
 	  (cvs-minor-current-files
--- a/lisp/mail/rmail.el	Tue Jan 24 02:01:42 2006 +0000
+++ b/lisp/mail/rmail.el	Wed Jan 25 07:10:04 2006 +0000
@@ -543,7 +543,11 @@
   "*If non-nil, RMAIL uses MIME feature.
 If the value is t, RMAIL automatically shows MIME decoded message.
 If the value is neither t nor nil, RMAIL does not show MIME decoded message
-until a user explicitly requires it."
+until a user explicitly requires it.
+
+Even if the value is non-nil, you can't use MIME feature
+if the feature specified by `rmail-mime-feature' is not available
+in your session."
   :type '(choice (const :tag "on" t)
 		 (const :tag "off" nil)
 		 (other :tag "when asked" ask))
@@ -595,7 +599,10 @@
 (defvar rmail-mime-feature 'rmail-mime
   "Feature to require to load MIME support in Rmail.
 When starting Rmail, if `rmail-enable-mime' is non-nil,
-this feature is required with `require'.")
+this feature is required with `require'.
+
+The default value is `rmail-mime'.  This feature is provided by
+the rmail-mime package available at <http://www.m17n.org/rmail-mime/>.")
 
 ;;;###autoload
 (defvar rmail-decode-mime-charset t
@@ -735,8 +742,14 @@
     (condition-case err
 	(require rmail-mime-feature)
       (error
-       (message "Feature `%s' not provided" rmail-mime-feature)
-       (sit-for 1)
+       (display-warning
+	:warning
+	(format "Although MIME support is requested
+by setting `rmail-enable-mime' to non-nil, the required feature
+`%s' (the value of `rmail-mime-feature')
+is not available in the current session.
+So, the MIME support is turned off for the moment." 
+		rmail-mime-feature))
        (setq rmail-enable-mime nil)))))
 
 
--- a/lisp/mail/rmailout.el	Tue Jan 24 02:01:42 2006 +0000
+++ b/lisp/mail/rmailout.el	Wed Jan 25 07:10:04 2006 +0000
@@ -349,9 +349,11 @@
 						 (mail-fetch-field "sender")
 						 "unknown"))
 		    " " (current-time-string) "\n"))
-	  (if mime-version
-	      (insert "MIME-Version: " mime-version
-		      "\nContent-type: " content-type "\n"))
+	  (when mime-version
+	    (insert "MIME-Version: " mime-version)
+	    ;; Some malformed MIME messages set content-type to nil.
+	    (when content-type
+	      (insert "\nContent-type: " content-type "\n")))
 	  ;; ``Quote'' "\nFrom " as "\n>From "
 	  ;;  (note that this isn't really quoting, as there is no requirement
 	  ;;   that "\n[>]+From " be quoted in the same transparent way.)
--- a/lisp/net/tramp-ftp.el	Tue Jan 24 02:01:42 2006 +0000
+++ b/lisp/net/tramp-ftp.el	Wed Jan 25 07:10:04 2006 +0000
@@ -1,6 +1,6 @@
 ;;; tramp-ftp.el --- Tramp convenience functions for Ange-FTP -*- coding: iso-8859-1; -*-
 
-;; Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+;; Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
 
 ;; Author: Michael Albinus <michael.albinus@gmx.de>
 ;; Keywords: comm, processes
@@ -63,8 +63,40 @@
 	(a2 (rassq 'ange-ftp-completion-hook-function file-name-handler-alist)))
     (setq file-name-handler-alist
 	  (delete a1 (delete a2 file-name-handler-alist)))))
-(tramp-disable-ange-ftp)
-(eval-after-load "ange-ftp" '(tramp-disable-ange-ftp))
+
+(eval-after-load "ange-ftp"
+  '(when (functionp 'tramp-disable-ange-ftp)
+     (tramp-disable-ange-ftp)))
+
+;;;###autoload
+(defun tramp-ftp-enable-ange-ftp ()
+  ;; The following code is commented out in Ange-FTP.
+
+  ;;; This regexp takes care of real ange-ftp file names (with a slash
+  ;;; and colon).
+  ;;; Don't allow the host name to end in a period--some systems use /.:
+  (or (assoc "^/[^/:]*[^/:.]:" file-name-handler-alist)
+      (setq file-name-handler-alist
+	    (cons '("^/[^/:]*[^/:.]:" . ange-ftp-hook-function)
+		  file-name-handler-alist)))
+
+  ;;; This regexp recognizes absolute filenames with only one component,
+  ;;; for the sake of hostname completion.
+  (or (assoc "^/[^/:]*\\'" file-name-handler-alist)
+      (setq file-name-handler-alist
+	    (cons '("^/[^/:]*\\'" . ange-ftp-completion-hook-function)
+		  file-name-handler-alist)))
+
+  ;;; This regexp recognizes absolute filenames with only one component
+  ;;; on Windows, for the sake of hostname completion.
+  (and (memq system-type '(ms-dos windows-nt))
+       (or (assoc "^[a-zA-Z]:/[^/:]*\\'" file-name-handler-alist)
+	   (setq file-name-handler-alist
+		 (cons '("^[a-zA-Z]:/[^/:]*\\'" .
+			 ange-ftp-completion-hook-function)
+		       file-name-handler-alist)))))
+
+(add-hook 'tramp-ftp-unload-hook 'tramp-ftp-enable-ange-ftp)
 
 ;; Define FTP method ...
 (defcustom tramp-ftp-method "ftp"
--- a/lisp/net/tramp-util.el	Tue Jan 24 02:01:42 2006 +0000
+++ b/lisp/net/tramp-util.el	Wed Jan 25 07:10:04 2006 +0000
@@ -1,7 +1,8 @@
 ;;; -*- coding: iso-2022-7bit; -*-
 ;;; tramp-util.el --- Misc utility functions to use with Tramp
 
-;; Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+;; Copyright (C) 2001, 2002, 2003, 2004, 2005,
+;;   2006 Free Software Foundation, Inc.
 
 ;; Author: kai.grossjohann@gmx.net
 ;; Keywords: comm, extensions, processes
@@ -31,6 +32,10 @@
 (eval-when-compile (require 'cl))
 (require 'compile)
 (require 'tramp)
+(add-hook 'tramp-util-unload-hook
+	  '(lambda ()
+	     (when (featurep 'tramp)
+	       (unload-feature 'tramp 'force))))
 
 ;; Define a Tramp minor mode. It's intention is to redefine some keys for Tramp
 ;; specific functions, like compilation.
@@ -42,7 +47,7 @@
       (defalias 'define-minor-mode 'identity)
       (defvar tramp-minor-mode))
   (unless (featurep 'xemacs)
-      (defalias 'add-menu-button 'identity)))
+    (defalias 'add-menu-button 'ignore)))
 
 (defvar tramp-minor-mode-map (make-sparse-keymap)
   "Keymap for Tramp minor mode.")
@@ -57,7 +62,14 @@
 	(and tramp-minor-mode (tramp-tramp-file-p default-directory))))
 
 (add-hook 'find-file-hooks 'tramp-minor-mode t)
+(add-hook 'tramp-util-unload-hook
+	  '(lambda ()
+	     (remove-hook 'find-file-hooks 'tramp-minor-mode)))
+
 (add-hook 'dired-mode-hook 'tramp-minor-mode t)
+(add-hook 'tramp-util-unload-hook
+	  '(lambda ()
+	     (remove-hook 'dired-mode-hook 'tramp-minor-mode)))
 
 (defun tramp-remap-command (old-command new-command)
   "Replaces bindings of OLD-COMMAND by NEW-COMMAND.
--- a/lisp/net/tramp-vc.el	Tue Jan 24 02:01:42 2006 +0000
+++ b/lisp/net/tramp-vc.el	Wed Jan 25 07:10:04 2006 +0000
@@ -1,7 +1,7 @@
 ;;; tramp-vc.el --- Version control integration for TRAMP.el
 
 ;; Copyright (C) 2000, 2001, 2002, 2003, 2004,
-;;   2005 Free Software Foundation, Inc.
+;;   2005, 2006 Free Software Foundation, Inc.
 
 ;; Author: Daniel Pittman <daniel@danann.net>
 ;; Keywords: comm, processes
@@ -220,34 +220,37 @@
 ;; Daniel Pittman <daniel@danann.net>
 ;;-(if (fboundp 'vc-call-backend)
 ;;-    () ;; This is the new VC for which we don't have an appropriate advice yet
+;;-)
 (unless (fboundp 'process-file)
-(if (fboundp 'vc-call-backend)
+  (if (fboundp 'vc-call-backend)
+      (defadvice vc-do-command
+	(around tramp-advice-vc-do-command
+		(buffer okstatus command file &rest flags)
+		activate)
+	"Invoke tramp-vc-do-command for tramp files."
+	(let ((file (symbol-value 'file)))    ;pacify byte-compiler
+	  (if (or (and (stringp file)     (tramp-tramp-file-p file))
+		  (and (buffer-file-name) (tramp-tramp-file-p (buffer-file-name))))
+	      (setq ad-return-value
+		    (apply 'tramp-vc-do-command-new buffer okstatus command
+			   file ;(or file (buffer-file-name))
+			   flags))
+	    ad-do-it)))
     (defadvice vc-do-command
       (around tramp-advice-vc-do-command
-              (buffer okstatus command file &rest flags)
-              activate)
+	      (buffer okstatus command file last &rest flags)
+	      activate)
       "Invoke tramp-vc-do-command for tramp files."
-      (let ((file (symbol-value 'file)))    ;pacify byte-compiler
-        (if (or (and (stringp file)     (tramp-tramp-file-p file))
-                (and (buffer-file-name) (tramp-tramp-file-p (buffer-file-name))))
-            (setq ad-return-value
-                  (apply 'tramp-vc-do-command-new buffer okstatus command
-                         file ;(or file (buffer-file-name))
-                         flags))
-          ad-do-it)))
-  (defadvice vc-do-command
-    (around tramp-advice-vc-do-command
-            (buffer okstatus command file last &rest flags)
-            activate)
-    "Invoke tramp-vc-do-command for tramp files."
-    (let ((file (symbol-value 'file)))  ;pacify byte-compiler
-      (if (or (and (stringp file)     (tramp-tramp-file-p file))
-              (and (buffer-file-name) (tramp-tramp-file-p (buffer-file-name))))
-          (setq ad-return-value
-                (apply 'tramp-vc-do-command buffer okstatus command
-                       (or file (buffer-file-name)) last flags))
-        ad-do-it)))))
-;;-)
+      (let ((file (symbol-value 'file)))  ;pacify byte-compiler
+	(if (or (and (stringp file)     (tramp-tramp-file-p file))
+		(and (buffer-file-name) (tramp-tramp-file-p (buffer-file-name))))
+	    (setq ad-return-value
+		  (apply 'tramp-vc-do-command buffer okstatus command
+			 (or file (buffer-file-name)) last flags))
+	  ad-do-it))))
+
+  (add-hook 'tramp-unload-hook
+	    '(lambda () (ad-unadvise 'vc-do-command))))
 
 
 ;; XEmacs uses this to do some of its work. Like vc-do-command, we
@@ -324,6 +327,9 @@
                      (or file (buffer-file-name)) args))
       ad-do-it)))
 
+(add-hook 'tramp-unload-hook
+	  '(lambda () (ad-unadvise 'vc-simple-command)))
+
 
 ;; `vc-workfile-unchanged-p'
 ;; This function does not deal well with remote files, so we do the
@@ -364,6 +370,9 @@
             (tramp-vc-workfile-unchanged-p filename want-differences-if-changed))
     ad-do-it))
 
+(add-hook 'tramp-unload-hook
+	  '(lambda () (ad-unadvise 'vc-workfile-unchanged-p)))
+
 
 ;; Redefine a function from vc.el -- allow tramp files.
 ;; `save-match-data' seems not to be required -- it isn't in
@@ -445,6 +454,9 @@
 		     (tramp-handle-vc-user-login-name uid)))) ; get the owner name
         ad-do-it)))                     ; else call the original
 
+(add-hook 'tramp-unload-hook
+	  '(lambda () (ad-unadvise 'vc-user-login-name)))
+
 
 ;; Determine the name of the user owning a file.
 (defun tramp-file-owner (filename)
@@ -486,6 +498,9 @@
 		     (tramp-file-owner filename)))) ; get the owner name
         ad-do-it)))                     ; else call the original
 
+(add-hook 'tramp-unload-hook
+	  '(lambda () (ad-unadvise 'vc-file-owner)))
+
 
 ;; We need to make the version control software backend version
 ;; information local to the current buffer. This is because each TRAMP
@@ -506,7 +521,11 @@
              (tramp-tramp-file-p (buffer-file-name)))
     (make-local-variable 'vc-rcs-release)
     (setq vc-rcs-release nil)))
+
 (add-hook 'find-file-hooks 'tramp-vc-setup-for-remote t)
+(add-hook 'tramp-unload-hook
+	  '(lambda ()
+	     (remove-hook 'find-file-hooks 'tramp-vc-setup-for-remote)))
 
 ;; No need to load this again if anyone asks.
 (provide 'tramp-vc)
--- a/lisp/net/tramp.el	Tue Jan 24 02:01:42 2006 +0000
+++ b/lisp/net/tramp.el	Wed Jan 25 07:10:04 2006 +0000
@@ -2,7 +2,7 @@
 ;;; tramp.el --- Transparent Remote Access, Multiple Protocol
 
 ;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-;;   2005 Free Software Foundation, Inc.
+;;   2005, 2006 Free Software Foundation, Inc.
 
 ;; Author: Kai Gro,A_(Bjohann <kai.grossjohann@gmx.net>
 ;;         Michael Albinus <michael.albinus@gmx.de>
@@ -67,8 +67,15 @@
 
 ;; The Tramp version number and bug report address, as prepared by configure.
 (require 'trampver)
-
-(require 'timer)
+(add-hook 'tramp-unload-hook
+	  '(lambda ()
+	     (when (featurep 'trampver)
+	       (unload-feature 'trampver 'force))))
+
+(if (featurep 'xemacs)
+    (require 'timer-funcs)
+  (require 'timer))
+
 (require 'format-spec)                  ;from Gnus 5.8, also in tar ball
 ;; As long as password.el is not part of (X)Emacs, it shouldn't
 ;; be mandatory
@@ -87,6 +94,10 @@
 
 (autoload 'tramp-uuencode-region "tramp-uu"
   "Implementation of `uuencode' in Lisp.")
+(add-hook 'tramp-unload-hook
+	  '(lambda ()
+	     (when (featurep 'tramp-uu)
+	       (unload-feature 'tramp-uu 'force))))
 
 (unless (fboundp 'uudecode-decode-region)
   (autoload 'uudecode-decode-region "uudecode"))
@@ -110,10 +121,20 @@
 ;; tramp-ftp supports Ange-FTP only.  Not suited for XEmacs therefore.
 (unless (featurep 'xemacs)
   (eval-after-load "tramp"
-    '(require 'tramp-ftp)))
+    '(progn
+       (require 'tramp-ftp)
+       (add-hook 'tramp-unload-hook
+		 '(lambda ()
+		    (when (featurep 'tramp-ftp)
+		      (unload-feature 'tramp-ftp 'force)))))))
 (when (and tramp-unified-filenames (featurep 'xemacs))
   (eval-after-load "tramp"
-    '(require 'tramp-efs)))
+    '(progn
+       (require 'tramp-efs)
+       (add-hook 'tramp-unload-hook
+		 '(lambda ()
+		    (when (featurep 'tramp-efs)
+		      (unload-feature 'tramp-efs 'force)))))))
 
 ;; tramp-smb uses "smbclient" from Samba.
 ;; Not available under Cygwin and Windows, because they don't offer
@@ -121,7 +142,12 @@
 ;; UNC file names like "//host/share/localname".
 (unless (memq system-type '(cygwin windows-nt))
   (eval-after-load "tramp"
-    '(require 'tramp-smb)))
+    '(progn
+       (require 'tramp-smb)
+       (add-hook 'tramp-unload-hook
+		 '(lambda ()
+		    (when (featurep 'tramp-smb)
+		      (unload-feature 'tramp-smb 'force)))))))
 
 (eval-when-compile
   (require 'cl)
@@ -1445,7 +1471,7 @@
 	((fboundp 'md5-encode)
 	 (lambda (x) (base64-encode-string
 		      (funcall (symbol-function 'md5-encode) x))))
-	(t (error "Coulnd't find an `md5' function")))
+	(t (error "Couldn't find an `md5' function")))
   "Function to call for running the MD5 algorithm.")
 
 (defvar tramp-end-of-output
@@ -2012,6 +2038,7 @@
      (let ((,variable ,value))
        ,@body)))
 (put 'tramp-let-maybe 'lisp-indent-function 2)
+(put 'tramp-let-maybe 'edebug-form-spec t)
 
 ;;; Config Manipulation Functions:
 
@@ -2370,8 +2397,8 @@
      ;; 8. File modes, as a string of ten letters or dashes as in ls -l.
      res-filemodes
      ;; 9. t iff file's gid would change if file were deleted and
-     ;; recreated.
-     nil				;hm?
+     ;; recreated.  Will be set in `tramp-convert-file-attributes'
+     t
      ;; 10. inode number.
      res-inode
      ;; 11. Device number.  Will be replaced by a virtual device number.
@@ -2627,9 +2654,12 @@
 (defun tramp-handle-file-ownership-preserved-p (filename)
   "Like `file-ownership-preserved-p' for tramp files."
   (with-parsed-tramp-file-name filename nil
-    (or (not (file-exists-p filename))
-	;; Existing files must be writable.
-	(zerop (tramp-run-test "-O" filename)))))
+    (let ((attributes (file-attributes filename)))
+      ;; Return t if the file doesn't exist, since it's true that no
+      ;; information would be lost by an (attempted) delete and create.
+      (or (null attributes)
+	  (= (nth 2 attributes)
+	     (tramp-get-remote-uid multi-method method user host))))))
 
 ;; Other file name ops.
 
@@ -3487,6 +3517,17 @@
 	(when (string-match "\\`\\(~[^/]*\\)\\(.*\\)\\'" localname)
 	  (let ((uname (match-string 1 localname))
 		(fname (match-string 2 localname)))
+	    ;; We cannot simply apply "~/", because under sudo "~/" is
+	    ;; expanded to the local user home directory but to the
+	    ;; root home directory.  On the other hand, using always
+	    ;; the default user name for tilde expansion is not
+	    ;; appropriate either, because ssh and companions might
+	    ;; use a user name from the config file.
+	    (when (and (string-equal uname "~")
+		       (string-match
+			"\\`su\\(do\\)?\\'"
+			(tramp-find-method multi-method method user host)))
+	      (setq uname (concat uname (or user "root"))))
 	    ;; CCC fanatic error checking?
 	    (set-buffer (tramp-get-buffer multi-method method user host))
 	    (erase-buffer)
@@ -3499,17 +3540,24 @@
 	    (setq uname (buffer-substring (point) (tramp-line-end-position)))
 	    (setq localname (concat uname fname))
 	    (erase-buffer)))
+	;; There might be a double slash, for example when "~/"
+	;; expands to "/". Remove this.
+	(while (string-match "//" localname)
+	  (setq localname (replace-match "/" t t localname)))
 	;; No tilde characters in file name, do normal
 	;; expand-file-name (this does "/./" and "/../").  We bind
-	;; directory-sep-char here for XEmacs on Windows, which
-	;; would otherwise use backslash.
+	;; directory-sep-char here for XEmacs on Windows, which would
+	;; otherwise use backslash.  `default-directory' is bound to
+	;; "/", because on Windows there would be problems with UNC
+	;; shares or Cygwin mounts.
 	(tramp-let-maybe directory-sep-char ?/
-	  (tramp-make-tramp-file-name
-	   multi-method (or method (tramp-find-default-method user host))
-	   user host
-	   (tramp-drop-volume-letter
-	    (tramp-run-real-handler 'expand-file-name
-				    (list localname)))))))))
+	  (let ((default-directory "/"))
+	    (tramp-make-tramp-file-name
+	     multi-method (or method (tramp-find-default-method user host))
+	     user host
+	     (tramp-drop-volume-letter
+	      (tramp-run-real-handler 'expand-file-name
+				      (list localname))))))))))
 
 ;; old version follows.  it uses ".." to cross file handler
 ;; boundaries.
@@ -4294,6 +4342,17 @@
 	     (cons tramp-completion-file-name-regexp
 		   'tramp-completion-file-name-handler))
 
+;;;###autoload
+(defun tramp-unload-file-name-handler-alist ()
+  (setq file-name-handler-alist
+	(delete (rassoc 'tramp-file-name-handler
+			file-name-handler-alist)
+		(delete (rassoc 'tramp-completion-file-name-handler
+				file-name-handler-alist)
+			file-name-handler-alist))))
+
+(add-hook 'tramp-unload-hook 'tramp-unload-file-name-handler-alist)
+
 (defun tramp-repair-jka-compr ()
   "If jka-compr is already loaded, move it to the front of
 `file-name-handler-alist'.  On Emacs 22 or so this will not be
@@ -4353,22 +4412,16 @@
 		 (read (current-buffer))))))
 	(list (expand-file-name name))))))
 
-;; Check for complete.el and override PC-expand-many-files if appropriate.
-(eval-and-compile
-  (defun tramp-save-PC-expand-many-files (name))); avoid compiler warning
-
-(defun tramp-setup-complete ()
-  (fset 'tramp-save-PC-expand-many-files
-        (symbol-function 'PC-expand-many-files))
-  (defun PC-expand-many-files (name)
-    (if (tramp-tramp-file-p name)
-        (funcall (symbol-function 'expand-many-files) name)
-      (tramp-save-PC-expand-many-files name))))
-
-;; Why isn't eval-after-load sufficient?
-(if (fboundp 'PC-expand-many-files)
-    (tramp-setup-complete)
-  (eval-after-load "complete" '(tramp-setup-complete)))
+(eval-after-load "complete"
+  '(progn
+     (defadvice PC-expand-many-files
+       (around tramp-advice-PC-expand-many-files (name) activate)
+       "Invoke `tramp-handle-expand-many-files' for tramp files."
+       (if (tramp-tramp-file-p name)
+	   (setq ad-return-value (tramp-handle-expand-many-files name))
+	 ad-do-it))
+     (add-hook 'tramp-unload-hook
+	       '(lambda () (ad-unadvise 'PC-expand-many-files)))))
 
 ;;; File name handler functions for completion mode
 
@@ -4940,6 +4993,9 @@
              auto-save-default)
     (auto-save-mode 1)))
 (add-hook 'find-file-hooks 'tramp-set-auto-save t)
+(add-hook 'tramp-unload-hook
+	  '(lambda ()
+	     (remove-hook 'find-file-hooks 'tramp-set-auto-save)))
 
 (defun tramp-run-test (switch filename)
   "Run `test' on the remote system, given a SWITCH and a FILENAME.
@@ -5532,6 +5588,7 @@
 		   (or user (user-login-name)) host method)
     (let ((process-environment (copy-sequence process-environment)))
       (setenv "TERM" tramp-terminal-type)
+      (setenv "PS1" "$ ")
       (let* ((default-directory (tramp-temporary-file-directory))
 	     ;; If we omit the conditional here, then we would use
 	     ;; `undecided-dos' in some cases.  With the conditional,
@@ -5608,6 +5665,7 @@
 	(setq login-args (cons "-p" (cons (match-string 2 host) login-args)))
 	(setq real-host (match-string 1 host)))
       (setenv "TERM" tramp-terminal-type)
+      (setenv "PS1" "$ ")
       (let* ((default-directory (tramp-temporary-file-directory))
 	     ;; If we omit the conditional, we would use
 	     ;; `undecided-dos' in some cases.  With the conditional,
@@ -5659,6 +5717,7 @@
 		   (or user "<root>") method)
     (let ((process-environment (copy-sequence process-environment)))
       (setenv "TERM" tramp-terminal-type)
+      (setenv "PS1" "$ ")
       (let* ((default-directory (tramp-temporary-file-directory))
 	     ;; If we omit the conditional, we use `undecided-dos' in
 	     ;; some cases.  With the conditional, we use nil in these
@@ -5723,6 +5782,7 @@
     (tramp-message 7 "Opening `%s' connection..." multi-method)
     (let ((process-environment (copy-sequence process-environment)))
       (setenv "TERM" tramp-terminal-type)
+      (setenv "PS1" "$ ")
       (let* ((default-directory (tramp-temporary-file-directory))
 	     ;; If we omit the conditional, we use `undecided-dos' in
 	     ;; some cases.  With the conditional, we use nil in these
@@ -6203,8 +6263,17 @@
 				   "ln" tramp-remote-path nil)))
     (when ln
       (tramp-set-connection-property "ln" ln multi-method method user host)))
+  ;; Set uid and gid.
   (erase-buffer)
+  (tramp-send-command multi-method method user host "id -u; id -g")
+  (tramp-wait-for-output)
+  (goto-char (point-min))
+  (tramp-set-connection-property
+   "uid" (read (current-buffer)) multi-method method user host)
+  (tramp-set-connection-property
+   "gid" (read (current-buffer)) multi-method method user host)
   ;; Find the right encoding/decoding commands to use.
+  (erase-buffer)
   (unless (tramp-method-out-of-band-p multi-method method user host)
     (tramp-find-inline-encoding multi-method method user host))
   ;; If encoding/decoding command are given, test to see if they work.
@@ -6700,6 +6769,10 @@
   (unless (stringp (nth 8 attr))
     ;; Convert file mode bits to string.
     (setcar (nthcdr 8 attr) (tramp-file-mode-from-int (nth 8 attr))))
+  ;; Set file's gid change bit.
+  (setcar (nthcdr 9 attr)
+	  (not (= (nth 3 attr)
+		  (tramp-get-remote-gid multi-method method user host))))
   ;; Set virtual device number.
   (setcar (nthcdr 11 attr)
           (tramp-get-device multi-method method user host))
@@ -6957,6 +7030,12 @@
 (defun tramp-get-remote-ln (multi-method method user host)
   (tramp-get-connection-property "ln" nil multi-method method user host))
 
+(defun tramp-get-remote-uid (multi-method method user host)
+  (tramp-get-connection-property "uid" nil multi-method method user host))
+
+(defun tramp-get-remote-gid (multi-method method user host)
+  (tramp-get-connection-property "gid" nil multi-method method user host))
+
 ;; Get a property of a TRAMP connection.
 (defun tramp-get-connection-property
   (property default multi-method method user host)
@@ -6967,7 +7046,7 @@
     (let (error)
       (condition-case nil
 	  (symbol-value (intern (concat "tramp-connection-property-" property)))
-	(error	default)))))
+	(error default)))))
 
 ;; Set a property of a TRAMP connection.
 (defun tramp-set-connection-property
@@ -7045,7 +7124,9 @@
     "Invoke `tramp-handle-make-auto-save-file-name' for tramp files."
     (if (and (buffer-file-name) (tramp-tramp-file-p (buffer-file-name)))
 	(setq ad-return-value (tramp-handle-make-auto-save-file-name))
-      ad-do-it)))
+      ad-do-it))
+  (add-hook 'tramp-unload-hook
+	    '(lambda () (ad-unadvise 'make-auto-save-file-name))))
 
 ;; In Emacs < 22 and XEmacs < 21.5 autosaved remote files have
 ;; permission 0666 minus umask. This is a security threat.
@@ -7069,7 +7150,10 @@
 	    (and (featurep 'xemacs)
 		 (= emacs-major-version 21)
 		 (> emacs-minor-version 4)))
-  (add-hook 'auto-save-hook 'tramp-set-auto-save-file-modes))
+  (add-hook 'auto-save-hook 'tramp-set-auto-save-file-modes)
+  (add-hook 'tramp-unload-hook
+	    '(lambda ()
+	       (remove-hook 'auto-save-hook 'tramp-set-auto-save-file-modes))))
 
 (defun tramp-subst-strs-in-string (alist string)
   "Replace all occurrences of the string FROM with TO in STRING.
@@ -7296,7 +7380,9 @@
 	      (setq ad-return-value (list name))))
 	;; If it is not a Tramp file, just run the original function.
 	(let ((res ad-do-it))
-	  (setq ad-return-value (or res (list name))))))))
+	  (setq ad-return-value (or res (list name)))))))
+  (add-hook 'tramp-unload-hook
+	    '(lambda () (ad-unadvise 'file-expand-wildcards))))
 
 ;; Tramp version is useful in a number of situations.
 
@@ -7521,6 +7607,25 @@
 
 (defalias 'tramp-submit-bug 'tramp-bug)
 
+;; Checklist for `tramp-unload-hook'
+;; - Unload all `tramp-*' packages
+;; - Reset `file-name-handler-alist'
+;; - Cleanup hooks where Tramp functions are in
+;; - Cleanup advised functions
+;; - Cleanup autoloads
+;;;###autoload
+(defun tramp-unload-tramp ()
+  (interactive)
+  ;; When Tramp is not loaded yet, its autoloads are still active.
+  (tramp-unload-file-name-handler-alist)
+  ;; ange-ftp settings must be enabled.
+  (when (functionp 'tramp-ftp-enable-ange-ftp)
+    (funcall (symbol-function 'tramp-ftp-enable-ange-ftp)))
+  ;; `tramp-util' unloads also `tramp'.
+  (condition-case nil ;; maybe its not loaded yet.
+      (unload-feature (if (featurep 'tramp-util) 'tramp-util 'tramp) 'force)
+    (error nil)))
+
 (provide 'tramp)
 
 ;; Make sure that we get integration with the VC package.
@@ -7528,7 +7633,12 @@
 ;; This must come after (provide 'tramp) because tramp-vc.el
 ;; requires tramp.
 (eval-after-load "vc"
-  '(require 'tramp-vc))
+  '(progn
+     (require 'tramp-vc)
+     (add-hook 'tramp-unload-hook
+	       '(lambda ()
+		  (when (featurep 'tramp-vc)
+		    (unload-feature 'tramp-vc 'force))))))
 
 ;;; TODO:
 
--- a/lisp/net/trampver.el	Tue Jan 24 02:01:42 2006 +0000
+++ b/lisp/net/trampver.el	Wed Jan 25 07:10:04 2006 +0000
@@ -30,7 +30,7 @@
 ;; are auto-frobbed from configure.ac, so you should edit that file and run
 ;; "autoconf && ./configure" to change them.
 
-(defconst tramp-version "2.0.51"
+(defconst tramp-version "2.0.52"
   "This version of Tramp.")
 
 (defconst tramp-bug-report-address "tramp-devel@gnu.org"
--- a/lisp/outline.el	Tue Jan 24 02:01:42 2006 +0000
+++ b/lisp/outline.el	Wed Jan 25 07:10:04 2006 +0000
@@ -803,11 +803,12 @@
   (outline-flag-subtree t))
 
 (defun hide-leaves ()
-  "Hide all body after this heading at deeper levels."
+  "Hide the body after this heading and at deeper levels."
   (interactive)
   (save-excursion
     (outline-back-to-heading)
-    (outline-end-of-heading)
+;; Turned off to fix bug reported by Otto Maddox on 22 Nov 2005.
+;;    (outline-end-of-heading)
     (hide-region-body (point) (progn (outline-end-of-subtree) (point)))))
 
 (defun show-subtree ()
--- a/lisp/play/doctor.el	Tue Jan 24 02:01:42 2006 +0000
+++ b/lisp/play/doctor.el	Wed Jan 25 07:10:04 2006 +0000
@@ -89,7 +89,7 @@
     (set what ww)
     first))
 
-(defvar doc-mode-map
+(defvar doctor-mode-map
   (let ((map (make-sparse-keymap)))
     (define-key map "\n" 'doctor-read-print)
     (define-key map "\r" 'doctor-ret-or-read)
--- a/lisp/progmodes/cpp.el	Tue Jan 24 02:01:42 2006 +0000
+++ b/lisp/progmodes/cpp.el	Wed Jan 25 07:10:04 2006 +0000
@@ -526,6 +526,8 @@
 		     'cpp-edit-toggle-unknown)
     (insert (format "\n\n\n%39s: %14s %14s %7s\n\n" "Expression"
 		    "[T]rue Face" "[F]alse Face" "[W]rite"))
+
+    (setq symbols (reverse symbols))
     (while symbols
       (let*  ((symbol (car symbols))
 	      (entry (assoc symbol cpp-edit-list))
--- a/lisp/progmodes/python.el	Tue Jan 24 02:01:42 2006 +0000
+++ b/lisp/progmodes/python.el	Wed Jan 25 07:10:04 2006 +0000
@@ -1743,7 +1743,7 @@
   (set (make-local-variable 'eldoc-documentation-function)
        #'python-eldoc-function)
   (add-hook 'eldoc-mode-hook
-	    '(lambda () (run-python 0 t)) nil t) ; need it running
+	    '(lambda () (run-python nil t)) nil t) ; need it running
   (if (featurep 'hippie-exp)
       (set (make-local-variable 'hippie-expand-try-functions-list)
 	   (cons 'python-try-complete hippie-expand-try-functions-list)))
--- a/lisp/ses.el	Tue Jan 24 02:01:42 2006 +0000
+++ b/lisp/ses.el	Wed Jan 25 07:10:04 2006 +0000
@@ -1,6 +1,6 @@
 ;;; ses.el -- Simple Emacs Spreadsheet  -*- coding: utf-8 -*-
 
-;; Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+;; Copyright (C) 2002, 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
 
 ;; Author: Jonathan Yavner <jyavner@member.fsf.org>
 ;; Maintainer: Jonathan Yavner <jyavner@member.fsf.org>
@@ -148,8 +148,7 @@
 	(newmap (make-sparse-keymap)))
     (set-keymap-parent newmap minibuffer-local-map)
     (while keys
-      (define-key newmap (car keys) (cadr keys))
-      (setq keys (cddr keys)))
+      (define-key newmap (pop keys) (pop keys)))
     newmap)
   "Local keymap for SES minibuffer cell-editing.")
 
@@ -1865,20 +1864,20 @@
 (defun ses-read-cell (row col newval)
   "Self-insert for initial character of cell function."
   (interactive
-   (let ((initial (this-command-keys))
-	 (rowcol  (progn (ses-check-curcell) (ses-sym-rowcol ses--curcell))))
+   (let* ((initial (this-command-keys))
+          (rowcol  (progn (ses-check-curcell) (ses-sym-rowcol ses--curcell)))
+          (curval (ses-cell-formula (car rowcol) (cdr rowcol))))
      (barf-if-buffer-read-only)
-     (if (string= initial "\"")
-	 (setq initial "\"\"") ;Enter a string
-       (if (string= initial "(")
-	   (setq initial "()"))) ;Enter a formula list
      (list (car rowcol)
 	   (cdr rowcol)
-	   (read-from-minibuffer (format "Cell %s: " ses--curcell)
-				 (cons initial 2)
-				 ses-mode-edit-map
-				 t ;Convert to Lisp object
-				 'ses-read-cell-history))))
+           (read-from-minibuffer
+            (format "Cell %s: " ses--curcell)
+            (cons (if (equal initial "\"") "\"\""
+                    (if (equal initial "(") "()" initial)) 2)
+            ses-mode-edit-map
+            t                         ;Convert to Lisp object
+            'ses-read-cell-history
+            (prin1-to-string curval)))))
   (when (ses-edit-cell row col newval)
     (ses-command-hook) ;Update cell widths before movement
     (dolist (x ses-after-entry-functions)
--- a/lisp/simple.el	Tue Jan 24 02:01:42 2006 +0000
+++ b/lisp/simple.el	Wed Jan 25 07:10:04 2006 +0000
@@ -1,7 +1,7 @@
 ;;; simple.el --- basic editing commands for Emacs
 
 ;; Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-;;   2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+;;   2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
 
 ;; Maintainer: FSF
 ;; Keywords: internal
@@ -3185,8 +3185,9 @@
 mark ring\).  Use \\[pop-global-mark] to jump to a mark off the global
 mark ring \(see `pop-global-mark'\).
 
-Repeating the \\[set-mark-command] command without the prefix jumps to
-the next position off the local (or global) mark ring.
+If `set-mark-command-repeat-pop' is non-nil, repeating
+the \\[set-mark-command] command with no prefix pops the next position
+off the local (or global) mark ring and jumps there.
 
 With a double \\[universal-argument] prefix argument, e.g. \\[universal-argument] \
 \\[universal-argument] \\[set-mark-command], unconditionally
@@ -3734,7 +3735,13 @@
   (or arg (setq arg 1))
   (if (/= arg 1)
       (line-move (1- arg) t))
-  (beginning-of-line 1)
+  
+  ;; Move to beginning-of-line, ignoring fields and invisibles.
+  (skip-chars-backward "^\n")
+  (while (and (not (bobp)) (line-move-invisible-p (1- (point))))
+    (goto-char (previous-char-property-change (1- (point))))
+    (skip-chars-backward "^\n"))
+
   (let ((orig (point)))
     (vertical-motion 0)
     (if (/= orig (point))
@@ -5028,8 +5035,8 @@
       (goto-char (point-min))
       (search-forward "\n\n")
       (forward-line 1))))
-
-;; Support keyboard commands to turn on various modifiers.
+
+;;; Support keyboard commands to turn on various modifiers.
 
 ;; These functions -- which are not commands -- each add one modifier
 ;; to the following event.
@@ -5094,7 +5101,7 @@
 (define-key function-key-map [?\C-x ?@ ?a] 'event-apply-alt-modifier)
 (define-key function-key-map [?\C-x ?@ ?S] 'event-apply-shift-modifier)
 (define-key function-key-map [?\C-x ?@ ?c] 'event-apply-control-modifier)
-
+
 ;;;; Keypad support.
 
 ;;; Make the keypad keys act like ordinary typing keys.  If people add
@@ -5189,7 +5196,8 @@
 	 (error "Cannot clone a file-visiting buffer"))
      (if (get major-mode 'no-clone)
 	 (error "Cannot clone a buffer in %s mode" mode-name))
-     (list (if current-prefix-arg (read-string "Name: "))
+     (list (if current-prefix-arg
+	       (read-buffer "Name of new cloned buffer: " (current-buffer)))
 	   t)))
   (if buffer-file-name
       (error "Cannot clone a file-visiting buffer"))
@@ -5236,7 +5244,12 @@
       ;; Run any hooks (typically set up by the major mode
       ;; for cloning to work properly).
       (run-hooks 'clone-buffer-hook))
-    (if display-flag (pop-to-buffer new))
+    (if display-flag
+        ;; Presumably the current buffer is shown in the selected frame, so
+        ;; we want to display the clone elsewhere.
+        (let ((same-window-regexps nil)
+              (same-window-buffer-names))
+          (pop-to-buffer new)))
     new))
 
 
@@ -5259,7 +5272,7 @@
      (if (get major-mode 'no-clone-indirect)
 	 (error "Cannot indirectly clone a buffer in %s mode" mode-name))
      (list (if current-prefix-arg
-	       (read-string "BName of indirect buffer: "))
+	       (read-buffer "Name of indirect buffer: " (current-buffer)))
 	   t)))
   (if (get major-mode 'no-clone-indirect)
       (error "Cannot indirectly clone a buffer in %s mode" mode-name))
@@ -5278,7 +5291,13 @@
 Select the new buffer in another window.
 Optional second arg NORECORD non-nil means do not put this buffer at
 the front of the list of recently selected ones."
-  (interactive "bClone buffer in other window: ")
+  (interactive
+   (progn
+     (if (get major-mode 'no-clone-indirect)
+	 (error "Cannot indirectly clone a buffer in %s mode" mode-name))
+     (list (if current-prefix-arg
+	       (read-buffer "Name of indirect buffer: " (current-buffer)))
+	   t)))
   (let ((pop-up-windows t))
     (set-buffer buffer)
     (clone-indirect-buffer nil t norecord)))
--- a/lisp/startup.el	Tue Jan 24 02:01:42 2006 +0000
+++ b/lisp/startup.el	Wed Jan 25 07:10:04 2006 +0000
@@ -41,7 +41,9 @@
   :group 'internal)
 
 (defcustom inhibit-splash-screen nil
-  "*Non-nil inhibits the startup screen.
+  "Non-nil inhibits the startup screen.
+It also inhibits display of the initial message in the *scratch* buffer.
+
 This is for use in your personal init file, once you are familiar
 with the contents of the startup screen."
   :type 'boolean
@@ -1087,7 +1089,9 @@
 
 ")
   "Initial message displayed in *scratch* buffer at startup.
-If this is nil, no message will be displayed."
+If this is nil, no message will be displayed.
+If `inhibit-splash-screen' is non-nil, then no message is displayed,
+regardless of the value of this variable."
   :type '(choice (text :tag "Message")
 		 (const :tag "none" nil))
   :group 'initialization)
@@ -1631,7 +1635,7 @@
           (longopts
            (append '(("--funcall") ("--load") ("--insert") ("--kill")
                      ("--directory") ("--eval") ("--execute") ("--no-splash")
-                     ("--find-file") ("--visit") ("--file"))
+                     ("--find-file") ("--visit") ("--file") ("--no-desktop"))
                    (mapcar (lambda (elt)
                              (list (concat "-" (car elt))))
                            command-switch-alist)))
@@ -1731,6 +1735,13 @@
                 ((equal argi "-kill")
                  (kill-emacs t))
 
+		;; This is for when they use --no-desktop with -q, or
+		;; don't load Desktop in their .emacs.  If desktop.el
+		;; _is_ loaded, it will handle this switch, and we
+		;; won't see it by the time we get here.
+		((equal argi "-no-desktop")
+		 (message "\"--no-desktop\" ignored because the Desktop package is not loaded"))
+
                 ((string-match "^\\+[0-9]+\\'" argi)
                  (setq line (string-to-number argi)))
 
--- a/lisp/term/w32-win.el	Tue Jan 24 02:01:42 2006 +0000
+++ b/lisp/term/w32-win.el	Wed Jan 25 07:10:04 2006 +0000
@@ -1,7 +1,7 @@
 ;;; w32-win.el --- parse switches controlling interface with W32 window system
 
 ;; Copyright (C) 1993, 1994, 2002, 2003, 2004,
-;;   2005 Free Software Foundation, Inc.
+;;   2005, 2006 Free Software Foundation, Inc.
 
 ;; Author: Kevin Gallo
 ;; Keywords: terminals
@@ -1232,7 +1232,7 @@
         (png "libpng13d.dll" "libpng13.dll" "libpng12d.dll" "libpng12.dll" "libpng.dll")
         (jpeg "jpeg62.dll" "libjpeg.dll" "jpeg-62.dll" "jpeg.dll")
         (tiff "libtiff3.dll" "libtiff.dll")
-        (gif "libungif.dll")))
+        (gif "giflib4.dll" "libungif4.dll" "libungif.dll")))
 
 ;; arch-tag: 69fb1701-28c2-4890-b351-3d1fe4b4f166
 ;;; w32-win.el ends here
--- a/lisp/textmodes/bibtex.el	Tue Jan 24 02:01:42 2006 +0000
+++ b/lisp/textmodes/bibtex.el	Wed Jan 25 07:10:04 2006 +0000
@@ -1049,6 +1049,7 @@
   "Completion table for BibTeX string keys.
 Initialized from `bibtex-predefined-strings' and `bibtex-string-files'.")
 (make-variable-buffer-local 'bibtex-strings)
+(put 'bibtex-strings 'risky-local-variable t)
 
 (defvar bibtex-reference-keys
   (lazy-completion-table bibtex-reference-keys
@@ -1056,6 +1057,7 @@
   "Completion table for BibTeX reference keys.
 The CDRs of the elements are t for header keys and nil for crossref keys.")
 (make-variable-buffer-local 'bibtex-reference-keys)
+(put 'bibtex-reference-keys 'risky-local-variable t)
 
 (defvar bibtex-buffer-last-parsed-tick nil
   "Value of `buffer-modified-tick' last time buffer was parsed for keys.")
--- a/lisp/textmodes/flyspell.el	Tue Jan 24 02:01:42 2006 +0000
+++ b/lisp/textmodes/flyspell.el	Wed Jan 25 07:10:04 2006 +0000
@@ -2080,7 +2080,8 @@
 				 corrects)
 		       '()))
 	 (affix      (car (cdr (cdr (cdr poss)))))
-	 (base-menu  (let ((save (if (consp affix)
+	 show-affix-info
+	 (base-menu  (let ((save (if (and (consp affix) show-affix-info)
 				     (list
 				      (list (concat "Save affix: " (car affix))
 					    'save)
@@ -2121,7 +2122,8 @@
 				 corrects)
 		       '()))
 	 (affix      (car (cdr (cdr (cdr poss)))))
-	 (menu       (let ((save (if (consp affix)
+	 show-affix-info
+	 (menu       (let ((save (if (and (consp affix) show-affix-info)
 				     (vector
 				      (concat "Save affix: " (car affix))
 				      (list 'flyspell-do-correct
--- a/lisp/textmodes/org.el	Tue Jan 24 02:01:42 2006 +0000
+++ b/lisp/textmodes/org.el	Wed Jan 25 07:10:04 2006 +0000
@@ -5,7 +5,7 @@
 ;; Author: Carsten Dominik <dominik at science dot uva dot nl>
 ;; Keywords: outlines, hypermedia, calendar, wp
 ;; Homepage: http://www.astro.uva.nl/~dominik/Tools/org/
-;; Version: 4.03
+;; Version: 4.04
 ;;
 ;; This file is part of GNU Emacs.
 ;;
@@ -81,6 +81,10 @@
 ;;
 ;; Changes since version 4.00:
 ;; ---------------------------
+;; Version 4.04
+;;    - Cleanup tags display in agenda.
+;;    - Bug fixes.
+;;
 ;; Version 4.03
 ;;    - Table alignment fixed for use with wide characters.
 ;;    - `C-c -' leaves cursor in current table line.
@@ -111,7 +115,7 @@
 
 ;;; Customization variables
 
-(defvar org-version "4.03"
+(defvar org-version "4.04"
   "The version number of the file org.el.")
 (defun org-version ()
   (interactive)
@@ -608,7 +612,8 @@
 
   (setq org-agenda-prefix-format \"  %-11:c% s\")
 
-See also the variable `org-agenda-remove-times-when-in-prefix'."
+See also the variables `org-agenda-remove-times-when-in-prefix' and
+`org-agenda-remove-tags-when-in-prefix'."
   :type 'string
   :group 'org-agenda)
 
@@ -691,6 +696,16 @@
   :group 'org-agenda
   :type 'boolean)
 
+(defcustom org-agenda-remove-tags-when-in-prefix nil
+  "Non-nil means, the tags from copy of headline in agenda.
+When this is the symbol `prefix', only remove tags when
+`org-agenda-prefix-format' contains a `%T' specifier."
+  :group 'org-agenda
+  :type '(choice
+	  (const :tag "Always" t)
+	  (const :tag "Never" nil)
+	  (const :tag "When prefix format contains %T" prefix)))
+
 (defgroup org-structure nil
   "Options concerning structure editing in Org-mode."
   :tag "Org Structure"
@@ -1875,42 +1890,43 @@
 
 ;; Tell the compiler about dynamically scoped variables,
 ;; and variables from other packages
-(defvar zmacs-regions)
-(defvar original-date)
-(defvar org-transient-mark-mode)
-(defvar org-old-auto-fill-inhibit-regexp)
-(defvar orgtbl-mode-menu)
-(defvar org-html-entities)
-(defvar org-goto-start-pos)
-(defvar org-cursor-color)
-(defvar org-time-was-given)
-(defvar org-ts-what)
-(defvar mark-active)
-(defvar timecnt)
-(defvar levels-open)
-(defvar title)
-(defvar author)
-(defvar email)
-(defvar text)
-(defvar entry)
-(defvar date)
-(defvar language)
-(defvar options)
-(defvar ans1)
-(defvar ans2)
-(defvar starting-day)
-(defvar include-all-loc)
-(defvar vm-message-pointer)
-(defvar vm-folder-directory)
-(defvar wl-summary-buffer-elmo-folder)
-(defvar wl-summary-buffer-folder-name)
-(defvar gnus-group-name)
-(defvar gnus-article-current)
-(defvar w3m-current-url)
-(defvar org-selected-point)
-(defvar calendar-mode-map)
-(defvar remember-save-after-remembering)
-(defvar remember-data-file)
+(eval-when-compile
+  (defvar zmacs-regions)
+  (defvar original-date)
+  (defvar org-transient-mark-mode)
+  (defvar org-old-auto-fill-inhibit-regexp)
+  (defvar orgtbl-mode-menu)
+  (defvar org-html-entities)
+  (defvar org-goto-start-pos)
+  (defvar org-cursor-color)
+  (defvar org-time-was-given)
+  (defvar org-ts-what)
+  (defvar mark-active)
+  (defvar timecnt)
+  (defvar levels-open)
+  (defvar title)
+  (defvar author)
+  (defvar email)
+  (defvar text)
+  (defvar entry)
+  (defvar date)
+  (defvar language)
+  (defvar options)
+  (defvar ans1)
+  (defvar ans2)
+  (defvar starting-day)
+  (defvar include-all-loc)
+  (defvar vm-message-pointer)
+  (defvar vm-folder-directory)
+  (defvar wl-summary-buffer-elmo-folder)
+  (defvar wl-summary-buffer-folder-name)
+  (defvar gnus-group-name)
+  (defvar gnus-article-current)
+  (defvar w3m-current-url)
+  (defvar org-selected-point)
+  (defvar calendar-mode-map)
+  (defvar remember-save-after-remembering)
+  (defvar remember-data-file))
 
 
 ;;; Define the mode
@@ -3100,7 +3116,7 @@
     (if (string-match "\\(.*\\)::\\(.*\\)" org-archive-location)
 	(progn
 	  (setq file (format (match-string 1 org-archive-location)
-			     (file-name-nondirectory buffer-file-name))
+			     (file-name-nondirectory (buffer-file-name)))
 		heading (match-string 2 org-archive-location)))
       (error "Invalid `org-archive-location'"))
     (if (> (length file) 0)
@@ -4031,8 +4047,9 @@
 		  (nthcdr 6 time0))))
     (if (eq what 'calendar)
 	(let ((cal-date
-               (save-match-data
-                 (with-current-buffer "*Calendar*"
+	       (save-excursion
+		 (save-match-data
+		   (set-buffer "*Calendar*")
 		   (calendar-cursor-to-date)))))
 	  (setcar (nthcdr 4 time0) (nth 0 cal-date)) ; month
 	  (setcar (nthcdr 3 time0) (nth 1 cal-date)) ; day
@@ -4285,7 +4302,7 @@
 next use of \\[org-agenda]) restricted to the current file."
   (interactive "P")
   (catch 'exit
-    (let ((restrict-ok (and buffer-file-name (eq major-mode 'org-mode)))
+    (let ((restrict-ok (and (buffer-file-name) (eq major-mode 'org-mode)))
 	  (custom org-agenda-custom-commands)
 	  c entry key type string)
       (put 'org-agenda-files 'org-restrict nil)
@@ -4320,7 +4337,7 @@
 	(message "")
 	(when (equal c ?1)
 	  (if restrict-ok
-	      (put 'org-agenda-files 'org-restrict (list buffer-file-name))
+	      (put 'org-agenda-files 'org-restrict (list (buffer-file-name)))
 	    (error "Cannot restrict agenda to current buffer"))
 	  (message "Press key for agenda command%s"
 		   (if restrict-ok " (restricted to current file)" ""))
@@ -4444,8 +4461,8 @@
 	 (dotodo include-all)
 	 (doclosed org-agenda-show-log)
 	 (org-agenda-keep-modes keep-modes)
-	 (entry buffer-file-name)
-	 (org-agenda-files (list buffer-file-name))
+	 (entry (buffer-file-name))
+	 (org-agenda-files (list (buffer-file-name)))
 	 (date (calendar-current-date))
 	 (win (selected-window))
 	 (pos1 (point))
@@ -4672,9 +4689,10 @@
     (erase-buffer)
     (org-agenda-mode) (setq buffer-read-only nil)
     (set (make-local-variable 'org-agenda-type) 'todo)
+    (set (make-local-variable 'last-arg) arg)
     (set (make-local-variable 'org-todo-keywords) kwds)
     (set (make-local-variable 'org-agenda-redo-command)
-	 `(org-todo-list (or current-prefix-arg ',arg) t))
+	 '(org-todo-list (or current-prefix-arg last-arg) t))
     (setq files (org-agenda-files)
 	  rtnall nil)
     (while (setq file (pop files))
@@ -4971,7 +4989,7 @@
        "Make the position visible."
        (if (and org-disable-agenda-to-diary  ;; called from org-agenda
 		(stringp string)
-		buffer-file-name)
+		(buffer-file-name))
 	   (setq string (org-modify-diary-entry-string string))))))
 
 (defun org-modify-diary-entry-string (string)
@@ -4983,7 +5001,7 @@
 	 'help-echo
 	 (format
 	  "mouse-2 or RET jump to diary file %s"
-	  (abbreviate-file-name buffer-file-name))
+	  (abbreviate-file-name (buffer-file-name)))
 	 'org-agenda-diary-link t
 	 'org-marker (org-agenda-new-marker (point-at-bol)))
    string)
@@ -5005,7 +5023,7 @@
 If the current buffer does not, find the first agenda file."
   (interactive)
   (let ((files (append org-agenda-files (list (car org-agenda-files))))
-	(tcf (if buffer-file-name (file-truename buffer-file-name)))
+	(tcf (if (buffer-file-name) (file-truename (buffer-file-name))))
 	file)
     (unless files (error "No agenda files"))
     (catch 'exit
@@ -5016,28 +5034,30 @@
 	      (throw 'exit t))))
       (find-file (car org-agenda-files)))))
 
-(defun org-agenda-file-to-end ()
+(defun org-agenda-file-to-end (&optional file)
   "Move/add the current file to the end of the agenda fiole list.
-If the file is not present in the list, append it to the list.  If it is
-present, move it there."
-  (interactive)
-  (org-agenda-file-to-front 'to-end))
-
-(defun org-agenda-file-to-front (&optional to-end)
+I the file is not present in the list, it is appended ot the list.  If it is
+present, it is moved there."
+  (interactive)
+  (org-agenda-file-to-front 'to-end file))
+
+(defun org-agenda-file-to-front (&optional to-end file)
   "Move/add the current file to the top of the agenda file list.
-If the file is not present in the list, add it to the front.  If it is
-present, it move it there.  With optional argument TO-END, add/move to the
+If the file is not present in the list, it is added to the front.  If it is
+present, it is moved there.  With optional argument TO-END, add/move to the
 end of the list."
   (interactive "P")
-  (let* ((file-alist (mapcar (lambda (x)
-                               (cons (file-truename x) x))
-                             org-agenda-files))
-         (ctf (file-truename buffer-file-name))
-         (had (assoc ctf file-alist))
-         (x (or had (cons ctf (abbreviate-file-name buffer-file-name)))))
-    (setq file-alist (if to-end
-                         (append (delq x file-alist) (list x))
-                       (cons x (delq x file-alist))))
+  (let ((file-alist (mapcar (lambda (x)
+			      (cons (file-truename x) x))
+			    org-agenda-files))
+	(ctf (file-truename (buffer-file-name)))
+	x had)
+    (setq x (assoc ctf file-alist) had x)
+
+    (if (not x) (setq x (cons ctf (abbreviate-file-name (buffer-file-name)))))
+    (if to-end
+	(setq file-alist (append (delq x file-alist) (list x)))
+      (setq file-alist (cons x (delq x file-alist))))
     (setq org-agenda-files (mapcar 'cdr file-alist))
     (let ((org-mode-hook nil) (default-major-mode 'fundamental-mode))
       (customize-save-variable 'org-agenda-files org-agenda-files))
@@ -5050,7 +5070,7 @@
 These are the files which are being checked for agenda entries.
 Optional argument FILE means, use this file instead of the current."
   (interactive)
-  (let* ((file (or file buffer-file-name))
+  (let* ((file (or file (buffer-file-name)))
 	 (true-file (file-truename file))
 	 (afile (abbreviate-file-name file))
 	 (files (delq nil (mapcar
@@ -5174,9 +5194,9 @@
       (cond
        ((null org-category)
 	(setq org-category
-	      (if buffer-file-name
+	      (if (buffer-file-name)
 		  (file-name-sans-extension
-		   (file-name-nondirectory buffer-file-name))
+		   (file-name-nondirectory (buffer-file-name)))
 		"???")))
        ((symbolp org-category) (symbol-name org-category))
        (t org-category))
@@ -5265,6 +5285,27 @@
 	     (throw 'exit t)))
       nil)))
 
+(defun org-get-tags-at (&optional pos)
+  "Get a list of all headline targs applicable at POS.
+POS defaults to point.  If tags are inherited, the list contains
+the targets in the same sequence as the headlines appear, i.e.
+the tags of the current headline come last."
+  (interactive)
+  (let (tags)
+    (save-excursion
+      (goto-char (or pos (point)))
+      (save-match-data
+	(org-back-to-heading t)
+	(condition-case nil
+	    (while t
+	      (if (looking-at "[^\r\n]+?:\\([a-zA-Z_:]+\\):[ \t]*\\([\n\r]\\|\\'\\)")
+		  (setq tags (append (org-split-string (match-string 1) ":") tags)))
+	      (or org-use-tag-inheritance (error ""))
+	      (org-up-heading-all 1))
+	  (error nil))))
+    (message "%s" tags)
+    tags))
+
 (defun org-agenda-get-todos ()
   "Return the TODO information for agenda display."
   (let* ((props (list 'face nil
@@ -5273,7 +5314,7 @@
 		      'keymap org-agenda-keymap
 		      'help-echo
 		      (format "mouse-2 or RET jump to org file %s"
-			      (abbreviate-file-name buffer-file-name))))
+			      (abbreviate-file-name (buffer-file-name)))))
 	 (regexp (concat "[\n\r]\\*+ *\\(" 
 			 (if org-select-this-todo-keyword
 			     (concat "\\<\\(" org-select-this-todo-keyword
@@ -5315,7 +5356,7 @@
 		      'keymap org-agenda-keymap
 		      'help-echo
 		      (format "mouse-2 or RET jump to org file %s"
-			      (abbreviate-file-name buffer-file-name))))
+			      (abbreviate-file-name (buffer-file-name)))))
 	 (regexp (regexp-quote
 		  (substring
 		   (format-time-string
@@ -5392,7 +5433,7 @@
 		      'keymap org-agenda-keymap
 		      'help-echo
 		      (format "mouse-2 or RET jump to org file %s"
-			      (abbreviate-file-name buffer-file-name))))
+			      (abbreviate-file-name (buffer-file-name)))))
 	 (regexp (concat
 		  "\\<" org-closed-string " *\\["
 		  (regexp-quote
@@ -5448,7 +5489,7 @@
 		      'keymap org-agenda-keymap
 		      'help-echo
 		      (format "mouse-2 or RET jump to org file %s"
-			      (abbreviate-file-name buffer-file-name))))
+			      (abbreviate-file-name (buffer-file-name)))))
 	 (regexp org-deadline-time-regexp)
 	 (todayp (equal date (calendar-current-date))) ; DATE bound by calendar
 	 (d1 (calendar-absolute-from-gregorian date))  ; DATE bound by calendar
@@ -5510,7 +5551,7 @@
 		      'keymap org-agenda-keymap
 		      'help-echo
 		      (format "mouse-2 or RET jump to org file %s"
-			      (abbreviate-file-name buffer-file-name))))
+			      (abbreviate-file-name (buffer-file-name)))))
 	 (regexp org-scheduled-time-regexp)
 	 (todayp (equal date (calendar-current-date))) ; DATE bound by calendar
 	 (d1 (calendar-absolute-from-gregorian date))  ; DATE bound by calendar
@@ -5559,7 +5600,7 @@
 		      'keymap org-agenda-keymap
 		      'help-echo
 		      (format "mouse-2 or RET jump to org file %s"
-			      (abbreviate-file-name buffer-file-name))))
+			      (abbreviate-file-name (buffer-file-name)))))
 	 (regexp org-tr-regexp)
 	 (d0 (calendar-absolute-from-gregorian date))
 	 marker hdmarker ee txt d1 d2 s1 s2 timestr category tags)
@@ -5631,9 +5672,10 @@
 (defvar org-prefix-has-time nil
   "A flag, set by `org-compile-prefix-format'.
 The flag is set if the currently compiled format contains a `%t'.")
-
-(defvar time)                     ;Needed for the eval of the prefix format.
-(defvar tag)                      ;Presumably, same thing as above.
+(defvar org-prefix-has-tag nil
+  "A flag, set by `org-compile-prefix-format'.
+The flag is set if the currently compiled format contains a `%T'.")
+
 (defun org-format-agenda-item (extra txt &optional category tags dotime noprefix)
   "Format TXT to be inserted into the agenda buffer.
 In particular, it adds the prefix and corresponding text properties.  EXTRA
@@ -5651,9 +5693,9 @@
     (if (string-match "^ +" txt) (setq txt (replace-match "" nil nil txt)))
     (let* ((category (or category
 			 org-category
-			 (if buffer-file-name
+			 (if (buffer-file-name)
 			     (file-name-sans-extension
-			      (file-name-nondirectory buffer-file-name))
+			      (file-name-nondirectory (buffer-file-name)))
 			   "")))
 	   (tag (or (nth (1- (length tags)) tags) ""))
 	   time              ;; needed for the eval of the prefix format
@@ -5681,6 +5723,12 @@
 	(if s1 (setq s1 (org-get-time-of-day s1 'string)))
 	(if s2 (setq s2 (org-get-time-of-day s2 'string))))
 
+      (when (and (or (eq org-agenda-remove-tags-when-in-prefix t)
+		     (and org-agenda-remove-tags-when-in-prefix
+			  org-prefix-has-tag))
+		 (string-match ":[a-zA-Z_:]+:[ \t]*$" txt))
+	(setq txt (replace-match "" t t txt)))
+
       ;; Create the final string
       (if noprefix
 	  (setq rtn txt)
@@ -5738,7 +5786,7 @@
   "Compile the prefix format into a Lisp form that can be evaluated.
 The resulting form is returned and stored in the variable
 `org-prefix-format-compiled'."
-  (setq org-prefix-has-time nil)
+  (setq org-prefix-has-time nil org-prefix-has-tag nil)
   (let ((start 0) varform vars var (s format)e c f opt)
     (while (string-match "%\\(\\?\\)?\\([-+]?[0-9.]*\\)\\([ .;,:!?=|/<>]?\\)\\([cts]\\)"
 			 s start)
@@ -5749,6 +5797,7 @@
 	    opt (match-beginning 1)
 	    start (1+ (match-beginning 0)))
       (if (equal var 'time) (setq org-prefix-has-time t))
+      (if (equal var 'tag)  (setq org-prefix-has-tag  t))
       (setq f (concat "%" (match-string 2 s) "s"))
       (if opt
 	  (setq varform
@@ -5783,7 +5832,7 @@
 		       (string-to-number (match-string 3 s))
 		     0)))
 	    (t1 (concat " "
-			(if (< t0 100) "0" "") (if (< t0 10) "0" "")
+			(if (< t0 100) "0" "") (if (< t0 10)  "0" "")
 			(int-to-string t0))))
        (if string (concat (substring t1 -4 -2) ":" (substring t1 -2)) t0)))))
 
@@ -5816,9 +5865,6 @@
 	  ((< tb ta) +1)
 	  (t nil))))
 
-(defvar time-up) (defvar time-down)
-(defvar priority-up) (defvar priority-down)
-(defvar category-up) (defvar category-down) (defvar category-keep)
 (defun org-entries-lessp (a b)
   "Predicate for sorting agenda entries."
   ;; The following variables will be used when the form is evaluated.
@@ -6260,7 +6306,7 @@
 		      'keymap org-agenda-keymap
 		      'help-echo
 		      (format "mouse-2 or RET jump to org file %s"
-			      (abbreviate-file-name buffer-file-name))))
+			      (abbreviate-file-name (buffer-file-name)))))
          lspos
 	 tags tags-list tags-alist (llast 0) rtn level category i txt
 	 todo marker)
@@ -6551,7 +6597,10 @@
 	  (skip-chars-backward
 	   (concat (if org-allow-space-in-links "^" "^ ")
 		   org-non-link-chars))
-	  (when (looking-at org-link-regexp)
+	  (when (or (looking-at org-link-regexp)
+		    (and (re-search-forward org-link-regexp (point-at-eol) t)
+			 (<= (match-beginning 0) pos)
+			 (>= (match-end 0) pos)))
 	    (setq type (match-string 1)
 		  path (match-string 2))
 	    (throw 'match t)))
@@ -6589,7 +6638,7 @@
       (cond
        
        ((string= type "tags")
-	(org-tags-view path in-emacs))
+	(org-tags-view in-emacs path))
        ((string= type "camel")
 	(org-link-search
 	 path
@@ -6862,7 +6911,7 @@
 If the file does not exist, an error is thrown."
   (setq in-emacs (or in-emacs line search))
   (let* ((file (if (equal path "") 
-		   buffer-file-name
+		   (buffer-file-name)
 		 (convert-standard-filename (org-expand-file-name path))))
 	 (dfile (downcase file))
 	 ext cmd apps)
@@ -6893,7 +6942,7 @@
 	(shell-command (concat cmd " &"))))
      ((or (stringp cmd)
 	  (eq cmd 'emacs))
-      (unless (equal (file-truename file) (file-truename buffer-file-name))
+      (unless (equal (file-truename file) (file-truename (buffer-file-name)))
 	(funcall (cdr (assq 'file org-link-frame-setup)) file))
       (if line (goto-line line)
 	(if search (org-link-search search))))
@@ -6956,7 +7005,7 @@
       (save-excursion
        (vm-select-folder-buffer)
        (let* ((message (car vm-message-pointer))
-	      (folder buffer-file-name)
+	      (folder (buffer-file-name))
 	      (subject (vm-su-subject message))
 	      (author (vm-su-full-name message))
 	      (message-id (vm-su-message-id message)))
@@ -6987,7 +7036,7 @@
       (save-excursion
 	(save-restriction
 	  (rmail-narrow-to-non-pruned-header)
-	  (let ((folder buffer-file-name)
+	  (let ((folder (buffer-file-name))
 		(message-id (mail-fetch-field "message-id"))
 		(author (mail-fetch-field "from"))
 		(subject (mail-fetch-field "subject")))
@@ -7041,7 +7090,7 @@
      ((eq major-mode 'org-mode)
       ;; Just link to current headline
       (setq cpltxt (concat "file:"
-			   (abbreviate-file-name buffer-file-name)))
+			   (abbreviate-file-name (buffer-file-name))))
       ;; Add a context search string
       (when (org-xor org-context-in-file-links arg)
 	(if (save-excursion
@@ -7059,10 +7108,10 @@
 			 )))))
       (setq link (org-make-link cpltxt)))
 
-     (buffer-file-name
+     ((buffer-file-name)
       ;; Just link to this file here.
       (setq cpltxt (concat "file:"
-			   (abbreviate-file-name buffer-file-name)))
+			   (abbreviate-file-name (buffer-file-name))))
       ;; Add a context string
       (when (org-xor org-context-in-file-links arg)
 	(setq cpltxt
@@ -7197,7 +7246,7 @@
 	       (case-fold-search nil)
 	       (search (match-string 2 link)))
 	    (when (save-match-data
-		    (equal (file-truename buffer-file-name)
+		    (equal (file-truename (buffer-file-name))
 			   (file-truename path)))
 	      (if (save-match-data
 		    (string-match (concat "^" org-camel-regexp "$") search))
@@ -7356,7 +7405,7 @@
 	(let  ((all org-reverse-note-order)
 	       entry)
 	  (while (setq entry (pop all))
-	    (if (string-match (car entry) buffer-file-name)
+	    (if (string-match (car entry) (buffer-file-name))
 		(throw 'exit (cdr entry))))
 	  nil)))))
 
@@ -10010,7 +10059,7 @@
 	 (level 0) line txt
 	 (umax nil)
 	 (case-fold-search nil)
-	 (filename (concat (file-name-sans-extension buffer-file-name)
+	 (filename (concat (file-name-sans-extension (buffer-file-name))
 			   ".txt"))
 	 (buffer (find-file-noselect filename))
 	 (levels-open (make-vector org-level-max nil))
@@ -10159,7 +10208,7 @@
 Also removes the first line of the buffer if it specifies a mode,
 and all options lines."
   (interactive)
-  (let* ((filename (concat (file-name-sans-extension buffer-file-name)
+  (let* ((filename (concat (file-name-sans-extension (buffer-file-name))
 			   ".txt"))
 	 (buffer (find-file-noselect filename))
 	 (ore (concat
@@ -10233,7 +10282,7 @@
    org-export-with-sub-superscripts
    org-export-with-emphasize
    org-export-with-TeX-macros
-   (file-name-nondirectory buffer-file-name)
+   (file-name-nondirectory (buffer-file-name))
    (if (equal org-todo-interpretation 'sequence)
        (mapconcat 'identity org-todo-keywords " ")
      "TODO FEEDBACK VERIFY DONE")
@@ -10306,7 +10355,7 @@
 headlines.  The default is 3.  Lower levels will become bulleted lists."
   (interactive "P")
   (org-export-as-html arg 'hidden)
-  (org-open-file buffer-file-name))
+  (org-open-file (buffer-file-name)))
 
 (defun org-export-as-html-batch ()
   "Call `org-export-as-html', may be used in batch processing as
@@ -10336,7 +10385,7 @@
          (lines (org-export-find-first-heading-line all_lines))
          (level 0) (line "") (origline "") txt todo
          (umax nil)
-         (filename (concat (file-name-sans-extension buffer-file-name)
+         (filename (concat (file-name-sans-extension (buffer-file-name))
                            ".html"))
          (buffer (find-file-noselect filename))
          (levels-open (make-vector org-level-max nil))
@@ -10999,7 +11048,7 @@
 The iCalendar file will be located in the same directory as the Org-mode
 file, but with extension `.ics'."
   (interactive)
-  (org-export-icalendar nil buffer-file-name))
+  (org-export-icalendar nil (buffer-file-name)))
 
 ;;;###autoload
 (defun org-export-icalendar-all-agenda-files ()
@@ -11036,7 +11085,7 @@
 	  (set-buffer (org-get-agenda-file-buffer file))
 	  (setq category (or org-category
 			     (file-name-sans-extension
-			      (file-name-nondirectory buffer-file-name))))
+			      (file-name-nondirectory (buffer-file-name)))))
 	  (if (symbolp category) (setq category (symbol-name category)))
 	  (let ((standard-output ical-buffer))
 	    (if combine
@@ -12137,27 +12186,6 @@
 			   (org-invisible-p)))
        (org-show-hierarchy-above)))
 
-(defun org-get-tags-at (&optional pos)
-  "Get a list of all headline targs applicable at POS.
-POS defaults to point.  If tags are inherited, the list contains
-the targets in the same sequence as the headlines appear, i.e.
-the tags of the current headline come last."
-  (interactive)
-  (let (tags)
-    (save-excursion
-      (goto-char (or pos (point)))
-      (save-match-data
-	(org-back-to-heading t)
-	(condition-case nil
-	    (while t
-	      (if (looking-at "[^\r\n]+?:\\([a-zA-Z_:]+\\):[ \t]*\\([\n\r]\\|\\'\\)")
-		  (setq tags (append (org-split-string (match-string 1) ":") tags)))
-	      (or org-use-tag-inheritance (error ""))
-	      (org-up-heading-all 1))
-	  (error nil))))
-    (message "%s" tags)
-    tags))
-
 ;;; Finish up
 
 (provide 'org)
@@ -12166,4 +12194,5 @@
 
 ;; arch-tag: e77da1a7-acc7-4336-b19e-efa25af3f9fd
 ;;; org.el ends here
+
       
--- a/lisp/textmodes/table.el	Tue Jan 24 02:01:42 2006 +0000
+++ b/lisp/textmodes/table.el	Wed Jan 25 07:10:04 2006 +0000
@@ -913,7 +913,7 @@
   "For mode line indicator")
 ;; This is not a real minor-mode but placed in the minor-mode-alist
 ;; so that we can show the indicator on the mode line handy.
-(make-variable-buffer-local table-mode-indicator)
+(make-variable-buffer-local 'table-mode-indicator)
 (unless (assq table-mode-indicator minor-mode-alist)
   (push '(table-mode-indicator (table-fixed-width-mode " Fixed-Table" " Table"))
         minor-mode-alist))
--- a/lisp/thumbs.el	Tue Jan 24 02:01:42 2006 +0000
+++ b/lisp/thumbs.el	Wed Jan 25 07:10:04 2006 +0000
@@ -3,6 +3,7 @@
 ;; Copyright (C) 2004, 2005 Free Software Foundation, Inc.
 
 ;; Author: Jean-Philippe Theberge <jphiltheberge@videotron.ca>
+;; Maintainer: FSF
 ;; Keywords: Multimedia
 
 ;; This file is part of GNU Emacs.
@@ -21,23 +22,24 @@
 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 ;; Boston, MA 02110-1301, USA.
-;;
-;; Thanks: Alex Schroeder <alex@gnu.org> for maintaining the package at some time
-;;         The peoples at #emacs@freenode.net for numerous help
-;;         RMS for emacs and the GNU project.
-;;
 
 ;;; Commentary:
 
-;; This package create two new mode: thumbs-mode and
-;; thumbs-view-image-mode.  It is used for images browsing and viewing
-;; from within Emacs.  Minimal image manipulation functions are also
-;; available via external programs.
+;; This package create two new modes: thumbs-mode and thumbs-view-image-mode.
+;; It is used for basic browsing and viewing of images from within Emacs.
+;; Minimal image manipulation functions are also available via external
+;; programs.  If you want to do more complex tasks like categorise and tag
+;; your images, use tumme.el
 ;;
 ;; The 'convert' program from 'ImageMagick'
 ;; [URL:http://www.imagemagick.org/] is required.
 ;;
+;; Thanks: Alex Schroeder <alex@gnu.org> for maintaining the package at some
+;;         time.  The peoples at #emacs@freenode.net for numerous help.  RMS
+;;         for emacs and the GNU project.
+;;
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;
 ;; CHANGELOG
 ;;
 ;; This is version 2.0
@@ -48,8 +50,8 @@
 ;; That should be a directory containing image files.
 ;; from dired, C-t m enter in thumbs-mode with all marked files
 ;;             C-t a enter in thumbs-mode with all files in current-directory
-;; In thumbs-mode, pressing <return> on a image will bring you in image view mode
-;; for that image.  C-h m will give you a list of available keybinding.
+;; In thumbs-mode, pressing <return> on a image will bring you in image view
+;; mode for that image.  C-h m will give you a list of available keybinding.
 
 ;;; History:
 ;;
@@ -75,13 +77,18 @@
   :type 'string
   :group 'thumbs)
 
-(defcustom thumbs-per-line 5
-  "*Number of thumbnails per line to show in directory."
+(defcustom thumbs-per-line 4
+  "Number of thumbnails per line to show in directory."
+  :type 'integer
+  :group 'thumbs)
+
+(defcustom thumbs-max-image-number 16
+ "Maximum number of images initially displayed in thumbs buffer."
   :type 'integer
   :group 'thumbs)
 
 (defcustom thumbs-thumbsdir-max-size 50000000
-  "Max size for thumbnails directory.
+  "Maximum size for thumbnails directory.
 When it reaches that size (in bytes), a warning is sent."
   :type 'integer
   :group 'thumbs)
@@ -121,7 +128,7 @@
   :group 'thumbs)
 
 (defcustom thumbs-image-resizing-step 10
-  "Step by which to resize image."
+  "Step by which to resize image as a percentage."
   :type 'integer
   :group 'thumbs)
 
@@ -146,6 +153,11 @@
   "Filename of current image.")
 (make-variable-buffer-local 'thumbs-current-image-filename)
 
+(defvar thumbs-extra-images 1
+  "Counter for showing extra images in thumbs buffer.")
+(make-variable-buffer-local 'thumbs-extra-images)
+(put 'thumbs-extra-images 'permanent-local t)
+
 (defvar thumbs-current-image-size nil
   "Size of current image.")
 
@@ -153,10 +165,14 @@
   "Number of current image.")
 (make-variable-buffer-local 'thumbs-image-num)
 
+(defvar thumbs-buffer nil
+  "Name of buffer containing thumbnails associated with image.")
+(make-variable-buffer-local 'thumbs-buffer)
+
 (defvar thumbs-current-dir nil
   "Current directory.")
 
-(defvar thumbs-markedL nil
+(defvar thumbs-marked-list nil
   "List of marked files.")
 
 (defalias 'thumbs-gensym
@@ -199,21 +215,21 @@
 If the total size of all files in `thumbs-thumbsdir' is bigger than
 `thumbs-thumbsdir-max-size', files are deleted until the max size is
 reached."
-  (let* ((filesL
+  (let* ((files-list
 	  (sort
 	   (mapcar
 	    (lambda (f)
-	      (let ((fattribsL (file-attributes f)))
-		`(,(nth 4 fattribsL) ,(nth 7 fattribsL) ,f)))
+	      (let ((fattribs-list (file-attributes f)))
+		`(,(nth 4 fattribs-list) ,(nth 7 fattribs-list) ,f)))
 	    (directory-files (thumbs-thumbsdir) t (image-file-name-regexp)))
 	   '(lambda (l1 l2) (time-less-p (car l1) (car l2)))))
-	 (dirsize (apply '+ (mapcar (lambda (x) (cadr x)) filesL))))
+	 (dirsize (apply '+ (mapcar (lambda (x) (cadr x)) files-list))))
     (while (> dirsize thumbs-thumbsdir-max-size)
       (progn
-	(message "Deleting file %s" (cadr (cdar filesL))))
-      (delete-file (cadr (cdar filesL)))
-      (setq dirsize (- dirsize (car (cdar filesL))))
-      (setq filesL (cdr filesL)))))
+	(message "Deleting file %s" (cadr (cdar files-list))))
+      (delete-file (cadr (cdar files-list)))
+      (setq dirsize (- dirsize (car (cdar files-list))))
+      (setq files-list (cdr files-list)))))
 
 ;; Check the thumbsnail directory size and clean it if necessary.
 (when thumbs-thumbsdir-auto-clean
@@ -238,75 +254,47 @@
 			 filein
 			 (or output-format "jpeg")
 			 fileout)))
-    (shell-command command)))
-
-(defun thumbs-increment-image-size-element (n d)
-  "Increment number N by D percent."
-  (round (+ n (/ (* d n) 100))))
+    (call-process shell-file-name nil nil nil "-c" command)))
 
-(defun thumbs-decrement-image-size-element (n d)
-  "Decrement number N by D percent."
-  (round (- n (/ (* d n) 100))))
-
-(defun thumbs-increment-image-size (s)
-  "Increment S (a cons of width x height)."
-  (cons
-   (thumbs-increment-image-size-element (car s)
-					thumbs-image-resizing-step)
-   (thumbs-increment-image-size-element (cdr s)
-					thumbs-image-resizing-step)))
+(defun thumbs-new-image-size (s increment)
+  "New image (a cons of width x height)."
+  (let ((d (* increment thumbs-image-resizing-step)))
+    (cons
+     (round (+ (car s) (/ (* d (car s)) 100)))
+     (round (+ (cdr s) (/ (* d (cdr s)) 100))))))
 
-(defun thumbs-decrement-image-size (s)
-  "Decrement S (a cons of width x height)."
-  (cons
-   (thumbs-decrement-image-size-element (car s)
-					thumbs-image-resizing-step)
-   (thumbs-decrement-image-size-element (cdr s)
-					thumbs-image-resizing-step)))
-
-(defun thumbs-resize-image (&optional increment size)
+(defun thumbs-resize-image-1 (&optional increment size)
   "Resize image in current buffer.
-If INCREMENT is set, make the image bigger, else smaller.
-Or, alternatively, a SIZE may be specified."
-  (interactive)
-  ;; cleaning of old temp file
-  (condition-case nil
-    (apply 'delete-file
-	   (directory-files
-	    (thumbs-temp-dir) t
-	    thumbs-temp-prefix))
-    (error nil))
-  (let ((buffer-read-only nil)
-	(x (if size
-	       size
-	     (if increment
-		 (thumbs-increment-image-size
-		  thumbs-current-image-size)
-	       (thumbs-decrement-image-size
-		thumbs-current-image-size))))
-	(tmp (thumbs-temp-file)))
+If SIZE is specified use it.  Otherwise make the image larger or
+smaller according to whether INCREMENT is 1 or -1."
+  (let* ((buffer-read-only nil)
+	 (old thumbs-current-tmp-filename)
+	 (x (or size
+		(thumbs-new-image-size thumbs-current-image-size increment)))
+	 (tmp (thumbs-temp-file)))
     (erase-buffer)
-    (thumbs-call-convert thumbs-current-image-filename
+    (thumbs-call-convert (or old thumbs-current-image-filename)
 			 tmp "sample"
 			 (concat (number-to-string (car x)) "x"
 				 (number-to-string (cdr x))))
-    (thumbs-insert-image tmp 'jpeg 0)
+    (save-excursion
+      (thumbs-insert-image tmp 'jpeg 0))
     (setq thumbs-current-tmp-filename tmp)))
 
-(defun thumbs-resize-interactive (width height)
+(defun thumbs-resize-image (width height)
   "Resize image interactively to specified WIDTH and HEIGHT."
   (interactive "nWidth: \nnHeight: ")
-  (thumbs-resize-image nil (cons width height)))
+  (thumbs-resize-image-1 nil (cons width height)))
 
-(defun thumbs-resize-image-size-down ()
+(defun thumbs-shrink-image ()
   "Resize image (smaller)."
   (interactive)
-  (thumbs-resize-image nil))
+  (thumbs-resize-image-1 -1))
 
-(defun thumbs-resize-image-size-up ()
+(defun thumbs-enlarge-image ()
   "Resize image (bigger)."
   (interactive)
-  (thumbs-resize-image t))
+  (thumbs-resize-image-1 1))
 
 (defun thumbs-thumbname (img)
   "Return a thumbnail name for the image IMG."
@@ -376,70 +364,81 @@
 If MARKED is non-nil, the image is marked."
   (thumbs-insert-image
    (thumbs-make-thumb img) 'jpeg thumbs-relief marked)
-  (put-text-property (1- (point)) (point)
-		     'thumb-image-file img))
+  (add-text-properties (1- (point)) (point)
+		     `(thumb-image-file ,img
+		       help-echo ,(file-name-nondirectory img))))
 
-(defun thumbs-do-thumbs-insertion (L)
-  "Insert all thumbs in list L."
-  (let ((i 0))
-    (dolist (img L)
+(defun thumbs-do-thumbs-insertion (list)
+  "Insert all thumbnails into thumbs buffer."
+  (let* ((i 0)
+	(length (length list))
+	(diff (- length (* thumbs-max-image-number thumbs-extra-images))))
+    (nbutlast list diff)
+    (dolist (img list)
       (thumbs-insert-thumb img
-			   (member img thumbs-markedL))
+			   (member img thumbs-marked-list))
       (when (= 0 (mod (setq i (1+ i)) thumbs-per-line))
 	(newline)))
-    (unless (bobp) (newline))))
+    (unless (bobp) (newline))
+    (if diff (message "Type + to display more images."))))
 
-(defun thumbs-show-thumbs-list (L &optional buffer-name same-window)
+(defun thumbs-show-thumbs-list (list &optional dir same-window)
   (unless (and (display-images-p)
                (image-type-available-p 'jpeg))
     (error "Required image type is not supported in this Emacs session"))
   (funcall (if same-window 'switch-to-buffer 'pop-to-buffer)
-	   (or buffer-name "*THUMB-View*"))
+	   (if dir (concat "*Thumbs: " dir) "*THUMB-View*"))
   (let ((inhibit-read-only t))
     (erase-buffer)
     (thumbs-mode)
-    (thumbs-do-thumbs-insertion L)
+    (setq thumbs-buffer (current-buffer))
+    (if dir (setq default-directory dir))
+    (thumbs-do-thumbs-insertion list)
     (goto-char (point-min))
     (set (make-local-variable 'thumbs-current-dir) default-directory)))
 
 ;;;###autoload
-(defun thumbs-show-all-from-dir (dir &optional reg same-window)
+(defun thumbs-show-from-dir (dir &optional reg same-window)
   "Make a preview buffer for all images in DIR.
 Optional argument REG to select file matching a regexp,
 and SAME-WINDOW to show thumbs in the same window."
   (interactive "DDir: ")
   (thumbs-show-thumbs-list
-   (directory-files dir t
-		    (or reg (image-file-name-regexp)))
-   (concat "*Thumbs: " dir) same-window))
+   (directory-files dir t (or reg (image-file-name-regexp)))
+   dir same-window))
 
 ;;;###autoload
 (defun thumbs-dired-show-marked ()
-  "In dired, make a thumbs buffer with all marked files."
+  "In dired, make a thumbs buffer with marked files."
   (interactive)
   (thumbs-show-thumbs-list (dired-get-marked-files) nil t))
 
 ;;;###autoload
-(defun thumbs-dired-show-all ()
+(defun thumbs-dired-show ()
   "In dired, make a thumbs buffer with all files in current directory."
   (interactive)
-  (thumbs-show-all-from-dir default-directory nil t))
+  (thumbs-show-from-dir default-directory nil t))
 
 ;;;###autoload
-(defalias 'thumbs 'thumbs-show-all-from-dir)
+(defalias 'thumbs 'thumbs-show-from-dir)
 
 (defun thumbs-find-image (img &optional num otherwin)
-  (funcall
-   (if otherwin 'switch-to-buffer-other-window 'switch-to-buffer)
-   (concat "*Image: " (file-name-nondirectory img) " - "
-	   (number-to-string (or num 0)) "*"))
-  (thumbs-view-image-mode)
-  (let ((inhibit-read-only t))
-    (setq thumbs-current-image-filename img
-	  thumbs-current-tmp-filename nil
-	  thumbs-image-num (or num 0))
-    (delete-region (point-min)(point-max))
-    (thumbs-insert-image img (thumbs-image-type img) 0)))
+  (let ((buffer (current-buffer)))
+    (funcall
+     (if otherwin 'switch-to-buffer-other-window 'switch-to-buffer)
+     "*Image*")
+    (thumbs-view-image-mode)
+    (setq mode-name
+	  (concat "image-view-mode: " (file-name-nondirectory img)
+		  " - " (number-to-string num)))
+    (setq thumbs-buffer buffer)
+    (let ((inhibit-read-only t))
+      (setq thumbs-current-image-filename img
+	    thumbs-current-tmp-filename nil
+	    thumbs-image-num (or num 0))
+      (delete-region (point-min)(point-max))
+      (save-excursion
+	(thumbs-insert-image img (thumbs-image-type img) 0)))))
 
 (defun thumbs-find-image-at-point (&optional img otherwin)
   "Display image IMG for thumbnail at point.
@@ -484,16 +483,18 @@
 
 (defun thumbs-file-alist ()
   "Make an alist of elements (POS . FILENAME) for all images in thumb buffer."
-  (save-excursion
-    (let (list)
-      (goto-char (point-min))
-      (while (not (eobp))
-	(if (thumbs-current-image)
-	    (push (cons (point-marker)
-			(thumbs-current-image))
-		  list))
-	(forward-char 1))
-      list)))
+  (with-current-buffer thumbs-buffer
+    (save-excursion
+      (let (list)
+	(goto-char (point-min))
+	(while (not (eobp))
+	  (unless (= 0 (mod (point) (1+ thumbs-per-line)))
+	    (if (thumbs-current-image)
+		(push (cons (point-marker)
+			    (thumbs-current-image))
+		    list)))
+	  (forward-char 1))
+	(nreverse list)))))
 
 (defun thumbs-file-list ()
   "Make a list of file names for all images in thumb buffer."
@@ -509,9 +510,9 @@
 (defun thumbs-delete-images ()
   "Delete the image at point (and its thumbnail) (or marked files if any)."
   (interactive)
-  (let ((files (or thumbs-markedL (list (thumbs-current-image)))))
+  (let ((files (or thumbs-marked-list (list (thumbs-current-image)))))
     (if (yes-or-no-p (format "Really delete %d files? " (length files)))
-	(let ((thumbs-fileL (thumbs-file-alist))
+	(let ((thumbs-file-list (thumbs-file-alist))
 	      (inhibit-read-only t))
 	  (dolist (x files)
 	    (let (failure)
@@ -521,24 +522,24 @@
 		    (delete-file (thumbs-thumbname x)))
 		(file-error (setq failure t)))
 	      (unless failure
-		(when (rassoc x thumbs-fileL)
-		  (goto-char (car (rassoc x thumbs-fileL)))
+		(when (rassoc x thumbs-file-list)
+		  (goto-char (car (rassoc x thumbs-file-list)))
 		  (delete-region (point) (1+ (point))))
-		(setq thumbs-markedL
-		      (delq x thumbs-markedL)))))))))
+		(setq thumbs-marked-list
+		      (delq x thumbs-marked-list)))))))))
 
 (defun thumbs-rename-images (newfile)
   "Rename the image at point (and its thumbnail) (or marked files if any)."
   (interactive "FRename to file or directory: ")
-  (let ((files (or thumbs-markedL (list (thumbs-current-image))))
+  (let ((files (or thumbs-marked-list (list (thumbs-current-image))))
 	failures)
     (if (and (not (file-directory-p newfile))
-	     thumbs-markedL)
+	     thumbs-marked-list)
 	(if (file-exists-p newfile)
 	    (error "Renaming marked files to file name `%s'" newfile)
 	  (make-directory newfile t)))
     (if (yes-or-no-p (format "Really rename %d files? " (length files)))
-	(let ((thumbs-fileL (thumbs-file-alist))
+	(let ((thumbs-file-list (thumbs-file-alist))
 	      (inhibit-read-only t))
 	  (dolist (file files)
 	    (let (failure)
@@ -552,11 +553,11 @@
 		(file-error (setq failure t)
 			    (push file failures)))
 	      (unless failure
-		(when (rassoc file thumbs-fileL)
-		  (goto-char (car (rassoc file thumbs-fileL)))
+		(when (rassoc file thumbs-file-list)
+		  (goto-char (car (rassoc file thumbs-file-list)))
 		  (delete-region (point) (1+ (point))))
-		(setq thumbs-markedL
-		      (delq file thumbs-markedL)))))))
+		(setq thumbs-marked-list
+		      (delq file thumbs-marked-list)))))))
     (if failures
 	(display-warning 'file-error
 			 (format "Rename failures for %s into %s"
@@ -571,31 +572,38 @@
 (defun thumbs-show-image-num (num)
   "Show the image with number NUM."
   (let ((image-buffer (get-buffer-create "*Image*")))
-    (let ((i (thumbs-current-image)))
+    (let ((img (cdr (nth (1- num) (thumbs-file-alist)))))
       (with-current-buffer image-buffer
-	(thumbs-insert-image i (thumbs-image-type i) 0))
+	(setq mode-name
+	      (concat "image-view-mode: " (file-name-nondirectory img)
+		      " - " (number-to-string num)))
+	(let ((inhibit-read-only t))
+	  (erase-buffer)
+	  (thumbs-insert-image img (thumbs-image-type img) 0)
+	  (goto-char (point-min))))
       (setq thumbs-image-num num
-	    thumbs-current-image-filename i))))
+	    thumbs-current-image-filename img))))
+
+(defun thumbs-previous-image ()
+  "Show the previous image."
+  (interactive)
+  (let* ((i (- thumbs-image-num 1))
+	 (number (length (thumbs-file-alist))))
+    (if (= i 0) (setq i (1- number)))
+    (thumbs-show-image-num i)))
 
 (defun thumbs-next-image ()
   "Show the next image."
   (interactive)
   (let* ((i (1+ thumbs-image-num))
-	 (list (thumbs-file-alist))
-	 (l (caar list)))
-    (while (and (/= i thumbs-image-num) (not (assoc i list)))
-      (setq i (if (>= i l) 1 (1+ i))))
+	 (number (length (thumbs-file-alist))))
+    (if (= i number) (setq i 1))
     (thumbs-show-image-num i)))
 
-(defun thumbs-previous-image ()
-  "Show the previous image."
+(defun thumbs-display-thumbs-buffer ()
+  "Display the associated thumbs buffer."
   (interactive)
-  (let* ((i (- thumbs-image-num 1))
-	 (list (thumbs-file-alist))
-	 (l (caar list)))
-    (while (and (/= i thumbs-image-num) (not (assoc i list)))
-      (setq i (if (<= i 1) l (1- i))))
-    (thumbs-show-image-num i)))
+  (display-buffer thumbs-buffer))
 
 (defun thumbs-redraw-buffer ()
   "Redraw the current thumbs buffer."
@@ -612,10 +620,11 @@
   (let ((elt (thumbs-current-image)))
     (unless elt
       (error "No image here"))
-    (push elt thumbs-markedL)
+    (push elt thumbs-marked-list)
     (let ((inhibit-read-only t))
       (delete-char 1)
-      (thumbs-insert-thumb elt t)))
+      (save-excursion
+	(thumbs-insert-thumb elt t))))
   (when (eolp) (forward-char)))
 
 (defun thumbs-unmark ()
@@ -624,32 +633,34 @@
   (let ((elt (thumbs-current-image)))
     (unless elt
       (error "No image here"))
-    (setq thumbs-markedL (delete elt thumbs-markedL))
+    (setq thumbs-marked-list (delete elt thumbs-marked-list))
     (let ((inhibit-read-only t))
       (delete-char 1)
-      (thumbs-insert-thumb elt nil)))
+      (save-excursion
+	(thumbs-insert-thumb elt nil))))
   (when (eolp) (forward-char)))
 
+
+;; cleaning of old temp files
+(mapc 'delete-file
+      (directory-files (thumbs-temp-dir) t thumbs-temp-prefix))
+
 ;; Image modification routines
 
 (defun thumbs-modify-image (action &optional arg)
   "Call convert to do ACTION on image with argument ARG.
 ACTION and ARG should be a valid convert command."
   (interactive "sAction: \nsValue: ")
-  ;; cleaning of old temp file
-  (mapc 'delete-file
-	(directory-files
-	 (thumbs-temp-dir)
-	 t
-	 thumbs-temp-prefix))
-  (let ((buffer-read-only nil)
-	(tmp (thumbs-temp-file)))
+  (let* ((buffer-read-only nil)
+	 (old thumbs-current-tmp-filename)
+	 (tmp (thumbs-temp-file)))
     (erase-buffer)
-    (thumbs-call-convert thumbs-current-image-filename
+    (thumbs-call-convert (or old thumbs-current-image-filename)
 			 tmp
 			 action
 			 (or arg ""))
-    (thumbs-insert-image tmp 'jpeg 0)
+    (save-excursion
+      (thumbs-insert-image tmp 'jpeg 0))
     (setq thumbs-current-tmp-filename tmp)))
 
 (defun thumbs-emboss-image (emboss)
@@ -699,17 +710,24 @@
     (forward-char -1))
   (thumbs-show-name))
 
+(defun thumbs-backward-line ()
+  "Move up one line."
+  (interactive)
+  (forward-line -1)
+  (thumbs-show-name))
+
 (defun thumbs-forward-line ()
   "Move down one line."
   (interactive)
   (forward-line 1)
   (thumbs-show-name))
 
-(defun thumbs-backward-line ()
-  "Move up one line."
-  (interactive)
-  (forward-line -1)
-  (thumbs-show-name))
+(defun thumbs-show-more-images (&optional arg)
+  "Show more than `thumbs-max-image-number' images, if present."
+  (interactive "P")
+  (or arg (setq arg 1))
+  (setq thumbs-extra-images (+ thumbs-extra-images arg))
+  (thumbs-dired-show))
 
 (defun thumbs-show-name ()
   "Show the name of the current file."
@@ -744,6 +762,7 @@
     (define-key map [left] 'thumbs-backward-char)
     (define-key map [up] 'thumbs-backward-line)
     (define-key map [down] 'thumbs-forward-line)
+    (define-key map "+" 'thumbs-show-more-images)
     (define-key map "d" 'thumbs-dired)
     (define-key map "m" 'thumbs-mark)
     (define-key map "u" 'thumbs-unmark)
@@ -759,18 +778,19 @@
   fundamental-mode "thumbs"
   "Preview images in a thumbnails buffer"
   (setq buffer-read-only t)
-  (set (make-local-variable 'thumbs-markedL) nil))
+  (set (make-local-variable 'thumbs-marked-list) nil))
 
 (defvar thumbs-view-image-mode-map
   (let ((map (make-sparse-keymap)))
     (define-key map [prior] 'thumbs-previous-image)
     (define-key map [next] 'thumbs-next-image)
-    (define-key map "-" 'thumbs-resize-image-size-down)
-    (define-key map "+" 'thumbs-resize-image-size-up)
+    (define-key map "^" 'thumbs-display-thumbs-buffer)
+    (define-key map "-" 'thumbs-shrink-image)
+    (define-key map "+" 'thumbs-enlarge-image)
     (define-key map "<" 'thumbs-rotate-left)
     (define-key map ">" 'thumbs-rotate-right)
     (define-key map "e" 'thumbs-emboss-image)
-    (define-key map "r" 'thumbs-resize-interactive)
+    (define-key map "r" 'thumbs-resize-image)
     (define-key map "s" 'thumbs-save-current-image)
     (define-key map "q" 'thumbs-kill-buffer)
     (define-key map "w" 'thumbs-set-root)
@@ -790,7 +810,7 @@
   (thumbs-call-setroot-command (dired-get-filename)))
 
 ;; Modif to dired mode map
-(define-key dired-mode-map "\C-ta" 'thumbs-dired-show-all)
+(define-key dired-mode-map "\C-ta" 'thumbs-dired-show)
 (define-key dired-mode-map "\C-tm" 'thumbs-dired-show-marked)
 (define-key dired-mode-map "\C-tw" 'thumbs-dired-setroot)
 
--- a/lisp/vc-rcs.el	Tue Jan 24 02:01:42 2006 +0000
+++ b/lisp/vc-rcs.el	Wed Jan 25 07:10:04 2006 +0000
@@ -152,8 +152,8 @@
                 (vc-file-setprop file 'vc-checkout-model 'locking))))
           state)
       (if (not (vc-mistrust-permissions file))
-          (let* ((attributes  (file-attributes file))
-                 (owner-uid   (nth 2 attributes))
+          (let* ((attributes  (file-attributes file 'string))
+                 (owner-name  (nth 2 attributes))
                  (permissions (nth 8 attributes)))
             (cond ((string-match ".r-..-..-." permissions)
                    (vc-file-setprop file 'vc-checkout-model 'locking)
@@ -162,7 +162,7 @@
 		   (if (eq (vc-checkout-model file) 'locking)
 		       (if (file-ownership-preserved-p file)
 			   'edited
-			 (vc-user-login-name owner-uid))
+			 owner-name)
 		     (if (vc-rcs-workfile-is-newer file)
 			 'edited
 		       'up-to-date)))
--- a/lisp/vc-sccs.el	Tue Jan 24 02:01:42 2006 +0000
+++ b/lisp/vc-sccs.el	Wed Jan 25 07:10:04 2006 +0000
@@ -122,15 +122,15 @@
       ;; We have to be careful not to exclude files with execute bits on;
       ;; scripts can be under version control too.  Also, we must ignore the
       ;; group-read and other-read bits, since paranoid users turn them off.
-      (let* ((attributes (file-attributes file))
-             (owner-uid  (nth 2 attributes))
+      (let* ((attributes  (file-attributes file 'string))
+             (owner-name  (nth 2 attributes))
              (permissions (nth 8 attributes)))
 	(if (string-match ".r-..-..-." permissions)
             'up-to-date
           (if (string-match ".rw..-..-." permissions)
               (if (file-ownership-preserved-p file)
                   'edited
-                (vc-user-login-name owner-uid))
+                owner-name)
             ;; Strange permissions.
             ;; Fall through to real state computation.
             (vc-sccs-state file))))
--- a/lispref/ChangeLog	Tue Jan 24 02:01:42 2006 +0000
+++ b/lispref/ChangeLog	Wed Jan 25 07:10:04 2006 +0000
@@ -1,3 +1,21 @@
+2006-01-19  Richard M. Stallman  <rms@gnu.org>
+
+	* nonascii.texi (Translation of Characters): Search cmds use
+	translation-table-for-input.  Automatically made local.
+
+	* markers.texi (Overview of Markers): Count insertion type
+	as one of a marker's attributes.
+
+	* elisp.texi (Top): Menu clarification.
+
+	* display.texi (Other Display Specs): Delete duplicate entry for
+	just a string as display spec.  Move text about recursive display
+	specs on such a string.
+
+	* commands.texi (Key Sequence Input): Clarify.
+	Move num-nonmacro-input-events out.
+	(Reading One Event): num-nonmacro-input-events moved here.
+
 2006-01-14  Nick Roberts  <nickrob@snap.net.nz>
 
 	* advice.texi (Simple Advice): Update example to fit argument
--- a/lispref/commands.texi	Tue Jan 24 02:01:42 2006 +0000
+++ b/lispref/commands.texi	Wed Jan 25 07:10:04 2006 +0000
@@ -2074,6 +2074,9 @@
 events---characters, symbols, and lists.  The elements of the string or
 vector are the events in the key sequence.
 
+Reading a key sequence includes translating the events in various
+ways.  @xref{Translating Input}.
+
 The argument @var{prompt} is either a string to be displayed in the
 echo area as a prompt, or @code{nil}, meaning not to display a prompt.
 The argument @var{continue-echo}, if non-@code{nil}, means to echo
@@ -2097,8 +2100,8 @@
 after another.  It should be @code{nil} if the caller will read just
 one key sequence.
 
-In the example below, the prompt @samp{?} is displayed in the echo area,
-and the user types @kbd{C-x C-f}.
+In the following example, Emacs displays the prompt @samp{?} in the
+echo area, and then the user types @kbd{C-x C-f}.
 
 @example
 (read-key-sequence "?")
@@ -2173,11 +2176,6 @@
 and key sequences read from keyboard macros being executed.
 @end defvar
 
-@defvar num-nonmacro-input-events
-This variable holds the total number of input events received so far
-from the terminal---not counting those generated by keyboard macros.
-@end defvar
-
 @node Reading One Event
 @subsection Reading One Event
 @cindex reading a single event
@@ -2265,6 +2263,11 @@
 gets a character.  The arguments work as in @code{read-event}.
 @end defun
 
+@defvar num-nonmacro-input-events
+This variable holds the total number of input events received so far
+from the terminal---not counting those generated by keyboard macros.
+@end defvar
+
 @node Invoking the Input Method
 @subsection Invoking the Input Method
 
--- a/lispref/display.texi	Tue Jan 24 02:01:42 2006 +0000
+++ b/lispref/display.texi	Wed Jan 25 07:10:04 2006 +0000
@@ -3277,6 +3277,9 @@
 @item @var{string}
 Display @var{string} instead of the text that has this property.
 
+Recursive display specifications are not supported---@var{string}'s
+@code{display} properties, if any, are not used.
+
 @item (image . @var{image-props})
 This kind of display specification is an image descriptor (@pxref{Images}).
 When used as a display specification, it means to display the image
@@ -3292,14 +3295,11 @@
 of the entire image.
 
 @item ((margin nil) @var{string})
-@itemx @var{string}
 A display specification of this form means to display @var{string}
 instead of the text that has the display specification, at the same
-position as that text.  This is a special case of marginal display
-(@pxref{Display Margins}).
-
-Recursive display specifications are not supported---string display
-specifications must not have @code{display} properties themselves.
+position as that text.  It is equivalent to using just @var{string},
+but it is done as a special case of marginal display (@pxref{Display
+Margins}).
 
 @item (space-width @var{factor})
 This display specification affects all the space characters within the
--- a/lispref/elisp.texi	Tue Jan 24 02:01:42 2006 +0000
+++ b/lispref/elisp.texi	Wed Jan 25 07:10:04 2006 +0000
@@ -123,7 +123,7 @@
                               files are made.
 * Buffers::                 Creating and using buffer objects.
 * Windows::                 Manipulating windows and displaying buffers.
-* Frames::		    Making multiple X windows.
+* Frames::		    Making multiple system-level windows.
 * Positions::               Buffer positions and motion functions.
 * Markers::                 Markers represent positions and update
                               automatically when the text is changed.
--- a/lispref/markers.texi	Tue Jan 24 02:01:42 2006 +0000
+++ b/lispref/markers.texi	Wed Jan 25 07:10:04 2006 +0000
@@ -36,14 +36,15 @@
 operates on, but that is entirely the programmer's responsibility.
 @xref{Positions}, for a complete description of positions.
 
-  A marker has two attributes: the marker position, and the marker
-buffer.  The marker position is an integer that is equivalent (at a
-given time) to the marker as a position in that buffer.  But the
-marker's position value can change often during the life of the marker.
-Insertion and deletion of text in the buffer relocate the marker.  The
-idea is that a marker positioned between two characters remains between
-those two characters despite insertion and deletion elsewhere in the
-buffer.  Relocation changes the integer equivalent of the marker.
+  A marker has three attributes: the marker position, the marker
+buffer, and the insertion type.  The marker position is an integer
+that is equivalent (at a given time) to the marker as a position in
+that buffer.  But the marker's position value can change often during
+the life of the marker.  Insertion and deletion of text in the buffer
+relocate the marker.  The idea is that a marker positioned between two
+characters remains between those two characters despite insertion and
+deletion elsewhere in the buffer.  Relocation changes the integer
+equivalent of the marker.
 
 @cindex marker relocation
   Deleting text around a marker's position leaves the marker between the
--- a/lispref/nonascii.texi	Tue Jan 24 02:01:42 2006 +0000
+++ b/lispref/nonascii.texi	Wed Jan 25 07:10:04 2006 +0000
@@ -578,12 +578,14 @@
 
 @defvar translation-table-for-input
 Self-inserting characters are translated through this translation
-table before they are inserted.  This variable automatically becomes
-buffer-local when set.
+table before they are inserted.  Search commands also translate their
+input through this table, so they can compare more reliably with
+what's in the buffer.
 
 @code{set-buffer-file-coding-system} sets this variable so that your
 keyboard input gets translated into the character sets that the buffer
-is likely to contain.
+is likely to contain.  This variable automatically becomes
+buffer-local when set.
 @end defvar
 
 @node Coding Systems
--- a/man/ChangeLog	Tue Jan 24 02:01:42 2006 +0000
+++ b/man/ChangeLog	Wed Jan 25 07:10:04 2006 +0000
@@ -1,3 +1,50 @@
+2006-01-23  Juri Linkov  <juri@jurta.org>
+
+	* custom.texi (Easy Customization, Customization Groups)
+	(Browsing Custom): Mention links along with buttons.
+
+	* widget.texi (User Interface): Add S-TAB for widget-backward.
+
+2006-01-22  Michael Albinus  <michael.albinus@gmx.de>
+
+	Sync with Tramp 2.0.52.
+
+	* tramp.texi (Frequently Asked Questions): Remove Ange-FTP item.
+	Add Tramp disabling item.  New item for common connection
+	problems.
+	(various): Apply "ftp" as method for the download URL.
+	(Bug Reports): Refer to FAQ for common problems.
+
+2006-01-21  Eli Zaretskii  <eliz@gnu.org>
+
+	* widget.texi (User Interface): Use @key for TAB.
+
+	* text.texi (TeX Print): Use @key for TAB.
+
+	* ses.texi (Formulas, Printer functions): Use @key for TAB.
+
+	* kmacro.texi (Keyboard Macro Step-Edit): : Use @key for TAB.
+
+	* ebrowse.texi (Switching to Tree, Symbol Completion): : Use @key
+	for TAB.
+
+	* cc-mode.texi (Indentation Calculation): Use @key for TAB.
+
+2006-01-15  Sven Joachim  <svenjoac@gmx.de>  (tiny change)
+
+	* files.texi (File Aliases): Don't claim that usually separate
+	buffers are created for two file names that name the same data.
+	Mention additional situations where different names mean the same
+	file on disk.
+
+2006-01-19  Richard M. Stallman  <rms@gnu.org>
+
+	* killing.texi (Deletion): Upcase @key argument.
+
+	* custom.texi (Custom Themes): Minor cleanup.
+
+	* programs.texi (Hungry Delete): Upcase @key argument.
+
 2006-01-16  Katsumi Yamaoka  <yamaoka@jpl.org>
 
 	* gnus.texi: Update copyright.
--- a/man/cc-mode.texi	Tue Jan 24 02:01:42 2006 +0000
+++ b/man/cc-mode.texi	Wed Jan 25 07:10:04 2006 +0000
@@ -208,7 +208,7 @@
 @vskip 0pt plus 1filll
 @insertcopying
 
-This manual was generated from $Revision: 1.32 $ of $RCSfile: cc-mode.texi,v $, which can be
+This manual was generated from $Revision$ of $RCSfile$, which can be
 downloaded from
 @url{http://cvs.sf.net/viewcvs.py/cc-mode/cc-mode/cc-mode.texi}.
 @end titlepage
@@ -4883,7 +4883,7 @@
  6: @}
 @end example
 
-Let's say point is on line 3 and we hit the @kbd{TAB} key to reindent
+Let's say point is on line 3 and we hit the @key{TAB} key to reindent
 the line.  The syntactic context for that line is:
 
 @example
--- a/man/custom.texi	Tue Jan 24 02:01:42 2006 +0000
+++ b/man/custom.texi	Wed Jan 25 07:10:04 2006 +0000
@@ -202,7 +202,7 @@
 
   The appearance of the example buffers in this section is typically
 different under a window system, since faces are then used to indicate
-buttons and editable fields.
+buttons, links and editable fields.
 
 @menu
 * Groups: Customization Groups.   How settings are classified in a structure.
@@ -256,16 +256,18 @@
 
 @cindex editable fields (customization buffer)
 @cindex buttons (customization buffer)
+@cindex links (customization buffer)
   Most of the text in the customization buffer is read-only, but it
 typically includes some @dfn{editable fields} that you can edit.
-There are also @dfn{buttons}, which do something when you @dfn{invoke}
-them.  To invoke a button, either click on it with @kbd{Mouse-1}, or
-move point to it and type @key{RET}.
-
-  For example, the phrase @samp{[Go to Group]} that appears in a
-second-level group is a button.  Invoking it creates a new
-customization buffer, which shows that group and its contents.  This
-is a kind of hypertext link to another group.
+There are also @dfn{buttons} and @dfn{links}, which do something when
+you @dfn{invoke} them.  To invoke a button or a link, either click on
+it with @kbd{Mouse-1}, or move point to it and type @key{RET}.
+
+  For example, the phrase @samp{[State]} that appears in
+a second-level group is a button.  It operates on the same
+customization buffer.  The phrase @samp{[Go to Group]} is a kind
+of hypertext link to another group.  Invoking it creates a new
+customization buffer, which shows that group and its contents.
 
   The @code{Emacs} group includes a few settings, but mainly it
 contains other groups, which contain more groups, which contain the
@@ -288,8 +290,8 @@
 @samp{[+]}.  When the group contents are visible, this button changes to
 @samp{[-]}; invoking that hides the group contents.
 
-  Each setting in this buffer has a button which says @samp{[Group]},
-@samp{[Option]} or @samp{[Face]}.  Invoking this button creates an
+  Each setting in this buffer has a link which says @samp{[Group]},
+@samp{[Option]} or @samp{[Face]}.  Invoking this link creates an
 ordinary customization buffer showing just that group and its
 contents, just that user option, or just that face.  This is the way
 to change settings that you find with @kbd{M-x customize-browse}.
@@ -729,14 +731,15 @@
 @findex load-theme
 @findex enable-theme
 @findex disable-theme
-  You can also enable a Custom theme with @kbd{M-x enable-theme}.
-This prompts for a theme name in the minibuffer, loads the theme from
-the theme file if necessary, and enables the theme.  An enabled theme
-can be @dfn{disabled} with the command @kbd{M-x disable-theme}; this
-returns the options specified in the theme to their original values.
-To re-enable the theme, call @kbd{M-x enable-theme} again.  If a theme
-file is changed during your Emacs session, you can reload it by
-calling @kbd{M-x load-theme}.  This also enables the theme.
+  You can temporarily enable a Custom theme with @kbd{M-x
+enable-theme}.  This prompts for a theme name in the minibuffer, loads
+the theme from the theme file if necessary, and enables the theme.
+You can @dfn{disabled} any enabled theme with the command @kbd{M-x
+disable-theme}; this returns the options specified in the theme to
+their original values.  To re-enable the theme, type @kbd{M-x
+enable-theme} again.  If a theme file is changed during your Emacs
+session, you can reload it by typing @kbd{M-x load-theme}.  (This also
+enables the theme.)
 
 @node Variables
 @section Variables
--- a/man/ebrowse.texi	Tue Jan 24 02:01:42 2006 +0000
+++ b/man/ebrowse.texi	Wed Jan 25 07:10:04 2006 +0000
@@ -979,11 +979,11 @@
 @cindex switching buffers
 
 @table @kbd
-@item TAB
+@item @key{TAB}
 Pop up the tree buffer to which the member buffer belongs.
 
 @item t
-Do the same as @kbd{TAB} but also position the cursor on the class
+Do the same as @key{TAB} but also position the cursor on the class
 displayed in the member buffer.
 @end table
 
@@ -1433,7 +1433,7 @@
 @cindex completion
 @cindex symbol completion
 
-The command @kbd{C-c b TAB} completes the symbol in front of point.
+The command @kbd{C-c b @key{TAB}} completes the symbol in front of point.
 
 
 
--- a/man/files.texi	Tue Jan 24 02:01:42 2006 +0000
+++ b/man/files.texi	Wed Jan 25 07:10:04 2006 +0000
@@ -1150,21 +1150,20 @@
 @file{foo} is just an alias.  More complex cases occur when symbolic
 links point to directories.
 
-  If you visit two names for the same file, normally Emacs makes
-two different buffers, but it warns you about the situation.
-
 @vindex find-file-existing-other-name
 @vindex find-file-suppress-same-file-warnings
+
   Normally, if you visit a file which Emacs is already visiting under
 a different name, Emacs displays a message in the echo area and uses
 the existing buffer visiting that file.  This can happen on systems
-that support symbolic links, or if you use a long file name on a
-system that truncates long file names.  You can suppress the message by
-setting the variable @code{find-file-suppress-same-file-warnings} to a
-non-@code{nil} value.  You can disable this feature entirely by setting
-the variable @code{find-file-existing-other-name} to @code{nil}: then
-if you visit the same file under two different names, you get a separate
-buffer for each file name.
+that support hard or symbolic links, or if you use a long file name on
+a system that truncates long file names, or on a case-insensitive file
+system.  You can suppress the message by setting the variable
+@code{find-file-suppress-same-file-warnings} to a non-@code{nil}
+value.  You can disable this feature entirely by setting the variable
+@code{find-file-existing-other-name} to @code{nil}: then if you visit
+the same file under two different names, you get a separate buffer for
+each file name.
 
 @vindex find-file-visit-truename
 @cindex truenames of files
--- a/man/killing.texi	Tue Jan 24 02:01:42 2006 +0000
+++ b/man/killing.texi	Wed Jan 25 07:10:04 2006 +0000
@@ -78,9 +78,9 @@
 
 @table @kbd
 @item C-d
-@itemx @key{Delete}
+@itemx @key{DELETE}
 Delete next character (@code{delete-char}).  If your keyboard has a
-@key{Delete} function key (usually located in the edit keypad), Emacs
+@key{DELETE} function key (usually located in the edit keypad), Emacs
 binds it to @code{delete-char} as well.
 @item @key{DEL}
 @itemx @key{BS}
--- a/man/kmacro.texi	Tue Jan 24 02:01:42 2006 +0000
+++ b/man/kmacro.texi	Wed Jan 25 07:10:04 2006 +0000
@@ -521,8 +521,8 @@
 @kbd{f} skips the current command in this execution of the keyboard
 macro, but doesn't delete it from the macro.
 @item
-@kbd{TAB} executes the current command, as well as all similar
-commands immediately following the current command; for example, TAB
+@kbd{@key{TAB}} executes the current command, as well as all similar
+commands immediately following the current command; for example, @key{TAB}
 may be used to insert a sequence of characters (corresponding to a
 sequence of @code{self-insert-command} commands).
 @item
--- a/man/org.texi	Tue Jan 24 02:01:42 2006 +0000
+++ b/man/org.texi	Wed Jan 25 07:10:04 2006 +0000
@@ -4,7 +4,7 @@
 @setfilename ../info/org
 @settitle Org Mode Manual
 
-@set VERSION 4.03
+@set VERSION 4.04
 @set DATE January 2006
 
 @dircategory Emacs
@@ -2511,7 +2511,7 @@
 
 @kindex T
 @item T
-Show all tags associated with the current item.  Because of
+Show all tags assiciated with the current item.  Because of
 inheritance, this may be more than the tags listed in the line itself.
 
 @kindex :
--- a/man/programs.texi	Tue Jan 24 02:01:42 2006 +0000
+++ b/man/programs.texi	Wed Jan 25 07:10:04 2006 +0000
@@ -1630,7 +1630,7 @@
 delete mode}.  When this feature is enabled (indicated by @samp{/h} in
 the mode line after the mode name), a single @key{BS} command deletes
 all preceding whitespace, not just one space, and a single @kbd{C-c
-C-d} (but @emph{not} @key{delete}) deletes all following whitespace.
+C-d} (but @emph{not} @key{DELETE}) deletes all following whitespace.
 
 @table @kbd
 @item M-x c-toggle-hungry-state
--- a/man/ses.texi	Tue Jan 24 02:01:42 2006 +0000
+++ b/man/ses.texi	Wed Jan 25 07:10:04 2006 +0000
@@ -188,12 +188,12 @@
 (@code{ses-read-cell}).  To access another cell's value, just use its
 identifier in your expression.  Whenever the other cell is changed,
 this cell's formula will be reevaluated.  While typing in the
-expression, you can use @kbd{M-TAB} to complete symbol names.
+expression, you can use @kbd{M-@key{TAB}} to complete symbol names.
 
 @item ' @r{(apostrophe)}
 Enter a symbol (ses-read-symbol).  SES remembers all symbols that have
 been used as formulas, so you can type just the beginning of a symbol
-and use @kbd{SPC}, @kbd{TAB}, and @kbd{?} to complete it.
+and use @kbd{@key{SPC}}, @kbd{@key{TAB}}, and @kbd{?} to complete it.
 @end table
 
 To enter something else (e.g., a vector), begin with a digit, then
@@ -287,7 +287,7 @@
 use parentheses: @samp{("$%.2f")}.  A printer can also be a
 one-argument function (a symbol or a lambda), whose result is a string
 (right-aligned) or list of one string (left-aligned).  While typing in
-a lambda, you can use @kbd{M-TAB} to complete the names of symbols.
+a lambda, you can use @kbd{M-@key{TAB}} to complete the names of symbols.
 
 Each cell has a printer.  If @code{nil}, the column-printer for the cell's
 column is used.  If that is also @code{nil}, the default-printer for the
--- a/man/text.texi	Tue Jan 24 02:01:42 2006 +0000
+++ b/man/text.texi	Wed Jan 25 07:10:04 2006 +0000
@@ -1680,12 +1680,12 @@
   For La@TeX{} files, you can use Bib@TeX{} to process the auxiliary
 file for the current buffer's file.  Bib@TeX{} looks up bibliographic
 citations in a data base and prepares the cited references for the
-bibliography section.  The command @kbd{C-c TAB}
+bibliography section.  The command @kbd{C-c @key{TAB}}
 (@code{tex-bibtex-file}) runs the shell command
 (@code{tex-bibtex-command}) to produce a @samp{.bbl} file for the
 current buffer's file.  Generally, you need to do @kbd{C-c C-f}
 (@code{tex-file}) once to generate the @samp{.aux} file, then do
-@kbd{C-c TAB} (@code{tex-bibtex-file}), and then repeat @kbd{C-c C-f}
+@kbd{C-c @key{TAB}} (@code{tex-bibtex-file}), and then repeat @kbd{C-c C-f}
 (@code{tex-file}) twice more to get the cross-references correct.
 
 @findex tex-compile
--- a/man/tramp.texi	Tue Jan 24 02:01:42 2006 +0000
+++ b/man/tramp.texi	Wed Jan 25 07:10:04 2006 +0000
@@ -25,8 +25,8 @@
 @end macro
 
 @copying
-Copyright @copyright{} 1999, 2000, 2001, 2002, 2003, 2004,
-   2005 Free Software Foundation, Inc.
+Copyright @copyright{} 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+Free Software Foundation, Inc.
 
 @quotation
 Permission is granted to copy, distribute and/or modify this document
@@ -111,7 +111,7 @@
 @end ifset
 
 The latest release of @value{tramp} is available for
-@uref{http://ftp.gnu.org/gnu/tramp/, download}, or you may see
+@uref{ftp://ftp.gnu.org/gnu/tramp/, download}, or you may see
 @ref{Obtaining Tramp} for more details, including the CVS server
 details.
 
@@ -378,7 +378,7 @@
 
 @value{tramp} is freely available on the Internet and the latest
 release may be downloaded from
-@uref{http://ftp.gnu.org/gnu/tramp/}. This release includes the full
+@uref{ftp://ftp.gnu.org/gnu/tramp/}. This release includes the full
 documentation and code for @value{tramp}, suitable for installation.
 But GNU Emacs (22 or later) includes @value{tramp} already, and there
 is a @value{tramp} package for XEmacs, as well.  So maybe it is easier
@@ -1946,7 +1946,9 @@
 
 When submitting a bug report, please try to describe in excruciating
 detail the steps required to reproduce the problem, the setup of the
-remote machine and any special conditions that exist.
+remote machine and any special conditions that exist.  You should also
+check that your problem is not described already in @xref{Frequently
+Asked Questions}.
 
 If you can identify a minimal test case that reproduces the problem,
 include that with your bug report. This will make it much easier for the
@@ -1964,7 +1966,7 @@
 @value{tramp} is available under the URL below.
 
 @noindent
-@uref{http://ftp.gnu.org/gnu/tramp/}
+@uref{ftp://ftp.gnu.org/gnu/tramp/}
 
 @noindent
 There is also a Savannah project page.
@@ -1972,6 +1974,7 @@
 @noindent
 @uref{http://savannah.gnu.org/projects/tramp/}
 
+
 @item
 Which systems does it work on?
 
@@ -2003,49 +2006,32 @@
 
 
 @item
-I can't stop @value{ftppackagename} starting with @value{emacsname}
-
-@ifset emacs
-@value{ftppackagename} is loaded from @value{tramp} automatically if you
-require a file by the ftp method.  Unfortunately, there are some Lisp
-packages which make @value{ftppackagename} file name handlers active.
-You can see it applying @kbd{C-h v file-name-handler-alist}:
-
-@example
-file-name-handler-alist's value is
-(("^/[^/:]*\\'" . ange-ftp-completion-hook-function)
- ("^/[^/:]*[^/:.]:" . ange-ftp-hook-function)
- ("^/[^/]*$" . tramp-completion-file-name-handler)
- ("\\`/[^/:]+:" . tramp-file-name-handler)
- ("\\`/:" . file-name-non-special))
-@end example
-
-Please try to find out which package is responsible for loading
-@value{ftppackagename}, and raise a bug report.
-
-A workaround is to require @value{ftppackagename} before @value{tramp} in
-your @file{~/.emacs}, because @value{tramp} cleans up the entries in
-@code{file-name-handler-alist}:
-
-@lisp
-;; @value{ftppackagename} temporarily required
-(require 'ange-ftp)
-;; @value{tramp} cleans up @code{file-name-handler-alist}
-(require 'tramp)
-@end lisp
-@end ifset
-
-@ifset xemacs
-Not all the older versions of @value{tramp} supported @value{emacsname}
-correctly.  The first thing to do is to make sure that you have the
-latest version of @value{tramp} installed.
-
-If you do, please try and find out exactly the conditions required for
-the @value{ftppackagename} handlers to fire.  If you can, putting a
-breakpoint on @code{efs-ftp-path} and sending in the stack trace along
-with your bug report would make it easier for the developers to work out
-what is going wrong.
-@end ifset
+@value{tramp} does not connect to the remote host
+
+When @value{tramp} does not connect to the remote host, there are two
+reasons heading the bug mailing list:
+
+@itemize @minus
+
+@item
+Unknown characters in the prompt
+
+@value{tramp} needs to recognize the prompt on the remote machine
+after execution any command.  This is not possible, when the prompt
+contains unknown characters like escape sequences for coloring.  This
+should be avoided on the remote side.  @xref{Remote shell setup}. for
+setting the regular expression detecting the prompt.
+
+@item
+@value{tramp} doesn't transfer strings with more than 500 characters
+correctly
+
+On some few systems, the implementation of @code{process-send-string}
+seems to be broken for longer strings.  This case, you should
+customize the variable @code{tramp-chunksize} to 500.  For a
+description how to determine whether this is necessary see the
+documentation of @code{tramp-chunksize}.
+@end itemize
 
 
 @item
@@ -2132,14 +2118,24 @@
 
 
 @item
-@value{tramp} doesn't transfer strings with more than 500 characters
-correctly
-
-On some few systems, the implementation of @code{process-send-string}
-seems to be broken for longer strings.  This case, you should
-customize the variable @code{tramp-chunksize} to 500.  For a
-description how to determine whether this is necessary see the
-documentation of @code{tramp-chunksize}.
+How can I disable @value{tramp}?
+
+Shame on you, why did you read until now?
+
+@ifset emacs
+If you just want to have @value{ftppackagename} as default remote
+files access package, you should apply the following code:
+
+@lisp
+(setq tramp-default-method "ftp")
+@end lisp
+@end ifset
+
+Unloading @value{tramp} can be achieved by applying @kbd{M-x
+tramp-unload-tramp}.
+@ifset emacs
+This resets also the @value{ftppackagename} plugins.
+@end ifset
 @end itemize
 
 
--- a/man/trampver.texi	Tue Jan 24 02:01:42 2006 +0000
+++ b/man/trampver.texi	Wed Jan 25 07:10:04 2006 +0000
@@ -4,7 +4,7 @@
 @c In the Tramp CVS, the version number is auto-frobbed from
 @c configure.ac, so you should edit that file and run
 @c "autoconf && ./configure" to change the version number.
-@set trampver 2.0.51
+@set trampver 2.0.52
 
 @c Other flags from configuration
 @set prefix /usr/local
--- a/man/vip.texi	Tue Jan 24 02:01:42 2006 +0000
+++ b/man/vip.texi	Wed Jan 25 07:10:04 2006 +0000
@@ -1568,7 +1568,7 @@
 @kindex 000 @kbd{C-@@} (@code{set-mark-command})
 Set mark and push previous mark on mark ring (@code{set-mark-command}).
 @item TAB
-@kindex 011 @kbd{TAB} (@code{indent-for-tab-command})
+@kindex 011 TAB (@code{indent-for-tab-command})
 Indent line for current major mode (@code{indent-for-tab-command}).
 @item C-j
 @kindex 012 @kbd{C-j} (@code{newline-and-indent})
--- a/man/widget.texi	Tue Jan 24 02:01:42 2006 +0000
+++ b/man/widget.texi	Wed Jan 25 07:10:04 2006 +0000
@@ -140,7 +140,7 @@
 widget library will also use the new graphic features automatically.
 @end enumerate
 
-In order to minimize the code that is loaded by users who does not
+In order to minimize the code that is loaded by users who do not
 create any widgets, the code has been split in two files:
 
 @cindex widget library, files
@@ -315,7 +315,8 @@
 @deffn Command widget-forward &optional count
 Move point @var{count} buttons or editing fields forward.
 @end deffn
-@item @key{M-TAB}
+@item @kbd{M-@key{TAB}}
+@itemx @kbd{S-@key{TAB}}
 @deffn Command widget-backward &optional count
 Move point @var{count} buttons or editing fields backward.
 @end deffn
--- a/src/.gdbinit	Tue Jan 24 02:01:42 2006 +0000
+++ b/src/.gdbinit	Wed Jan 25 07:10:04 2006 +0000
@@ -789,18 +789,21 @@
 
 # People get bothered when they see messages about non-existent functions...
 xgetptr Vsystem_type
-set $tem = (struct Lisp_Symbol *) $ptr
-xgetptr $tem->xname
-set $tem = (struct Lisp_String *) $ptr
-set $tem = (char *) $tem->data
+# $ptr is NULL in temacs
+if ($ptr != 0)
+  set $tem = (struct Lisp_Symbol *) $ptr
+  xgetptr $tem->xname
+  set $tem = (struct Lisp_String *) $ptr
+  set $tem = (char *) $tem->data
 
-# Don't let abort actually run, as it will make stdio stop working and
-# therefore the `pr' command above as well.
-if $tem[0] == 'w' && $tem[1] == 'i' && $tem[2] == 'n' && $tem[3] == 'd'
-  # The windows-nt build replaces abort with its own function.
-  break w32_abort
-else
-  break abort
+  # Don't let abort actually run, as it will make stdio stop working and
+  # therefore the `pr' command above as well.
+  if $tem[0] == 'w' && $tem[1] == 'i' && $tem[2] == 'n' && $tem[3] == 'd'
+    # The windows-nt build replaces abort with its own function.
+    break w32_abort
+  else
+    break abort
+  end
 end
 
 # x_error_quitter is defined only on X.  But window-system is set up
--- a/src/ChangeLog	Tue Jan 24 02:01:42 2006 +0000
+++ b/src/ChangeLog	Wed Jan 25 07:10:04 2006 +0000
@@ -1,3 +1,91 @@
+2006-01-24  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* regex.c (IMMEDIATE_QUIT_CHECK): Use it with SYNC_INPUT as well.
+	(re_match_2_internal) <on_failure_jump, on_failure_jump_smart>:
+	Don't check for quit, since any loop will go through fail or jump.
+
+2006-01-24  Chong Yidong  <cyd@stupidchicken.com>
+
+	* alloc.c (allocate_string_data): Update next_free immediately, to
+	reduce risk of memory clobberage.
+
+2006-01-24  L$,1 q(Brentey K,Aa(Broly  <lorentey@elte.hu>
+
+	* xdisp.c (handle_invisible_prop): Set it->position to fix cursor
+	display when point moves across an ellipsis.  If there are
+	adjacent invisible texts, don't lose the second one's ellipsis.
+	(x_produce_glyphs): Doc fix.
+
+2006-01-23  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* xterm.c (x_catch_errors_unwind): Yet another int/Lisp_Object mixup.
+
+2006-01-23  Kim F. Storm  <storm@cua.dk>
+
+	* xdisp.c (handle_single_display_spec): Fix handling of space
+	property on char from string: set *position rather than
+	it->current.pos.
+	(produce_stretch_glyph): Reduce width of stretch glyphs so they
+	don't get wider than the window (unless truncate-lines is on).
+
+2006-01-22  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* xterm.c: Avoid allocating Lisp data from a signal handler.
+	(x_error_message): New var to replace x_error_message_string.
+	(x_error_catcher, x_catch_errors, x_catch_errors_unwind)
+	(x_check_errors, x_had_errors_p, x_clear_errors, x_error_handler)
+	(syms_of_xterm): Use it instead of x_error_message_string.
+
+	* alloc.c (lisp_align_free): Add an assertion.
+	(make_interval, allocate_string, make_float, Fcons, Fmake_symbol)
+	(allocate_misc): If ENABLE_CHECKING is on, check we're not called from
+	a signal handler.
+
+2006-01-21  Luc Teirlinck  <teirllm@auburn.edu>
+
+	* dired.c (syms_of_dired) <completion-ignored-extensions>: Doc fix.
+
+2006-01-21  Romain Francoise  <romain@orebokech.com>
+
+	* xdisp.c (get_window_cursor_type): Fix last change.
+	Update copyright year.
+
+2006-01-20  Eli Zaretskii  <eliz@gnu.org>
+
+	* lread.c (Fload): Don't leak the file descriptor returned by
+	openp if we are going to signal an error.
+
+	* w32.c (sys_close): If FD is outside [0..MAXDESC) limits, pass it
+	directly to _close.
+	(sys_dup): Protect against new_fd larger than fd_info[] can handle.
+	(sys_read): If FD is outside [0..MAXDESC) limits, pass it directly
+	to _read.
+	(sys_write): If FD is outside [0..MAXDESC) limits, pass it
+	directly to _write.
+
+	* .gdbinit: Don't dereference Vsystem_type's Lisp_Symbol pointer
+	if it is NULL.
+
+2006-01-20  Kenichi Handa  <handa@m17n.org>
+
+	* puresize.h (BASE_PURESIZE): Increment to 1190000.
+
+2006-01-19  Chong Yidong  <cyd@stupidchicken.com>
+
+	* xdisp.c (get_window_cursor_type): Use cursor type specified by
+	the selected buffer for the echo area too.
+
+2006-01-19  Richard M. Stallman  <rms@gnu.org>
+
+	* keymap.c (Fmap_keymap): Doc fix.
+
+	* s/irix6-5.h (GC_SETJMP_WORKS, GC_MARK_STACK): New definitions.
+
+	* keyboard.c (echo_char): Don't omit the space between first two
+	echoed chars.
+
+	* minibuf.c (read_minibuf): Fix previous change.
+
 2006-01-19  Kenichi Handa  <handa@m17n.org>
 
 	* xterm.c (handle_one_xevent): Handle keysyms 0x1000000..0x10000FF.
@@ -571,7 +659,7 @@
 	* w32fns.c (w32_abort) [__GNUC__]: Add instructions for attaching
 	GDB to the abort dialog.
 
-2005-12-09  Kyotaro HORIGUCHI <horiguti@meadowy.org>  (tiny change)
+2005-12-09  Kyotaro HORIGUCHI  <horiguti@meadowy.org>  (tiny change)
 
 	* indent.c (Fvertical_motion): Force move if starting on
 	stretch glyph.
@@ -825,7 +913,7 @@
 
 	* s/darwin.h (LIBS_CARBON) [!HAVE_CARBON]: Remove `-framework Carbon'.
 
-2005-11-11  David Reitter <david.reitter@gmail.com>
+2005-11-11  David Reitter  <david.reitter@gmail.com>
 
 	* macterm.c (syms_of_macterm): Remove macCtrlKey, macShiftKey,
 	macMetaKey, macAltKey. Introduce Qctrl, Qmeta,
@@ -857,7 +945,7 @@
 	ignore_overlay_strings_at_pos_p if dpvec came from an overlay
 	string, so we skip those overlay strings at current pos.
 
-2005-11-10  Lars Hansen <larsh@soem.dk>
+2005-11-10  Lars Hansen  <larsh@soem.dk>
 
 	* fileio.c (file-regular-p): Doc fix.
 
@@ -968,7 +1056,7 @@
 
 	* xdisp.c (display_line): Restore it->current_x and call
 	extend_face_to_end_of_line when last glyph doesn't fit on line.
-	(set_glyph_string_background_width): Remove specific tests  here
+	(set_glyph_string_background_width): Remove specific tests here
 	to see if face background should extend to end of line.  Simplify.
 
 2005-10-30  Richard M. Stallman  <rms@gnu.org>
@@ -1570,7 +1658,7 @@
 
 	* dispextern.h (fatal): Delete prototype.
 
-	* systime.h: (make_time): Prototype moved from ...
+	* systime.h (make_time): Prototype moved from ...
 	* editfns.c (make_time): ... here.
 
 	* editfns.c: Move systime.h include after lisp.h.
@@ -1804,9 +1892,9 @@
 	get_current_dir_name.
 	(get_current_dir_name): Remove prototype.
 
-	* xsmfns.c: (get_current_dir_name): Remove prototype.
-
-	* lisp.h: (get_current_dir_name) [!HAVE_GET_CURRENT_DIR_NAME]:
+	* xsmfns.c (get_current_dir_name): Remove prototype.
+
+	* lisp.h (get_current_dir_name) [!HAVE_GET_CURRENT_DIR_NAME]:
 	Add prototype.
 
 	* sysdep.c [WINDOWSNT]: Add prototype for getwd.
@@ -2497,7 +2585,7 @@
 
 	* window.c (window_scroll_pixel_based, window_scroll_line_based):
 	Handle `scroll-preserve-screen-position' non-nil, non-t specially.
-	(syms_of_window): <scroll-preserve-screen-position>: Doc fix.
+	(syms_of_window) <scroll-preserve-screen-position>: Doc fix.
 
 2005-07-02  Juri Linkov  <juri@jurta.org>
 
@@ -7120,7 +7208,7 @@
 
 	* config.in: Rebuild.
 
-	* Makefile.in: Run setarch i386 ./temacs if exec-shield  is present.
+	* Makefile.in: Run setarch i386 ./temacs if exec-shield is present.
 
 2004-09-18  Stefan Monnier  <monnier@iro.umontreal.ca>
 
@@ -7700,7 +7788,7 @@
 
 	* buffer.c (Fswitch_to_buffer, Fpop_to_buffer): Doc fixes.
 
-	* window.c (Fwindow_buffer, Fother_window,  Fget_lru_window)
+	* window.c (Fwindow_buffer, Fother_window, Fget_lru_window)
 	(Fget_largest_window, Fget_buffer_window, Fdelete_windows_on)
 	(Freplace_buffer_in_windows, Fset_window_buffer)
 	(Fselect-window, Fdisplay-buffer, Fsplit_window): Doc fixes.
@@ -9353,7 +9441,7 @@
 	(parse_image_spec, image_spec_value, Fimage_size, Fimage_mask_p)
 	(make_image, free_image, prepare_image_for_display, image_ascent)
 	(four_corners_best, image_background, image_background_transparent)
-	(x_clear_image_1,  x_clear_image, x_alloc_image_color)
+	(x_clear_image_1, x_clear_image, x_alloc_image_color)
 	(make_image_cache, free_image_cache, clear_image_cache)
 	(Fclear_image_cache, postprocess_image, lookup_image, cache_image)
 	(forall_images_in_image_cache, x_create_x_image_and_pixmap)
@@ -9391,7 +9479,7 @@
 	(parse_image_spec, image_spec_value, Fimage_size, Fimage_mask_p)
 	(make_image, free_image, prepare_image_for_display, image_ascent)
 	(four_corners_best, image_background, image_background_transparent)
-	(x_clear_image_1,  x_clear_image, x_alloc_image_color)
+	(x_clear_image_1, x_clear_image, x_alloc_image_color)
 	(make_image_cache, free_image_cache, clear_image_cache)
 	(Fclear_image_cache, postprocess_image, lookup_image, cache_image)
 	(forall_images_in_image_cache, x_create_x_image_and_pixmap)
@@ -9423,7 +9511,7 @@
 	(parse_image_spec, image_spec_value, Fimage_size, Fimage_mask_p)
 	(make_image, free_image, prepare_image_for_display, image_ascent)
 	(four_corners_best, image_background, image_background_transparent)
-	(x_clear_image_1,  x_clear_image, x_alloc_image_color)
+	(x_clear_image_1, x_clear_image, x_alloc_image_color)
 	(make_image_cache, free_image_cache, clear_image_cache)
 	(Fclear_image_cache, postprocess_image, lookup_image, cache_image)
 	(forall_images_in_image_cache, x_create_x_image_and_pixmap)
@@ -9453,7 +9541,7 @@
 	(parse_image_spec, image_spec_value, Fimage_size, Fimage_mask_p)
 	(make_image, free_image, prepare_image_for_display, image_ascent)
 	(four_corners_best, image_background, image_background_transparent)
-	(x_clear_image_1,  x_clear_image, x_alloc_image_color)
+	(x_clear_image_1, x_clear_image, x_alloc_image_color)
 	(make_image_cache, free_image_cache, clear_image_cache)
 	(Fclear_image_cache, postprocess_image, lookup_image, cache_image)
 	(forall_images_in_image_cache, x_create_x_image_and_pixmap)
@@ -10228,7 +10316,7 @@
 	(Fx_change_window_property): Add declaration of parameters type and
 	format.  Remove unused variable cons.
 
-	* xselect.c: Include stdio,h.
+	* xselect.c: Include stdio.h.
 
 2004-02-05  Kenichi Handa  <handa@m17n.org>
 
@@ -11861,7 +11949,7 @@
 
 2003-07-13  Terje Rosten  <terjeros@phys.ntnu.no>
 
-	* xterm.c (x_bitmap_icon,x_wm_set_icon_pixmap): Modify to add mask,
+	* xterm.c (x_bitmap_icon, x_wm_set_icon_pixmap): Modify to add mask,
 	and use the Gtk+ function gtk_window_icon_from_file if available.
 
 	* xfns.c (x_bitmap_mask, x_create_bitmap_mask): New functions to
@@ -16440,7 +16528,7 @@
 2002-09-08  Kim F. Storm  <storm@cua.dk>
 
 	* macros.c (executing_macro_index): Change type to EMACS_INT.
-	(syms_of_macros): DEFVAR_INT it  (needed by kmacro).
+	(syms_of_macros): DEFVAR_INT it (needed by kmacro).
 
 	* macros.h (executing_macro_index): Change type to EMACS_INT.
 
@@ -18928,10 +19016,10 @@
 	Intern and staticpro QCtype and Qdatagram.
 	(syms_of_process) [!subprocess]: Intern and staticpro QCtype.
 
-	* xfns.c: (QCtype): Remove duplicate declaration and
+	* xfns.c (QCtype): Remove duplicate declaration and
 	initialization (is now declared in process.c).
 
-	* w32fns.c: (QCtype): Remove duplicate declaration and
+	* w32fns.c (QCtype): Remove duplicate declaration and
 	initialization (is now declared in process.c).
 
 2002-03-21  Richard M. Stallman  <rms@gnu.org>
@@ -19046,7 +19134,7 @@
 	Doc fix: Member kill_without_query is inverse of query-on-exit flag.
 
 	* process.c (Qlocal, QCname, QCbuffer, QChost, QCservice, QCfamily)
-	(QClocal, QCremote, QCserver, QCdatagram, QCnowait, QCnoquery,QCstop)
+	(QClocal, QCremote, QCserver, QCdatagram, QCnowait, QCnoquery, QCstop)
 	(QCcoding, QCoptions, QCfilter, QCsentinel, QClog, QCfeature):
 	New variables.
 	(NETCONN1_P): New macro.
@@ -19376,7 +19464,7 @@
 
 2002-02-28  Kim F. Storm  <storm@cua.dk>
 
-	* window.c: (minibuf_selected_window): Renamed from
+	* window.c (minibuf_selected_window): Renamed from
 	Vminibuf_selected_window.  Users changed.
 	(syms_of_window): Staticpro it.
 
@@ -19386,14 +19474,14 @@
 	which is similar to Vminibuf_scroll_window, but which is only set
 	on entry to the minibuffer (from a non-minibuffer window):
 
-	* window.c: (Vminibuf_selected_window): New variable.
+	* window.c (Vminibuf_selected_window): New variable.
 	(struct save_window_data): New member minibuf_selected_window.
 	(Fset_window_configuration): Restore Vminibuf_selected_window.
 	(Fcurrent_window_configuration): Save Vminibuf_selected_window.
 	Set minibuf_scroll_window member to nil if minibuf_level is 0.
 	(compare_window_configurations): Compare minibuf_selected_window.
 
-	* window.h: (Vminibuf_selected_window): Declare extern.
+	* window.h (Vminibuf_selected_window): Declare extern.
 
 	* minibuf.c (read_minibuf): Set Vminibuf_selected_window on first
 	entry to minibuffer or on entry from a non-minibuffer window.
@@ -19519,7 +19607,7 @@
 
 2002-02-22  Eli Zaretskii  <eliz@is.elta.co.il>
 
-	Support for ICCCM  Extended Segments in X selections:
+	Support for ICCCM Extended Segments in X selections:
 
 	* xselect.c <Qcompound_text_no_extensions>: New variable.
 	(syms_of_xselect): Intern and staticpro it.
@@ -19673,7 +19761,7 @@
 
 2002-02-13  Kim F. Storm  <storm@cua.dk>
 
-	* window.c: (Vmode_line_in_non_selected_windows): Removed.
+	* window.c (Vmode_line_in_non_selected_windows): Removed.
 	(mode_line_in_non_selected_windows): New variable.
 	(syms_of_window): DEFVAR_BOOL it.
 
@@ -19704,7 +19792,7 @@
 
 2002-02-11  Kim F. Storm  <storm@cua.dk>
 
-	* window.c: (Vmode_line_in_non_selected_windows): New variable.
+	* window.c (Vmode_line_in_non_selected_windows): New variable.
 	(syms_of_window): DEFVAR_LISP it.
 
 	* dispextern.h (CURRENT_MODE_LINE_FACE_ID_3): New macro.
--- a/src/alloc.c	Tue Jan 24 02:01:42 2006 +0000
+++ b/src/alloc.c	Wed Jan 25 07:10:04 2006 +0000
@@ -1,6 +1,6 @@
 /* Storage allocation and gc for GNU Emacs Lisp interpreter.
    Copyright (C) 1985, 1986, 1988, 1993, 1994, 1995, 1997, 1998, 1999,
-      2000, 2001, 2002, 2003, 2004, 2005  Free Software Foundation, Inc.
+      2000, 2001, 2002, 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
@@ -1105,6 +1105,9 @@
 	}
       eassert ((aligned & 1) == aligned);
       eassert (i == (aligned ? ABLOCKS_SIZE : ABLOCKS_SIZE - 1));
+#ifdef HAVE_POSIX_MEMALIGN
+      eassert ((unsigned long)ABLOCKS_BASE (abase) % BLOCK_ALIGN == 0);
+#endif
       free (ABLOCKS_BASE (abase));
     }
   UNBLOCK_INPUT;
@@ -1419,6 +1422,8 @@
 {
   INTERVAL val;
 
+  eassert (!handling_signal);
+
   if (interval_free_list)
     {
       val = interval_free_list;
@@ -1837,6 +1842,8 @@
 {
   struct Lisp_String *s;
 
+  eassert (!handling_signal);
+
   /* If the free-list is empty, allocate a new string_block, and
      add all the Lisp_Strings in it to the free-list.  */
   if (string_free_list == NULL)
@@ -1971,6 +1978,8 @@
   old_nbytes = GC_STRING_BYTES (s);
 
   data = b->next_free;
+  b->next_free = (struct sdata *) ((char *) data + needed + GC_STRING_EXTRA);
+
   data->string = s;
   s->data = SDATA_DATA (data);
 #ifdef GC_CHECK_STRING_BYTES
@@ -1983,7 +1992,6 @@
   bcopy (string_overrun_cookie, (char *) data + needed,
 	 GC_STRING_OVERRUN_COOKIE_SIZE);
 #endif
-  b->next_free = (struct sdata *) ((char *) data + needed + GC_STRING_EXTRA);
 
   /* If S had already data assigned, mark that as free by setting its
      string back-pointer to null, and recording the size of the data
@@ -2552,6 +2560,8 @@
 {
   register Lisp_Object val;
 
+  eassert (!handling_signal);
+
   if (float_free_list)
     {
       /* We use the data field for chaining the free list
@@ -2671,6 +2681,8 @@
 {
   register Lisp_Object val;
 
+  eassert (!handling_signal);
+
   if (cons_free_list)
     {
       /* We use the cdr for chaining the free list
@@ -2852,6 +2864,9 @@
   UNBLOCK_INPUT;
 #endif
 
+  /* This gets triggered by code which I haven't bothered to fix.  --Stef  */
+  /* eassert (!handling_signal); */
+
   nbytes = sizeof *p + (len - 1) * sizeof p->contents[0];
   p = (struct Lisp_Vector *) lisp_malloc (nbytes, type);
 
@@ -3102,6 +3117,8 @@
 
   CHECK_STRING (name);
 
+  eassert (!handling_signal);
+
   if (symbol_free_list)
     {
       XSETSYMBOL (val, symbol_free_list);
@@ -3182,6 +3199,8 @@
 {
   Lisp_Object val;
 
+  eassert (!handling_signal);
+
   if (marker_free_list)
     {
       XSETMISC (val, marker_free_list);
--- a/src/dired.c	Tue Jan 24 02:01:42 2006 +0000
+++ b/src/dired.c	Wed Jan 25 07:10:04 2006 +0000
@@ -1037,11 +1037,11 @@
 #endif /* VMS */
 
   DEFVAR_LISP ("completion-ignored-extensions", &Vcompletion_ignored_extensions,
-	       doc: /* *Completion ignores filenames ending in any string in this list.
-Directories are ignored if they match any string in this list which
-ends in a slash.
-This variable does not affect lists of possible completions,
-but does affect the commands that actually do completions.  */);
+	       doc: /* Completion ignores file names ending in any string in this list.
+It does not ignore them if all possible completions end in one of
+these strings or when displaying a list of completions.
+It ignores directory names if they match any string in this list which
+ends in a slash.  */);
   Vcompletion_ignored_extensions = Qnil;
 }
 
--- a/src/keyboard.c	Tue Jan 24 02:01:42 2006 +0000
+++ b/src/keyboard.c	Wed Jan 25 07:10:04 2006 +0000
@@ -790,6 +790,8 @@
 	  else
 	    echo_string = concat2 (echo_string, build_string (" "));
 	}
+      else if (STRINGP (echo_string))
+	echo_string = concat2 (echo_string, build_string (" "));
 
       current_kboard->echo_string
 	= concat2 (echo_string, make_string (buffer, ptr - buffer));
@@ -820,16 +822,16 @@
   /* Do nothing if we have already put a dash at the end.  */
   if (SCHARS (current_kboard->echo_string) > 1)
     {
-	  Lisp_Object last_char, prev_char, idx;
-
-	  idx = make_number (SCHARS (current_kboard->echo_string) - 2);
-	  prev_char = Faref (current_kboard->echo_string, idx);
-
-	  idx = make_number (SCHARS (current_kboard->echo_string) - 1);
-	  last_char = Faref (current_kboard->echo_string, idx);
-
-	  if (XINT (last_char) == '-' && XINT (prev_char) != ' ')
-	    return;
+      Lisp_Object last_char, prev_char, idx;
+
+      idx = make_number (SCHARS (current_kboard->echo_string) - 2);
+      prev_char = Faref (current_kboard->echo_string, idx);
+
+      idx = make_number (SCHARS (current_kboard->echo_string) - 1);
+      last_char = Faref (current_kboard->echo_string, idx);
+
+      if (XINT (last_char) == '-' && XINT (prev_char) != ' ')
+	return;
     }
 
   /* Put a dash at the end of the buffer temporarily,
--- a/src/keymap.c	Tue Jan 24 02:01:42 2006 +0000
+++ b/src/keymap.c	Wed Jan 25 07:10:04 2006 +0000
@@ -718,8 +718,10 @@
 }
 
 DEFUN ("map-keymap", Fmap_keymap, Smap_keymap, 2, 3, 0,
-       doc: /* Call FUNCTION for every binding in KEYMAP.
-FUNCTION is called with two arguments: the event and its binding.
+       doc: /* Call FUNCTION once for each binding in KEYMAP.
+FUNCTION is called with two arguments: the event that is bound, and
+the definition it is bound to.
+
 If KEYMAP has a parent, the parent's bindings are included as well.
 This works recursively: if the parent has itself a parent, then the
 grandparent's bindings are also included and so on.
--- a/src/lread.c	Tue Jan 24 02:01:42 2006 +0000
+++ b/src/lread.c	Wed Jan 25 07:10:04 2006 +0000
@@ -982,8 +982,12 @@
       if (!NILP (Fequal (found, XCAR (tem))))
 	count++;
     if (count > 3)
-      Fsignal (Qerror, Fcons (build_string ("Recursive load"),
-			      Fcons (found, Vloads_in_progress)));
+      {
+	if (fd >= 0)
+	  emacs_close (fd);
+	Fsignal (Qerror, Fcons (build_string ("Recursive load"),
+				Fcons (found, Vloads_in_progress)));
+      }
     record_unwind_protect (record_load_unwind, Vloads_in_progress);
     Vloads_in_progress = Fcons (found, Vloads_in_progress);
   }
--- a/src/minibuf.c	Tue Jan 24 02:01:42 2006 +0000
+++ b/src/minibuf.c	Wed Jan 25 07:10:04 2006 +0000
@@ -653,7 +653,8 @@
       Lisp_Object root_window = Fframe_root_window (frame);
       Lisp_Object mini_window = XWINDOW (root_window)->next;
 
-      if (! NILP (mini_window) && !NILP (Fwindow_minibuffer_p (mini_window)))
+      if (! NILP (mini_window) && ! EQ (mini_window, minibuf_window)
+	  && !NILP (Fwindow_minibuffer_p (mini_window)))
 	Fset_window_buffer (mini_window, empty_minibuf, Qnil);
     }
 
--- a/src/puresize.h	Tue Jan 24 02:01:42 2006 +0000
+++ b/src/puresize.h	Wed Jan 25 07:10:04 2006 +0000
@@ -42,7 +42,7 @@
 #endif
 
 #ifndef BASE_PURESIZE
-#define BASE_PURESIZE (1180000 + SYSTEM_PURESIZE_EXTRA + SITELOAD_PURESIZE_EXTRA)
+#define BASE_PURESIZE (1190000 + SYSTEM_PURESIZE_EXTRA + SITELOAD_PURESIZE_EXTRA)
 #endif
 
 /* Increase BASE_PURESIZE by a ratio depending on the machine's word size.  */
--- a/src/regex.c	Tue Jan 24 02:01:42 2006 +0000
+++ b/src/regex.c	Wed Jan 25 07:10:04 2006 +0000
@@ -3,7 +3,7 @@
    internationalization features.)
 
    Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-                 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+                 2002, 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
 
    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
@@ -1899,8 +1899,9 @@
 /* The next available element.  */
 #define COMPILE_STACK_TOP (compile_stack.stack[compile_stack.avail])
 
-/* Explicit quit checking is only used on NTemacs.  */
-#if defined WINDOWSNT && defined emacs && defined QUIT
+/* Explicit quit checking is only used on NTemacs and whenever we
+   use polling to process input events.  */
+#if defined emacs && (defined WINDOWSNT || defined SYNC_INPUT) && defined QUIT
 extern int immediate_quit;
 # define IMMEDIATE_QUIT_CHECK			\
     do {					\
@@ -5770,7 +5771,6 @@
 	   the repetition text and either the following jump or
 	   pop_failure_jump back to this on_failure_jump.  */
 	case on_failure_jump:
-	  IMMEDIATE_QUIT_CHECK;
 	  EXTRACT_NUMBER_AND_INCR (mcnt, p);
 	  DEBUG_PRINT3 ("EXECUTING on_failure_jump %d (to %p):\n",
 			mcnt, p + mcnt);
@@ -5786,7 +5786,6 @@
 	   then we can use a non-backtracking loop based on
 	   on_failure_keep_string_jump instead of on_failure_jump.  */
 	case on_failure_jump_smart:
-	  IMMEDIATE_QUIT_CHECK;
 	  EXTRACT_NUMBER_AND_INCR (mcnt, p);
 	  DEBUG_PRINT3 ("EXECUTING on_failure_jump_smart %d (to %p).\n",
 			mcnt, p + mcnt);
--- a/src/s/irix6-5.h	Tue Jan 24 02:01:42 2006 +0000
+++ b/src/s/irix6-5.h	Wed Jan 25 07:10:04 2006 +0000
@@ -33,5 +33,9 @@
 
 #undef TIOCSIGSEND		/* defined in usg5-4.h */
 
+/* Tested on Irix 6.5.  SCM worked on earlier versions.  */
+#define GC_SETJMP_WORKS 1
+#define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS
+
 /* arch-tag: d7ad9ec2-54ad-4b2f-adf2-0070c5c63e83
    (do not change this comment) */
--- a/src/w32.c	Tue Jan 24 02:01:42 2006 +0000
+++ b/src/w32.c	Wed Jan 25 07:10:04 2006 +0000
@@ -3426,13 +3426,13 @@
 {
   int rc;
 
-  if (fd < 0 || fd >= MAXDESC)
+  if (fd < 0)
     {
       errno = EBADF;
       return -1;
     }
 
-  if (fd_info[fd].cp)
+  if (fd < MAXDESC && fd_info[fd].cp)
     {
       child_process * cp = fd_info[fd].cp;
 
@@ -3474,7 +3474,7 @@
      because socket handles are fully fledged kernel handles. */
   rc = _close (fd);
 
-  if (rc == 0)
+  if (rc == 0 && fd < MAXDESC)
     fd_info[fd].flags = 0;
 
   return rc;
@@ -3486,7 +3486,7 @@
   int new_fd;
 
   new_fd = _dup (fd);
-  if (new_fd >= 0)
+  if (new_fd >= 0 && new_fd < MAXDESC)
     {
       /* duplicate our internal info as well */
       fd_info[new_fd] = fd_info[fd];
@@ -3641,13 +3641,13 @@
   DWORD waiting;
   char * orig_buffer = buffer;
 
-  if (fd < 0 || fd >= MAXDESC)
+  if (fd < 0)
     {
       errno = EBADF;
       return -1;
     }
 
-  if (fd_info[fd].flags & (FILE_PIPE | FILE_SOCKET))
+  if (fd < MAXDESC && fd_info[fd].flags & (FILE_PIPE | FILE_SOCKET))
     {
       child_process *cp = fd_info[fd].cp;
 
@@ -3785,13 +3785,13 @@
 {
   int nchars;
 
-  if (fd < 0 || fd >= MAXDESC)
+  if (fd < 0)
     {
       errno = EBADF;
       return -1;
     }
 
-  if (fd_info[fd].flags & (FILE_PIPE | FILE_SOCKET))
+  if (fd < MAXDESC && fd_info[fd].flags & (FILE_PIPE | FILE_SOCKET))
     {
       if ((fd_info[fd].flags & FILE_WRITE) == 0)
 	{
@@ -3833,7 +3833,7 @@
     }
 
 #ifdef HAVE_SOCKETS
-  if (fd_info[fd].flags & FILE_SOCKET)
+  if (fd < MAXDESC && fd_info[fd].flags & FILE_SOCKET)
     {
       unsigned long nblock = 0;
       if (winsock_lib == NULL) abort ();
--- a/src/xdisp.c	Tue Jan 24 02:01:42 2006 +0000
+++ b/src/xdisp.c	Wed Jan 25 07:10:04 2006 +0000
@@ -1,7 +1,7 @@
 /* Display generation from window structure and buffer text.
    Copyright (C) 1985, 1986, 1987, 1988, 1993, 1994, 1995,
                  1997, 1998, 1999, 2000, 2001, 2002, 2003,
-                 2004, 2005 Free Software Foundation, Inc.
+                 2004, 2005, 2006 Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
@@ -3617,6 +3617,11 @@
 		 skip starting with next_stop.  */
 	      if (invis_p)
 		IT_CHARPOS (*it) = next_stop;
+
+              /* If there are adjacent invisible texts, don't lose the
+                 second one's ellipsis. */
+              if (invis_p == 2)
+                display_ellipsis_p = 1;
 	    }
 	  while (invis_p);
 
@@ -3637,7 +3642,23 @@
 	      it->stack[it->sp - 1].display_ellipsis_p = display_ellipsis_p;
 	    }
 	  else if (display_ellipsis_p)
-	    setup_for_ellipsis (it, 0);
+            {
+              /* Make sure that the glyphs of the ellipsis will get
+                 correct `charpos' values.  If we would not update
+                 it->position here, the glyphs would belong to the
+                 last visible character _before_ the invisible
+                 text, which confuses `set_cursor_from_row'.
+
+                 We use the last invisible position instead of the
+                 first because this way the cursor is always drawn on
+                 the first "." of the ellipsis, whenever PT is inside
+                 the invisible text.  Otherwise the cursor would be
+                 placed _after_ the ellipsis when the point is after the
+                 first invisible character.  */
+              it->position.charpos = IT_CHARPOS (*it) - 1;
+              it->position.bytepos = CHAR_TO_BYTE (it->position.charpos);
+              setup_for_ellipsis (it, 0);
+            }
 	}
     }
 
@@ -4151,7 +4172,7 @@
 	{
 	  it->method = GET_FROM_STRETCH;
 	  it->object = value;
-	  it->current.pos = it->position = start_pos;
+	  *position = it->position = start_pos;
 	}
 #ifdef HAVE_WINDOW_SYSTEM
       else
@@ -19772,6 +19793,10 @@
   else
     ascent = (height * FONT_BASE (font)) / FONT_HEIGHT (font);
 
+  if (width > 0 && !it->truncate_lines_p
+      && it->current_x + width > it->last_visible_x)
+    width = it->last_visible_x - it->current_x - 1;
+
   if (width > 0 && height > 0 && it->glyph_row)
     {
       Lisp_Object object = it->stack[it->sp - 1].string;
@@ -19912,8 +19937,8 @@
 
 /* RIF:
    Produce glyphs/get display metrics for the display element IT is
-   loaded with.  See the description of struct display_iterator in
-   dispextern.h for an overview of struct display_iterator.  */
+   loaded with.  See the description of struct it in dispextern.h
+   for an overview of struct it.  */
 
 void
 x_produce_glyphs (it)
@@ -20913,8 +20938,13 @@
     {
       if (w == XWINDOW (echo_area_window))
 	{
-	  *width = FRAME_CURSOR_WIDTH (f);
-	  return FRAME_DESIRED_CURSOR (f);
+	  if (EQ (b->cursor_type, Qt) || NILP (b->cursor_type))
+	    {
+	      *width = FRAME_CURSOR_WIDTH (f);
+	      return FRAME_DESIRED_CURSOR (f);
+	    }
+	  else
+	    return get_specified_cursor_type (b->cursor_type, width);
 	}
 
       *active_cursor = 0;
--- a/src/xterm.c	Tue Jan 24 02:01:42 2006 +0000
+++ b/src/xterm.c	Wed Jan 25 07:10:04 2006 +0000
@@ -1,6 +1,6 @@
 /* X Communication module for terminals which understand the X protocol.
    Copyright (C) 1989, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-                 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+                 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
@@ -7438,7 +7438,12 @@
 /* If non-nil, this should be a string.
    It means catch X errors  and store the error message in this string.  */
 
-static Lisp_Object x_error_message_string;
+struct x_error_message_stack {
+  char string[X_ERROR_MESSAGE_SIZE];
+  Display *dpy;
+  struct x_error_message_stack *prev;
+};
+static struct x_error_message_stack *x_error_message;
 
 /* An X error handler which stores the error message in
    x_error_message_string.  This is called from x_error_handler if
@@ -7450,7 +7455,7 @@
      XErrorEvent *error;
 {
   XGetErrorText (display, error->error_code,
-		 SDATA (x_error_message_string),
+		 x_error_message->string,
 		 X_ERROR_MESSAGE_SIZE);
 }
 
@@ -7475,16 +7480,23 @@
      Display *dpy;
 {
   int count = SPECPDL_INDEX ();
+  struct x_error_message_stack *data = malloc (sizeof (*data));
+  Lisp_Object dummy;
+#ifdef ENABLE_CHECKING
+  dummy = make_number ((EMACS_INT)dpy + (EMACS_INT)x_error_message);
+#else
+  dummy = Qnil;
+#endif
 
   /* Make sure any errors from previous requests have been dealt with.  */
   XSync (dpy, False);
 
-  record_unwind_protect (x_catch_errors_unwind,
-			 Fcons (make_save_value (dpy, 0),
-				x_error_message_string));
-
-  x_error_message_string = make_uninit_string (X_ERROR_MESSAGE_SIZE);
-  SSET (x_error_message_string, 0, 0);
+  data->dpy = dpy;
+  data->string[0] = 0;
+  data->prev = x_error_message;
+  x_error_message = data;
+
+  record_unwind_protect (x_catch_errors_unwind, dummy);
 
   return count;
 }
@@ -7492,11 +7504,11 @@
 /* Unbind the binding that we made to check for X errors.  */
 
 static Lisp_Object
-x_catch_errors_unwind (old_val)
-     Lisp_Object old_val;
-{
-  Lisp_Object first = XCAR (old_val);
-  Display *dpy = XSAVE_VALUE (first)->pointer;
+x_catch_errors_unwind (dummy)
+     Lisp_Object dummy;
+{
+  Display *dpy = x_error_message->dpy;
+  struct x_error_message_stack *tmp;
 
   /* The display may have been closed before this function is called.
      Check if it is still open before calling XSync.  */
@@ -7507,7 +7519,13 @@
       UNBLOCK_INPUT;
     }
 
-  x_error_message_string = XCDR (old_val);
+  tmp = x_error_message;
+  x_error_message = x_error_message->prev;
+  free (tmp);
+
+  eassert (EQ (dummy,
+	       make_number ((EMACS_INT)dpy + (EMACS_INT)x_error_message)));
+
   return Qnil;
 }
 
@@ -7523,8 +7541,8 @@
   /* Make sure to catch any errors incurred so far.  */
   XSync (dpy, False);
 
-  if (SREF (x_error_message_string, 0))
-    error (format, SDATA (x_error_message_string));
+  if (x_error_message->string[0])
+    error (format, x_error_message->string);
 }
 
 /* Nonzero if we had any X protocol errors
@@ -7537,7 +7555,7 @@
   /* Make sure to catch any errors incurred so far.  */
   XSync (dpy, False);
 
-  return SREF (x_error_message_string, 0) != 0;
+  return x_error_message->string[0] != 0;
 }
 
 /* Forget about any errors we have had, since we did x_catch_errors on DPY.  */
@@ -7546,7 +7564,7 @@
 x_clear_errors (dpy)
      Display *dpy;
 {
-  SSET (x_error_message_string, 0, 0);
+  x_error_message->string[0] = 0;
 }
 
 /* Stop catching X protocol errors and let them make Emacs die.
@@ -7728,7 +7746,7 @@
      Display *display;
      XErrorEvent *error;
 {
-  if (! NILP (x_error_message_string))
+  if (x_error_message)
     x_error_catcher (display, error);
   else
     x_error_quitter (display, error);
@@ -10970,8 +10988,7 @@
 void
 syms_of_xterm ()
 {
-  staticpro (&x_error_message_string);
-  x_error_message_string = Qnil;
+  x_error_message = NULL;
 
   staticpro (&x_display_name_list);
   x_display_name_list = Qnil;