changeset 90314:d1c5430c5bff

Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-21 Merge from emacs--devo--0 Patches applied: * emacs--devo--0 (patch 97-112) - Update from CVS - Merge from erc--emacs--0 - Update from CVS: src/regex.c (extend_range_table_work_area): Fix typo. - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 37) - Update from CVS
author Miles Bader <miles@gnu.org>
date Wed, 22 Feb 2006 06:54:10 +0000
parents 496f6d9b9d20 (current diff) a25a9e239ddc (diff)
children 7ddbac913d1a
files admin/ChangeLog admin/FOR-RELEASE etc/ChangeLog etc/MH-E-NEWS etc/NEWS etc/TUTORIAL.cn etc/TUTORIAL.translators lisp/ChangeLog lisp/abbrevlist.el lisp/allout.el lisp/buff-menu.el lisp/calendar/appt.el lisp/cus-edit.el lisp/custom.el lisp/ediff-diff.el lisp/ediff-help.el lisp/ediff-hook.el lisp/ediff-init.el lisp/ediff-merg.el lisp/ediff-mult.el lisp/ediff-ptch.el lisp/ediff-util.el lisp/ediff-vers.el lisp/ediff-wind.el lisp/ediff.el lisp/emacs-lisp/unsafep.el lisp/emulation/viper-cmd.el lisp/emulation/viper-init.el lisp/emulation/viper-util.el lisp/emulation/viper.el lisp/ffap.el lisp/files.el lisp/fringe.el lisp/gnus/ChangeLog lisp/gnus/rfc2047.el lisp/help-fns.el lisp/help.el lisp/icomplete.el lisp/info.el lisp/isearch.el lisp/loadup.el lisp/mh-e/ChangeLog lisp/mh-e/mh-alias.el lisp/mh-e/mh-e.el lisp/mh-e/mh-utils.el lisp/net/rcirc.el lisp/progmodes/gdb-ui.el lisp/progmodes/gud.el lisp/progmodes/sh-script.el lisp/sort.el lisp/speedbar.el lisp/textmodes/ispell.el lispref/ChangeLog lispref/commands.texi lispref/display.texi lispref/files.texi lispref/minibuf.texi lispref/windows.texi man/ChangeLog man/building.texi man/ediff.texi man/emacs.texi man/faq.texi man/viper.texi src/ChangeLog src/Makefile.in src/alloc.c src/buffer.c src/buffer.h src/fringe.c src/gtkutil.c src/macmenu.c src/macterm.c src/puresize.h src/regex.c src/vm-limit.c src/window.c src/xdisp.c src/xfns.c src/xmenu.c src/xterm.c
diffstat 90 files changed, 4263 insertions(+), 2800 deletions(-) [+]
line wrap: on
line diff
--- a/admin/ChangeLog	Wed Feb 22 06:52:00 2006 +0000
+++ b/admin/ChangeLog	Wed Feb 22 06:54:10 2006 +0000
@@ -1,3 +1,13 @@
+2006-02-20  Kim F. Storm  <storm@cua.dk>
+
+	* FOR-RELEASE (NEW FEATURES): Completed work on this item:
+	Rework how fringe bitmaps are defined and used.
+	Currently, bitmap usage and bitmap appearence are "mixed-up" in a
+	one-level representation.  It would be cleaner to split the
+	representation into a two-level model where first level maps
+	bitmap usage to a bitmap name, and second level maps bitmap name to
+	a bitmap appearence.
+
 2006-01-27  Chong Yidong  <cyd@stupidchicken.com>
 
 	* FOR-RELEASE: string allocation bugs fixed.
--- a/admin/FOR-RELEASE	Wed Feb 22 06:52:00 2006 +0000
+++ b/admin/FOR-RELEASE	Wed Feb 22 06:54:10 2006 +0000
@@ -33,15 +33,13 @@
 
 * NEW FEATURES
 
-** Rework how fringe bitmaps are defined and used.
-Currently, bitmap usage and bitmap appearence are "mixed-up" in a
-one-level representation.  It would be cleaner to split the
-representation into a two-level model where first level maps
-bitmap usage to a bitmap name, and second level maps bitmap name to
-a bitmap appearence.
-[Assigned to KFS]
+* BUGS
+
+** Reiner Steib's 23 Jan 2006 bug report that tool bar icons don't update.
 
-* BUGS
+** Ralf Angeli's 4 Jul 2005 bug report about scroll-preserve-screen-position.
+
+** Martin Rudalics' 30 Jan 2006 bug report about overlays at end of buffer.
 
 ** TCP server processes do not work on Windows.
 
@@ -50,6 +48,15 @@
 CPU time have been observed on different Window XP configurations.
 Seems to be a problem in sys_select in w32proc.c.
 
+In its current form, it sys_select says the socket is ready, so we
+call server_accept_connection which again calls accept() which returns
+-1 with errno == WSAEWOULDBLOCK (10035) indicating that there is no
+pending connection to accept.
+
+It seems that to fix this, w32 server sockets must use WSAAsyncSelect
++ FD_ACCEPT to request notifications of incoming connections...
+
+
 * DOCUMENTATION
 
 ** Add a node to the Lisp manual describing key sequences from the
--- a/etc/ChangeLog	Wed Feb 22 06:52:00 2006 +0000
+++ b/etc/ChangeLog	Wed Feb 22 06:54:10 2006 +0000
@@ -1,3 +1,17 @@
+2006-02-18  Bill Wohler  <wohler@newt.com>
+
+	Release MH-E version 7.92.
+
+	* NEWS, MH-E-NEWS: Update for MH-E release 7.92.
+
+2006-02-17  Kenichi Handa  <handa@m17n.org>
+
+	* TUTORIAL.translators (TUTORIAL.cn): Update the maintainer.
+
+2006-02-17  Sun Yijiang  <sunyijiang@gmail.com>
+
+	* TUTORIAL.cn: Reworked.
+
 2006-02-14  Chong Yidong  <cyd@stupidchicken.com>
 
 	* NEWS: Changes in handling of file local variables.
--- a/etc/ERC-NEWS	Wed Feb 22 06:52:00 2006 +0000
+++ b/etc/ERC-NEWS	Wed Feb 22 06:54:10 2006 +0000
@@ -1,6 +1,8 @@
 ERC NEWS                                                       -*- outline -*-
 
-* Changes in ERC 5.1.2 (unreleased)
+* Changes in ERC 5.2 (unreleased)
+
+* Changes in ERC 5.1.2
 
 ** Fix compiler errors in erc-autojoin.el and erc-dcc.el.
 
--- a/etc/MH-E-NEWS	Wed Feb 22 06:52:00 2006 +0000
+++ b/etc/MH-E-NEWS	Wed Feb 22 06:54:10 2006 +0000
@@ -6,6 +6,14 @@
 are permitted in any medium without royalty provided the copyright
 notice and this notice are preserved.
 
+* Changes in MH-E 7.92
+
+Version 7.92, the third 8.0 beta release, removes the "sed -i" in the
+Makefile (SF #1432060), tunes the setting of `mh-image-load-path',
+works around systems that do not have face inheritance, fixes several
+issues with searching on XEmacs, and creates the correct MIME type
+when including OpenOffice documents.
+
 * Changes in MH-E 7.91
 
 Version 7.91 is the second 8.0 beta release and fixes several bugs
--- a/etc/NEWS	Wed Feb 22 06:52:00 2006 +0000
+++ b/etc/NEWS	Wed Feb 22 06:54:10 2006 +0000
@@ -1945,24 +1945,32 @@
 
 *** Topic cryptography added, enabling easy gpg topic encryption and
 decryption.  Per-topic basis enables interspersing encrypted-text and
-clear-text within a single file to your hearts content, using symmetric
+clear-text within a single file to your heart's content, using symmetric
 and/or public key modes.  Time-limited key caching, user-provided
 symmetric key hinting and consistency verification, auto-encryption of
 pending topics on save, and more, make it easy to use encryption in
 powerful ways.
 
-*** many substantial fixes and refinements, including:
+*** Default command prefix changed to "\C-c " (control-c space), to avoid
+intruding on user's keybinding space.  Customize the
+`allout-command-prefix' variable to your preference.
+
+*** Allout now uses text overlay's `invisible' property (and others) for
+concealed text, instead of selective-display.  This simplifies the code, in
+particularly avoiding the need for kludges for isearch dynamic-display,
+discretionary handling of edits of concealed text, undo concerns, etc.
+
+*** Many substantial fixes and refinements, including:
 
    - repaired inhibition of inadvertent edits to concealed text
    - repaired retention of topic body hanging indent upon topic depth shifts
-   - prevent "containment discontinuities" where a topic is shifted deeper
-     than the offspring-depth of its container
-   - easy to adopt the distinctive bullet of a topic in a topic created
-     relative to it, or select a new one, or use the common topic bullet
-   - plain bullets, by default, now alternate between only two characters
-     ('.' and ','), yielding less cluttered outlines
-   - many internal fixes
-   - version number incremented to 2.1
+   - refuse to create "containment discontinuities", where a
+     topic is shifted deeper than the offspring-depth of its' container
+   - bulleting variation is simpler and more accommodating, both in the
+     default behavior and in ability to vary when creating new topics
+   - many internal fixes and refinements
+   - many module and function docstring clarifications
+   - version number incremented to 2.2
 
 ** The variable `woman-topic-at-point' was renamed
 to `woman-use-topic-at-point' and behaves differently: if this
@@ -3074,7 +3082,7 @@
 ---
 ** MH-E changes.
 
-Upgraded to MH-E version 7.91. There have been major changes since
+Upgraded to MH-E version 7.92. There have been major changes since
 version 5.0.2; see MH-E-NEWS for details.
 
 ** Calendar changes:
@@ -4671,6 +4679,13 @@
 +++
 ** Customizable fringe bitmaps
 
+*** New buffer-local variables `fringe-indicator-alist' and
+`fringe-cursor-alist' maps between logical (internal) fringe indicator
+and cursor symbols and the actual fringe bitmaps to be displayed.
+This decouples the logical meaning of the fringe indicators from the
+physical appearence, as well as allowing different fringe bitmaps to
+be used in different windows showing different buffers.
+
 *** New function `define-fringe-bitmap' can now be used to create new
 fringe bitmaps, as well as change the built-in fringe bitmaps.
 
--- a/etc/TUTORIAL.cn	Wed Feb 22 06:52:00 2006 +0000
+++ b/etc/TUTORIAL.cn	Wed Feb 22 06:54:10 2006 +0000
@@ -1,150 +1,136 @@
-Emacs ¿ìËÙÖ¸ÄÏ.
+Emacs ¿ìËÙÖ¸ÄÏ£¨²é¿´°æȨÉùÃ÷ÇëÖÁ±¾ÎÄĩ⣩
+
+¡¾×¢Ò⣺λÓÚ¡¾¡¿Ö®¼äµÄÄÚÈÝÊÇÒë×¢£¬±ÈÈç±¾ÐУ¬ÏÂͬ¡£¡¿
 
-Emacs Ö¸Áîͨ³£°üº¬ÓÐ CONTROL ¼ü£¨ÓÐʱºòÒÔ CTRL »ò CTL À´±êʾ£©»òÊÇ 
-META ¼ü£¨ÓÐʱºòÒÔ EDIT »ò ALT À´±êʾ£©¡£ÎªÁ˱ÜÃâÿһ´Î¶¼ÒªÐ´³öÆäÈ«Ãû£¬
-ÎÒÃǽ«»áʹÓÃÏÂÊöµÄËõд£º
+Emacs ¼üÅÌÃüÁîͨ³£°üº¬ CONTROL ¼ü£¨ÓÐʱºòÒÔ CTRL »ò CTL À´±êʾ£©ºÍ
+META ¼ü£¨ÓÐʱºòÓà EDIT »ò ALT À´±êʾ£©¡£ÎªÁ˱ÜÃâÿ´Î¶¼ÒªÐ´³öÈ«Ãû£¬ÎÒÃÇ
+Ô¼¶¨Ê¹ÓÃÏÂÊöËõд£º
 
- C-<chr>  ±íʾµ±¼üÈë×ÖÔª <chr> ʱ °´×¡ CONTROL ¼ü¡£
-          Òò´Ë£¬C-f ¾ÍÊÇ£º°´×¡ CONTROL ¼üÔÙ¼üÈë f ¡£
- M-<chr>  ±íʾµ±¼üÈë×ÖÔª <chr> ʱ °´×¡ META »ò EDIT »ò ALT ¼ü¡£
-          Èç¹ûûÓÐ META ¡¢ EDIT »ò ALT ¼üʱ£¬Ôò¿ÉÒÔÓÃ
-          ¡¸°´Ò»Ï ESC ¼üÈ»ºó·Å¿ª£¬ÔÙ¼üÈë <chr> µÄ²½Ö衹
-          À´×÷ΪÌæ´ú¡£ÎÒÃÇÒÔ <ESC> À´±íʾ ESC ¼ü¡£
+ C-<chr>  ±íʾµ±ÊäÈë×Ö·û <chr> ʱ°´×¡ CONTROL ¼ü¡£
+          Òò´Ë C-f ¾Í±íʾ£º°´×¡ CONTROL ¼üÔÙÊäÈë f¡£
 
-ÖØÒª±¸Íü¼£ºÒªÀ뿪 Emacs ²Ù×÷½×¶Î£¨ session £©£¬¼üÈë C-x C-c £¨Á½¸ö×Ö
-Ôª£©¡£Î»ÔÚ×ó²à±ß½çµÄ¡¸>>¡¹×ÖÔªÊÇÈÃÄú¿ÉÒÔÊÔÖøʹÓõÄÖ¸ÁîµÄÌáʾ¡£¾ÙÀýÀ´Ëµ£º
+ M-<chr>  ±íʾµ±ÊäÈë×Ö·û <chr> ʱ°´×¡ META£¨»ò EDIT »ò ALT£©¼ü¡£
+          Èç¹ûÄãµÄ¼üÅÌÉÏûÓÐ META ¡¢EDIT »ò ALT ¼ü£¬ÓÃÏÂÊö·½·¨Ò²µÈЧ£º
+          ÏÈ°´Ò»Ï ESC ¼üÈ»ºó·Å¿ª£¬ÔÙÊäÈë <chr>¡£ÎÒÃÇÓà <ESC> À´±íʾ
+          ESC ¼ü¡£
+
+ÖØÒªÌáʾ£ºÒªÍ˳ö Emacs£¬ÇëÓà C-x C-c£¨Á½¸öÁ¬ÐøµÄ×éºÏ¼ü£©¡£ÏÂÎÄÖÐ×ó±ß¶¥
+Ðеġ°>>¡±×ÖÑùÓÃÀ´ÌáʾÄã³¢ÊÔ¼üÅÌÃüÁî¡£±ÈÈ磺
 <<Blank lines inserted around following line by help-with-tutorial>>
-[Middle of page left blank for didactic purposes.  Text continues below] 
->> ÏÖÔÚ¼üÈë C-v £¨ View next screen £©ÒÔÒƵ½Ï¸öÓ©Ä»¡£
-    £¨ÊÔÊÔ¿´£¬¼üÈë×ÖÔª v ʱ£¬°´×¡ CONTROL ¼ü£©
-    ´ÓÏÖÔÚ¿ªÊ¼£¬ÄúÓ¦¸ÃÔÚÿ´ÎÔĶÁÍêÄ¿Ç°µÄөĻʱ×öÒ»´ÎÕâ¸ö¶¯×÷¡£
-
-ҪעÒâµÄÊÇ£¬µ±Äú´ÓÒ»¸öÓ©Ä»ÒƵ½ÁíÒ»¸öʱ£¬Öмä»áÓÐÁ½ÐÐÖظ´£»ÕâÑù×öÊÇΪÁË
-ÌṩһЩÁ¬ÐøÐÔ£¬ÈÃÄú¿ÉÒÔ½ÓÐøµØÔĶÁÎÄ×Ö¡£
+[±¾Ò³µ±ÖÐÌØÒâÁô³öһЩ¿Õ°×ÊdzöÓÚ½ÌѧĿµÄ£¬Çë¼ÌÐøÍùºó¿´]
+>> ÏÖÔÚÊäÈë C-v £¨²é¿´ÏÂÒ»ÆÁÎÄ×Ö£©Òƶ¯µ½ÏÂÒ»ÆÁ¡£
+   £¨±ð½ôÕÅ£¬ÔÚÊäÈë×Ö·û v µÄͬʱעÒâÒª°´×¡ CONTROL ¼ü£©
+   ´ÓÏÖÔÚ¿ªÊ¼£¬Ã¿¶ÁÍ굱ǰһÆÁÄ㶼ÐèÒªÕâÑù×öÒ»´Î¡£
 
-ÄúÐèÒªÖªµÀµÄµÚÒ»¼þÊÂÊÇÈçºÎÔÚÎÄ×ÖÖÐÒƶ¯¡£ÄúÒѾ­ÖªµÀÁË¿ÉÒÔ C-v À´ÏòÇ°ÒÆ
-¶¯Ò»¸öÓ©Ä»¡£ÒªÏòºóÒƶ¯Ò»¸öÓ©Ä»£¬Ôò¼üÈë M-v £¨°´×¡ META ¼ü£¬È»ºó¼üÈë v 
-£¬»òÊÇÈç¹ûÄúûÓÐ META ¡¢ EDIT »ò ALT ¼üʱ¼üÈë <ESC>v £©¡£
+ÖµµÃ×¢ÒâµÄÊÇ£¬µ±Äã´ÓÉÏÒ»ÆÁ¹öµ½ÏÂÒ»ÆÁʱ£¬Öмä»áÓÐÁ½ÐеÄÖظ´£»ÕâÑù×öÊÇΪ
+ÁËά³Ö¹öÆÁµÄÁ¬ÐøÐÔ£¬·½±ãÄã˳³©¡¢Á¬ÐøµØÔĶÁ¡£
 
->>  ÊÔÖø¼üÈë M-v È»ºó C-v £¬Á¬Ðø¸ö¼¸´Î¡£
+Óñ༭Æ÷£¬¿ªÃŵÚÒ»¼þʾÍÊÇѧ»áÔÚÎÄ×ÖÖÐÒƶ¯¡£ÄãÒѾ­ÖªµÀÁË C-v ¿ÉÒÔÏòÏÂÒÆ
+¶¯Ò»ÆÁ£¬ÒªÍùÉÏÒÆ£¬ÇëÓà M-v £¨Ò²¾ÍÊÇ°´×¡ META ¼ü£¬È»ºóÊäÈëv£¬Èç¹ûÄãûÓÐ
+META¡¢EDIT »ò ALT ¼üÄÇô¾ÍÏÈ°´ <ESC> ÔÙ°´ v£©¡£
 
-¡¾ÏÖÔÚÄú¿ÉÒÔ C-v Ö¸ÁîÒƵ½ºóÃ桸·­Ò롹һ½Ú£¬ÒÔÈ¡µÃ¹Ø춱¾Îĵķ­ÒëÏà¹ØÊÂ
-ÏȻºóÒÔ M-v Ö¸Áî»Øµ½ÕâÀï¡£¡¿
+>>  ÊÔÊÔ M-v£¬È»ºóÔÙÊÔÊÔ C-v£¬À´»ØåÞ¼¸´Î¡£
 
 
-* ÕªÒª£¨ SUMMARY £©
--------------------
+* С½á£¨SUMMARY£©
+-----------------
 
-ÒÔϵÄÖ¸ÁîÔÚ¼ìÔÄөĻʱÏ൱ÓÐÓ㺡¾ÎÒÃÇÏÖÔÚÒÔ¡¸Ó©Ä»¡¹À´±íʾ¡¸ÏÔʾµµ°¸ÄÚ
-ÈݵÄÇøÓò¡¹£¬ÒòΪĿǰÊÇ´¦ÔÚ Emacs Öеĵ¥´°¸ñ£¨ window £©ÏÔʾ״̬£¬Èç¹û
-ÊÇÔڶര¸ñµÄ״̬Ï£¬ÕâÀïËù½éÉܵÄÖ¸ÁîÔò×÷ÓÃÔÚ¡¸¹¤×÷ÖеĴ°¸ñ¡¹¡£ÓйØ춴°
-¸ñµÄ½éÉÜ£¬Çë¼û´°¸ñ£¨ windows £©Ò»½Ú¡£¡¿
+ÒÔÏÂÃüÁîÔÚ·­Ò³ä¯ÀÀʱÏ൱ÓÐÓãº
 
-        C-v     ÏòÇ°Òƶ¯Ò»¸öÓ©Ä»£¯´°¸ñ
-        M-v     ÏòºóÒƶ¯Ò»¸öÓ©Ä»£¯´°¸ñ
-        C-l     Çå³ýÓ©Ä»£¯´°¸ñ£¬ÔÙÖØÐÂÏÔʾËùÓÐÎÄ×Ö£¬
-                ÓαêËùÔÚλÖûáÏÔʾì¶Ó©Ä»£¯´°¸ñµÄÖÐÑë¡£
-                £¨ÊÇ CONTROL-L ¶ø²»ÊÇ CONTROL-1 £©
+        C-v     ÏòÇ°Òƶ¯Ò»ÆÁ
+        M-v     ÏòºóÒƶ¯Ò»ÆÁ
+        C-l     ÖØ»æÆÁÄ»£¬²¢½«¹â±êËùÔÚÐÐÖÃÓÚÆÁÄ»µÄÖÐÑë
+                £¨×¢ÒâÊÇ CONTROL-L£¬²»ÊÇ CONTROL-1£©
 
->> ÕÒ³öÓαêµÄλÖ㬲¢×¢ÒâÆ丽½üµÄÎÄ×ÖΪºÎ¡£È»ºó¼üÈë C-l ¡£
-   ÔÙ´ÎÕÒ³öÓαêµÄλÖã¬È·ÈÏÒ»ÏÂÏàͬµÄÎÄ×ÖÏÖÔÚҲλÔÚÆ丽½ü¡£
+>> ÕÒµ½¹â±ê£¬ÁôÒâÆ丽½üµÄÎÄ×Ö£¬È»ºóÊäÈë C-l¡£
+   ÕÒÕÒ¹â±êÔÚÄÄÀÄã»á·¢ÏÖÆ丽½üµÄÎÄ×Ö²¢Ã»Óб仯¡£
 
-Èç¹ûÄúµÄÖն˻úÓÐ PageUp Óë PageDn ¼üµÄ»°£¬ÄúÒ²¿ÉÒÔʹÓÃËüÃÇÀ´ÒÔөĻΪµ¥
-λµØÒƶ¯£¬µ«ÊÇʹÓà C-v ºÍ M-v »á±È½ÏÓÐЧÂÊ¡£
+Èç¹ûÄãµÄ¼üÅÌÉÏÓÐ PageUp ºÍ PageDn£¬Ò²¿ÉÒÔÓÃÕâÁ½¸ö¼üÀ´¹öÆÁ¡£²»¹ýʹÓÃ
+C-v ºÍ M-v µÄЧÂÊÒª¸ü¸ßһЩ¡£
 
 
-* »ù±¾µÄÓαê¿ØÖÆ£¨ BASIC CURSOR CONTROL £©
-------------------------------------------
+* »ù±¾µÄ¹â±ê¿ØÖÆ£¨BASIC CURSOR CONTROL£©
+----------------------------------------
 
-Ó©Ä»µ½Ó©Ä»µÄÒƶ¯ÊǺÜÓÐÓ㬵«ÊÇÄúÈçºÎÒƶ¯µ½Î»ì¶Ó©Ä»ÄÚÎÄ×ÖÖеÄÌض¨Î»ÖÃÄØ£¿
+ÕûÆÁµÄÒƶ¯ºÜÓÐÓ㬵«ÊÇÈçºÎÔÚÎÄ×ÖÖо«È·¶¨Î»ÄØ£¿
 
-Óм¸ÖÖ·½Ê½¿ÉÒÔ½øÐС£Äú¿ÉÒÔʹÓ÷½Ïò¼ü£¬µ«Êǽ«ÄúµÄÊÖ·ÅÔÚ±ê×¼µÄ¡²¼üÅÌ¡³Î»
-Ö㬲¢ÇÒʹÓÃÖ¸Áî C-p ¡¢ C-b ¡¢ C-f ºÍ C-n ½«±È½ÏÓÐЧÂÊ¡£ÕâЩ×ÖÔªºÍËĸö
-·½Ïò¼ü¡²µÄ¹¦ÄÜ¡³ÊÇͬµÈµÄ£¬ÈçÏÂËùʾ£º
+Óм¸ÖÖ·½Ê½¿ÉÒÔÑ¡Ôñ¡£Ó÷½Ïò¼üµ±È»¿ÉÒÔ£¬²»¹ý¸üÓÐЧÂʵķ½·¨ÊDZ£³ÖË«ÊÖλÓÚ
+Ö÷¼üÅÌÇø£¬È»ºóʹÓà C-p ¡¢ C-b ¡¢ C-f ºÍ C-n ÕâËĸöÃüÁî¡£ËüÃǵŦÄܺͷ½
+Ïò¼üÊÇÒ»ÑùµÄ£¬ÈçÏÂͼËùʾ£º
 
-                             Ç°Ò»ÐÐ C-p
+                             ÉÏÒ»ÐÐ C-p
                                   :
                                   :
-            ÏòºóÒÆ C-b .... Ä¿Ç°ÓαêλÖà .... ÏòÇ°ÒÆ C-f
+            Ïò×óÒÆ C-b .... Ä¿Ç°¹â±êλÖà .... ÏòÓÒÒÆ C-f
                                   :
                                   :
-                             ºóÒ»ÐÐ C-n
+                             ÏÂÒ»ÐÐ C-n
 
->> ÒÔ C-n »ò C-p ½«ÓαêÒƵ½Í¼ÐεÄÖÐÑë¡£
-   ¼üÈë C-l »á¿´µ½Õû¸öͼÐÎÏÔʾÔÚÓ©Ä»µÄÖÐÑë¡£
-
-Äú»á·¢ÏÖÓÃ×ÖĸËù´ú±íµÄÒâÒåÀ´¼ÇÒäËüÃǺÜÈÝÒ×£ºP ±íʾ previous ¡¢ N ±íʾ 
-next ¡¢ B ±íʾ backward ¡¢¶ø F Ôò±íʾ forward ¡£Äú½«¡¸×ÜÊÇ¡¹Óõ½ÕâЩÓÎ
-±êÒƶ¯Ö¸Áî¡£
+>> Óà C-n »ò C-p ½«¹â±êÒƵ½ÉÏͼµÄÖÐÑë¡£
+   °´ C-l£¬Õû·ùͼ»á±»ÏÔʾÔÚÆÁÄ»µÄÖÐÑë¡£
 
->> °´¼¸´Î C-n °ÑÓαêÍùÏÂÒƶ¯µ½ÕâÐС£
+¡°P N B F¡±Ëĸö×Öĸ·Ö±ð´ú±íÁËËĸö´Ê£¬ÓÃÕâËĸö´Ê¼ÇÒäÕâЩ×éºÏ¼ü»á¸üÈÝÒ×£º
+P ´ú±í previous£¨ÉÏÒ»ÐУ©£¬N ´ú±í next£¨ÏÂÒ»ÐУ©£¬B ´ú±í backward£¨»Ø
+ÍË£©£¬¶ø F Ôò´ú±í forward£¨Ç°½ø£©¡£ÕâЩ×éºÏ¼ü½ñºó½«ÓëÄãÐÎÓ°²»Àë¡£
 
->> °´¼¸´Î C-f ÍùÇ°ÒƵ½ÕâÐУ¬È»ºóÔÙÒÔ C-p ÍùºóÒƶ¯¡£
-   ¿´¿´µ±ÓαêÔÚ±¾ÐÐÖÐÑëʱ£¬C-p µÄ¶¯×÷ÊÇÔõÑù¡£
+>> °´¼¸´Î C-n °Ñ¹â±êÍùÏÂŲµ½ÕâÀï¡£
 
-ÿһ¸öÎÄ×ÖÐж¼ÒÔÒ»¸ö Newline ×ÖÔª×÷Ϊ½áÊø£¬ËüÊÇÓÃÀ´ÓëÏÂÒ»ÐÐ×÷Ϊ·Ö±ð¡£
-ÔÚÄúµµ°¸ÖеÄ×îºóÒ»ÐÐÓ¦¸ÃÒªÓÐÒ»¸ö Newline À´×÷Ϊ½áÊø£¨µ«ÊÇ Emacs ²¢²»Ò»
-¶¨ÐèÒªËüÀ´±à¼­µµ°¸£©¡£
+>> Óà C-f °Ñ¹â±êÒƶ¯µ½ÕâÒ»ÐУ¬È»ºóÔÙÓà C-p ÍùÉÏŲ¡£
+   ×¢Òâ¹Û²ìµ±¹â±êÔÚÒ»ÐеÄÖÐÑëʱ C-p ÃüÁîµÄÐÐΪ¡£
 
->> ÊÔÖøÔÚÒ»ÐпªÊ¼µÄµØ·½¼üÈë C-b ¡£½á¹ûÓ¦¸Ã»áÒƶ¯µ½Ç°Ò»ÐеÄ×îºóÃæ¡£
-   ÕâÊÇÒòΪËüÍùºóÒƶ¯Ê±Ô½¹ýÁË Newline ×ÖÔª¡£
+ÿÐÐÎÄ×Ö¶¼ÒÔÒ»¸ö¡°»»Ðзû¡±½áÊø£¬¡°»»Ðзû¡±°ÑÐÐÓëÐÐÇø·Ö¿ªÀ´¡£ÎļþµÄ×îºó
+Ò»ÐÐÒ²Ó¦¸ÃÒ²ÓÐÒ»¸ö»»Ðзû£¨²»¹ý Emacs ²¢²»Ç¿ÖÆÒªÇóÕâÒ»µã£©¡£
 
-C-f Ò²¿ÉÒÔºÍ C-b Ò»ÑùµØÔ½¹ý Newline ×ÖÔª¡£¡¾Newline ×ÖÔªÊÇ¡¸²»¿É¼û
-£¨ invisible £©×ÖÔª¡¹£¬Ôڱ༭Æ÷ÖÐÒ»°ã¿´²»µ½Ëü£¬ÕâÀïÖ»ÊǸæËßÄú£ºÔÚÐÐÊ×
-ÔÙÍùÇ°×ߣ¬ÄÇôÓαê»áÅܵ½Ç°Ò»ÐУ¨Èç¹ûÓÐÇ°Ò»ÐеĻ°£©£»ÔÚÐÐβÔÙÍùºó×ߣ¬ÄÇ
-ôÓαê»áÅܵ½ºóÒ»ÐУ¨Èç¹ûÓкóÒ»ÐеĻ°£©¡£¡¸Ô½¹ý Newline ×ÖÔª¡¹»áÈÃÓαê
-Åܵ½ÁíÍâÒ»ÐС£¡¿
+>> ÔÚÒ»ÐеÄÐÐÍ·ÊäÈë C-b¡£
+   ¹â±êÓ¦¸Ã»áÒƶ¯µ½Ç°Ò»ÐеÄÐÐ⣬ÒòΪ¹â±êÔÚ»ØÍ˹ý³ÌÖÐÔ½¹ýÁË»»Ðзû¡£
+
+ͬÑù C-f Ò²¿ÉÒÔÏñ C-b Ò»ÑùÔ½¹ý»»Ðзû¡£
 
->> ¶à°´¼¸´Î C-b£¬×Ô¼º¸Ð¾õÒ»ÏÂÓαêÔÚÄÄ¡£
-   È»ºó°´¼¸´Î C-f »Øµ½ÕâÐеÄβ°Í¡£
-   ÔÙ°´Ò»´Î C-f ¾Í¿ÉÒÔÒƵ½ÏÂÒ»ÐÐÁË¡£
+>> Á¬°´¼¸´Î C-b£¬¸ÐÊÜһϹâ±êµÄÒƶ¯¡£
+   È»ºó°´¼¸´Î C-f »Øµ½±¾ÐеÄÐÐβ¡£
+   ÔÙ°´Ò»´Î C-f£¬¹â±ê»áÒƶ¯µ½ÏÂÒ»ÐС£
 
-µ±ÄúÒƶ¯Óα괩ԽөĻµÄÉÏ·½»òÏ·½Ê±£¬Ôڱ߽çÍâµÄÎÄ×Ö»áÒÆλ½øÈëÓ©Ä»ÄÚ¡£Õâ
-³ÆΪ¡¸¾í¶¯¡¹¡£ËüÈà Emacs ¿ÉÒÔ½«ÓαêÒƶ¯µ½ÎÄ×ÖÖеÄÈÎÒâÌض¨Î»Öã¬Í¬Ê±
-£¨Óα꣩²»»áÅܳöÓ©Ä»Íâ¡£
+µ±ÄãÒƶ¯¹â±ê´©Ô½ÆÁÄ»µÄÉÏϱ߽çʱ£¬Ôڱ߽çÍâµÄÎÄ×Ö»áÒƶ¯µ½ÆÁÄ»ÄÚ£¬Õâ³ÆΪ
+¡°¹ö¶¯¡±£¨scrolling£©¡£¹ö¶¯Ê¹µÃ¹â±ê¿ÉÒÔ±»Òƶ¯µ½ÎÄ×ÖÖеÄÈκÎλÖ㬲¢ÇÒ»¹
+²»»áÈùâ±êÅܵ½ÆÁÄ»Íâ±ßÈ¥¡£
 
->> ÊÔÖøÒÔ C-n ½«ÓαêÔ½¹ýөĻϷ½£¬È»ºó¿´¿´·¢ÉúÁËʲôÊ¡£
+>> Óà C-n ½«¹â±êÏÂÒÆ£¬Ò»Ö±Ô½¹ýÆÁÄ»±ß½ç£¬Í¬Ê±¹Û²ì·¢ÉúÁËʲô±ä»¯¡£
 
-Èç¹ûÒ»¸ö×ÖÔªÒ»¸ö×ÖÔªµØÒƶ¯Ì«ÂýµÄ»°£¬Äú¿ÉÒÔÒ»¸ö×ÖÒ»¸ö×ÖµØÒƶ¯¡£M-f
-(META-f) ÍùÇ°Òƶ¯Ò»¸ö×Ö£¬M-b ÔòÍùºóÒƶ¯Ò»¸ö×Ö¡£¡¾¶ÔÖÐÎÄÀ´Ëµ£¬ÔòÊÇÒƶ¯
-µ½ÏÂÒ»¸ö»òÏÂÒ»¸ö±êµã·ûºÅµÄËùÔÚ¡£¡¿
+Èç¹ûÄãÏÓÒ»¸ö×Ö·ûÒ»¸ö×Ö·ûµØŲ¹â±êÌ«Âý£¬Ä㻹¿ÉÒÔÒ»¸ö´ÊÒ»¸ö´ÊµØÌø¡£M-f
+(META-f) ¿ÉÒÔ½«¹â±êÍùÇ°Òƶ¯Ò»¸ö´Ê£¬¶ø M-b ÔòÊÇÍùºóÒÆ¡£¡¾ÕâÀïµÄ¡°´Ê¡±Ö¸
+Ó¢Îĵ¥´Ê£¬¶ÔÖÐÎÄÀ´Ëµ£¬ÔòÊÇÖ¸Òƶ¯µ½ÏÂÒ»¸ö±êµã·ûºÅ¡£¡¿
 
->> ¼üÈëһЩ M-f ºÍ M-b¡£
-
-µ±ÄúÔÚÒ»¸ö×ÖµÄÖмäʱ£¬M-f »áÒƶ¯µ½Õâ¸ö×ÖµÄβ°Í¡£µ±ÄúÔÚ×ÖÓë×Ö¼äµÄ¿Õ°×ʱ£¬
-M-f »áÒƶ¯µ½ÏÂÒ»¸ö×ÖµÄβ°Í¡£M-b µÄЧ¹ûÏàËÆ£¬Ö»ÊÇ·½Ïò²»Í¬¡£
+>> ÊÔÊÔ M-f ºÍ M-b¡£
 
->> °´¼¸´Î M-f ºÍ M-b£¬Öмä¼ÐÔÓһЩ C-f ºÍ C-b£¬
-   ÕâÑù×ÓÄú¾Í¿ÉÒÔ¹Û²ì M-f ºÍ M-b ÔÚ¸÷ÖÖ¡¸Î»ÔÚ×Ö¼ä»ò×ÖÔª¼ä¡¹
-   µÄ²»Í¬Î»Öã¬Ëù±íÏÖ³öÀ´µÄÐÐΪ¡£
+Èç¹û¹â±êÍ£ÔÚÒ»¸ö´ÊµÄÖм䣬M-f »áÒƶ¯µ½Õâ¸ö´ÊµÄĩβ¡£Èç¹û¹â±ê´¦ÓÚ´ÊÓë´Ê
+Ö®¼äµÄ¿Õ°×´¦£¬M-f »áÒƶ¯µ½ÏÂÒ»¸ö´ÊµÄĩβ¡£M-b µÄ¹¦ÄÜÀàËÆ£¬Ö»ÊÇ·½ÏòÏà·´¡£
 
-Çë×¢Òâ C-f ¡¢ C-b ºÍ M-f ¡¢ M-b Á½¶ÔÖ®¼äµÄÏàËÆÐÔ¡£¡¸¾­³£¡¹µÄ×´¿öÊÇ£º
-META ×ÖÔªÊÇÓÃÀ´×÷ΪÓ롸ÒÔÓïÑÔ¶¨Òå³öµÄµ¥Î»£¨×Ö¡¢¾ä×Ó¡¢¶ÎÂ䣩¡¹ÓйصIJÙ
-×÷£¬¶ø CONTROL ×ÖÔªÔòÊÇ×÷ÓÃÔÚ¡¸ÓëÄúËù±à¼­Î޹صġº»ù±¾¡»µ¥Î»£¨×ÖÔª»òÐÐ
-µÈ£©¡¹ÉÏ¡£
+>> °´¼¸´Î M-f ºÍ M-b£¬Öмä¼ÐÔÓһЩ C-f ºÍ C-b¡£
+   Äã¿ÉÒԹ۲쵽 M-f ºÍ M-b ÔÚ²»Í¬Î»ÖÃÉÏËù±íÏÖ³öÀ´µÄ²»Í¬ÐÐΪ¡£
+
+Çë×¢Òâ C-f ¡¢C-b ºÍ M-f ¡¢M-b Á½¶ÔÖ®¼äµÄÀà±È¹Øϵ¡£Í¨³£µÄ¹ßÀýÊÇ£ºMETA ϵ
+ÁÐ×éºÏ¼üÓÃÀ´²Ù×÷¡°ÓÉÓïÑÔ¶¨ÒåµÄµ¥Î»£¨±ÈÈç´Ê¡¢¾ä×Ó¡¢¶ÎÂ䣩¡±£¬¶ø CONTROL
+ϵÁÐ×éºÏ¼üÓÃÀ´²Ù×÷¡°ÓëÓïÑÔÎ޹صĻù±¾µ¥Î»£¨±ÈÈç×Ö·û¡¢Ðеȵȣ©¡±¡£
 
-Õâ¸öÏàËÆÐÔÔÚ¡¸ÐÐÓë¾ä×Ó¡¹Ö®¼äҲͬÑùÊÊÓãºC-a ºÍ C-e »á½«ÓαêÒƶ¯µ½¡¸Ò»
-ÐС¹µÄ ¿ªÊ¼ºÍ½áβ´¦£¬¶øM-a ºÍ M-e Ôò½«ÓαêÒƶ¯µ½¡¸Ò»¾ä¡¹µÄ ¿ªÊ¼ºÍ½áβ
-´¦¡£
+ÀàËƵĹßÀýÔÚ¡°ÐС±Óë¡°¾ä×Ó¡±Ö®¼äҲͬÑùÊÊÓãºC-a ºÍ C-e ¿ÉÒÔ½«¹â±êÒƶ¯µ½
+¡°Ò»ÐС±µÄÍ·²¿ºÍβ²¿£»¶ø M-a ºÍ M-e Ôò½«¹â±êÒƶ¯µ½¡°Ò»¾ä¡±µÄÍ·²¿ºÍβ²¿¡£
 
->> ÊÔÖø°´Á½´Î C-a£¬ÔÙ°´Á½´Î C-e¡£
-   ÊÔÖø°´Á½´Î M-a£¬ÔÙ°´Á½´Î M-e¡£
+>> °´Á½´Î C-a£¬ÔÙ°´Á½´Î C-e¡£
+   °´Á½´Î M-a£¬ÔÙ°´Á½´Î M-e¡£
 
-¿´Ò»ÏÂΪʲôÖظ´µÄ C-a Ö¸Áî»áûÓÐ×÷Ó㬶øÖظ´µÄ M-a Ö¸ÁîÔò¼ÌÐøÒƶ¯µ½ÏÂ
-Ò»¸ö¾ä×Ó¡£ËäÈ»Õâ²¢²»ÄÜ˵ÊÇÍêÈ«Àà±È£¬µ«ÊÇÆäÖÐÿ¸öÖ¸ÁîµÄÐÐΪ¿´ÆðÀ´¶¼Ê®·Ö
-×ÔÈ»¡£
+ÏëÒ»ÏëΪʲôÖظ´µÄ C-a ÃüÁî»áûÓÐ×÷Ó㬶øÖظ´µÄ M-a ÃüÁîÔò»áÈùâ±ê²»¶Ï
+µØ»ØÍ˵½ÉÏÒ»¸ö¾ä×Ó¡£ËäÈ»Õâ¸öÀà±È¹æÂɲ¢²»Ñϸñ£¬µ«ÊǺÜ×ÔÈ»¡£
 
-ÓαêÔÚÎÄ×ÖÖеÄλÖÃÒ²¿ÉÒÔ³Æ×÷¡¸µã루 point £©¡¹¡£¼òµ¥À´Ëµ¾ÍÊÇ£ºÓαê±í
-ÏÖ³öÓ©Ä»ÖС¸µãλ¡¹ËùÔÚµÄÎÄ×ÖλÖá£
+¹â±êÍ£ÁôµÄλÖÃÒ²¿ÉÒÔ³Æ×÷¡°µãλ¡±£¨point£©¡£»òÕ߸ɴà˵£¬¹â±êָʾ³öÁËÆÁÄ»
+ÉÏ¡°µãλ¡±ÔÚÎı¾ÖеÄλÖá£
 
-ÕâÀïÊÇһЩ¼òµ¥¡¸ÓαêÒƶ¯£¨ cursor-moving £©²Ù×÷¡¹µÄÕûÀí£¬ÆäÖÐÒ²°üÀ¨ÁË
-¡¸×ֺ;䡹µÄÒƶ¯Ö¸Á
+ÕâÀï¶Ô¼òµ¥µÄ¹â±êÒƶ¯ÃüÁî×öÒ»¸ö×ܽᣬÆäÖÐÒ²°üÀ¨ÁËÕû´ÊºÍÕû¾äµÄÒƶ¯£º
 
-        C-f     ÍùÇ°Òƶ¯Ò»¸ö×ÖÔª
-        C-b     Íù»ØÒƶ¯Ò»¸ö×ÖÔª
+        C-f     ÏòÓÒÒƶ¯Ò»¸ö×Ö·û
+        C-b     Ïò×óÒƶ¯Ò»¸ö×Ö·û
 
-        M-f     ÍùÇ°Òƶ¯Ò»¸ö×Ö¡¾ÖÐÎÄÊÇÒƶ¯µ½ÏÂÒ»¸ö±êµã·ûºÅ¡¿
-        M-b     Íù»ØÒƶ¯Ò»¸ö×Ö¡¾ÖÐÎÄÊÇÒƶ¯µ½ÉÏÒ»¸ö±êµã·ûºÅ¡¿
+        M-f     ÏòÓÒÒƶ¯Ò»¸ö´Ê¡¾ÖÐÎÄÊÇÒƶ¯µ½ÏÂÒ»¸ö±êµã·ûºÅ¡¿
+        M-b     Ïò×óÒƶ¯Ò»¸ö´Ê¡¾ÖÐÎÄÊÇÒƶ¯µ½ÉÏÒ»¸ö±êµã·ûºÅ¡¿
 
         C-n     Òƶ¯µ½ÏÂÒ»ÐÐ
         C-p     Òƶ¯µ½ÉÏÒ»ÐÐ
@@ -152,906 +138,852 @@
         C-a     Òƶ¯µ½ÐÐÊ×
         C-e     Òƶ¯µ½ÐÐβ
 
-        M-a     ÒƻؾäÊ×
-        M-e     ÒƵ½¾äβ
+        M-a     Òƶ¯µ½¾äÊ×
+        M-e     Òƶ¯µ½¾äβ
 
->> Á·Ï°¼¸´ÎÕâЩָÁî¡£ÕâЩ¶¼ÊÇ×ʹÓõ½µÄÖ¸Áî¡£
+>> °ÑÉÏÃæËùÓеÄÃüÁÁ·Ï°¼¸´Î£¬ÕâЩ¿É¶¼ÊÇ×î³£ÓõÄÃüÁî¡£
 
-»¹ÓÐÁ½¸öÖØÒªµÄÓα궯×÷£¨ cursor-motion £©Ö¸ÁM-<£¨ META Less-than £©£¬
-Òƶ¯µ½ÎÄ×ÖµÄ×ʼ£¬ÒÔ¼°M->£¨ META Greater-than £©£¬Òƶ¯µ½ÎÄ×ÖµÄ×îºó¡£
+ÕâÀﻹҪ½éÉÜÁ½¸öÖØÒªµÄ¹â±êÒƶ¯ÃüÁM-< £¨META СÓںţ©¿ÉÒÔ½«¹â±êÒƶ¯µ½
+ËùÓÐÎÄ×ÖµÄ×ͷ£»M-> £¨META ´óÓںţ©¿ÉÒÔ½«¹â±êÒƶ¯µ½ËùÓÐÎÄ×ÖµÄ×îĩβ¡£
 
-Ôڴ󲿷ݵÄÖն˻ú£¬¡¸<¡¹ÊÇÔÚ comma ÉÏ·½£¬ËùÒÔÄú±ØÐëҪʹÓà shift ¼üÀ´¼ü
-Èë¡£ÔÚÕâЩÖն˻úÉÏ£¬Äú±ØÐëʹÓà shift ¼üÀ´¼üÈë M-<£»Ã»ÓÐʹÓà shift ¼ü£¬
-Äú¾Í±ä³É¼üÈë M-comma ÁË¡£
+×¢Ò⣬Ôڴ󲿷ּüÅÌÉÏ£¬Ð¡Óںţ¨<£©ÐèÒªÓÃÉϵµ¼ü£¨Shift£©À´ÊäÈ룬ËùÒÔÔÚÕâ
+Щ¼üÅÌÉÏÄãÓ¦¸ÃÓà Shift ¼üÀ´ÊäÈë M-<£¬Èç¹û²»°´ Shift ¼ü£¬ÄãÊäÈëµÄ»áÊÇ
+M-comma£¨META ¶ººÅ£©¡£
 
->> ÏÖÔÚÊÔһϠM-< £¬ÒƵ½±¾¿ìËÙÖ¸ÄϵÄ×ʼ¡£
-   È»ºóÔÙÖظ´µØʹÓà C-v »Øµ½ÕâÀï¡£
+>> ÊÔÒ»ÊÔ M-< £¬ÒƵ½±¾¿ìËÙÖ¸ÄϵÄ×ʼ¡£
+   È»ºóÔÙ°´¼¸´Î C-v »Øµ½ÕâÀï¡£
 
->> ÏÖÔÚÊÔһϠM-> £¬ÒƵ½±¾¿ìËÙÖ¸ÄϵÄ×îºó¡£
-   È»ºóÔÙÖظ´µØʹÓà M-v »Øµ½ÕâÀï¡£
+>> ÊÔÒ»ÊÔ M-> £¬ÒƵ½±¾¿ìËÙÖ¸ÄϵÄ×îĩβ¡£
+   È»ºóÔÙ°´¼¸´Î M-v »Øµ½ÕâÀï¡£
 
-Èç¹ûÄúµÄÖն˻úÓз½Ïò¼üµÄ»°£¬ÄúÒ²¿ÉÒÔÓ÷½Ïò¼üÒƶ¯ÓαꡣÎÒÃÇÓÐÈý¸öÀíÓɽ¨
-ÒéÄúѧϰ C-b ¡¢ C-f ¡¢ C-n ¡¢ ºÍ C-p £º(1) ÈκεÄÖն˻ú¶¼ÄÜʹÓá£(2) 
-Ò»µ©ÄúʹÓà Emacs Ï൱ÊìÁ·ÁË£¬Äú»á·¢ÏÖ¼üÈëÕâЩ CONTROL ×ÖÔª£¬±ÈÆðʹÓ÷½
-Ïò¼ü¿ì¶àÁË£¨ÒòΪÄú²»ÐèÒª½«ÊÖÒÆ¿ª´ò×ÖÇø£©¡£(3) Ò»µ©ÄúʹÓÃÕâЩ CONTROL 
-×ÖÔªÖ¸Áî³ÉΪϰ¹ß£¬ÄúÒ²¿ÉÒÔºÜÈÝÒ×µØѧ»áÆäËû½ø½×µÄÓα궯×÷Ö¸Áî¡£
+Èç¹ûÄãµÄ¼üÅÌÉÏÓз½Ïò¼üµÄ»°£¬Ò²¿ÉÒÔÓÃËüÃÇÀ´Òƶ¯¹â±ê¡£²»¹ýÎÒÃÇÓÐÈý¸öÀíÓÉ
+ÍƼöÄãѧϰ C-b ¡¢C-f ¡¢C-n ¡¢ºÍ C-p£º£¨1£©ËüÃÇÔÚÈκμüÅÌÉ϶¼ÄÜÓᣣ¨2£©
+µ±ÄãÊìÁ·Ê¹Óà Emacs Ö®ºó£¬Äã»á·¢ÏÖÓÃÕâЩ×éºÏ¼ü±ÈÓ÷½Ïò¼üÒª¿ìµÃ¶à£¬ÒòΪÄã
+µÄÊÖ²»ÐèÒªÀ뿪´ò×ÖÇø¡££¨3£©Ò»µ©ÄãÏ°¹ßÁËʹÓÃÕâЩ×éºÏ¼ü£¬ÄãÒ²¿ÉÒÔºÜÈÝÒ×µØ
+ÊÊÓ¦ÆäËü¸ü¸ß¼¶µÄ¹â±êÒƶ¯ÃüÁî¡£
 
-´ó²¿·ÝµÄ Emacs Ö¸Áî½ÓÊÜÊý×Ö²ÎÊý£»¶Ô´ó²¿·ÝµÄÖ¸Áî¶øÑÔ£¬ËüµÄ×÷ÓÃÊÇÖ¸¶¨ÖØ
-¸´´ÎÊý¡£ÄúÒªÖ¸¶¨Ò»¸öÖ¸ÁîµÄÖظ´´ÎÊýµÄ×÷·¨ÊÇ£ºÏȼüÈë C-u£¬È»ºóÔÚÄú¼üÈëÖ¸
-ÁîÇ°£¬¼üÈë´ú±íÖظ´´ÎÊýµÄÊýλ¡£Èç¹ûÄúÓÐÒ»¸ö META£¨»ò EDIT »ò ALT £©¼ü£¬
-ÄÇôÄú»¹ÓÐÁíÍâÒ»¸öÌæ´ú×÷·¨À´ÊäÈëÊý×Ö²ÎÊý£º°´×¡ META ¼üʱ´òÈëÕâÊý×Ö¡£ÎÒ
-Ãǽ¨ÒéÄúѧϰ C-u µÄ·½·¨£¬ÒòΪËüÔÚÈκÎÖն˻ú¶¼¿ÉÒÔʹÓᣴËÒ»Êý×Ö²ÎÊýÒ²
-³Æ×÷Ϊ¡¸×ÖÊײÎÊý¡¹£¬ÒòΪÄúÔÚÕâ²ÎÊýËù×÷Óõ½µÄÖ¸ÁîÇ°¼üÈëËü¡£
+´ó²¿·ÖµÄ Emacs ÃüÁî½ÓÊÜÊý×Ö²ÎÊý£¬²¢ÇÒ¶ÔÓÚ¶àÊýÃüÁî¶øÑÔ£¬ÕâЩÊý×Ö²ÎÊýµÄ×÷
+ÓÃÊÇÖ¸¶¨ÃüÁîµÄÖظ´´ÎÊý¡£ÎªÒ»¸öÃüÁîÖ¸¶¨Êý×Ö²ÎÊý£¨Ò²¾ÍÊÇÖظ´´ÎÊý£©µÄ·½·¨
+ÊÇ£ºÏÈÊäÈë C-u£¬È»ºóÊäÈëÊý×Ö×÷Ϊ²ÎÊý£¬×îºóÔÙÊäÈëÃüÁî¡£Èç¹ûÄãÓÐMETA £¨»ò
+EDIT »ò ALT£©¼ü£¬ÄÇô»¹ÓÐÁíÒ»ÖÖ°ì·¨£º°´×¡ META ¼ü²»¶¯£¬È»ºóÊäÈëÊý×Ö¡£²»
+¹ýÎÒÃÇ»¹Êǽ¨ÒéÄãÓà C-u£¬ÒòΪËüÔÚÈκÎÖն˻úÉ϶¼ÄÜÓá£ÕâÖÖÊý×Ö²ÎÊýÒ²³ÆΪ
+¡°Ç°×º²ÎÊý¡±£¬Òâ˼ÊÇ˵Õâ¸ö²ÎÊýÊÇÏÈÓÚʹÓÃËüµÄÃüÁî¶øÊäÈëµÄ¡£
 
-¾ÙÀýÀ´Ëµ£¬ C-u 8 C-f ÏòÇ°Òƶ¯ 8 ¸ö×ÖÔª¡£
+¾ÙÀýÀ´Ëµ£¬ C-u 8 C-f »áÏòÇ°Òƶ¯ 8 ¸ö×Ö·û¡£
 
->> ÊÔÖøÒÔÒ»¸öÊý×Ö²ÎÊýÀ´Ê¹Óà C-n »ò C-p£¬
-   Ö»Ò»¸öÖ¸Áî¾Í½«ÓαêÒƶ¯µ½ÕâÐеĸ½½ü¡£
+>> Ϊ C-n »òÕß C-p Ö¸¶¨Ò»¸öÊý×Ö²ÎÊý£¬ÕâÑùÄã¿ÉÒÔÖ»ÓÃÒ»¸öÃüÁî¾Í°Ñ¹â±êÒƶ¯
+   µ½±¾Ðеĸ½½ü¡£
 
-´ó²¿·ÝµÄÖ¸ÁîʹÓÃÊý×Ö²ÎÊýÀ´×÷ΪÆäÖظ´´ÎÊý£¬µ«ÊÇÆäÖÐÓÐЩָÁîÔòÊÇ×÷ΪÆäËû
-ÓÃ;¡£Óм¸¸öÖ¸ÁĿǰÄúÉÐδѧµ½£©½«Ëü×÷ΪÆì±ê -- ÒÔÒ»¸ö×ÖÊײÎÊýµÄÐÍ̬
-³öÏÖ£¬¶ø²»¹ÜÆäֵΪºÎ£¬ËüÃÇÈÃÕâÖ¸Áî×öЩ²»Ò»ÑùµÄÊ¡£
+ËäÈ»´ó²¿·ÖÃüÁîÓÃÊý×Ö²ÎÊýÀ´×÷ΪÆäÖظ´´ÎÊý£¬µ«ÊÇÒ²ÓÐЩÃüÁîÀýÍ⣬ËüÃǽ«Êý
+×Ö²ÎÊýÁí×öËüÓᣱÈÈçÓÐЩÃüÁĿǰ»¹Ã»Ñ§µ½£©½ö½ö½«Ç°×º²ÎÊý×÷Ϊһ¸ö±ê
+Ö¾¡ª¡ªÖ»ÒªÓÐÒ»¸öǰ׺²ÎÊý³öÏÖ£¬²»¹ÜÆäֵΪºÎ£¬ÃüÁîµÄ¹¦Äܶ¼»á¸Ä±ä¡£
 
-C-v ºÍ M-v ÔòÊÇÁíÒ»ÀàµÄÀýÍâ¡£µ±¸ø¶¨Ò»¸ö²ÎÊýʱ£¬ËüÃÇ¾í¶¯¡¸ËùÖ¸¶¨µÄÊýÁ¿
-µÄÐУ¨ÒÔÐÐΪµ¥Î»£©¡¹£¬¶ø²»ÊÇÒÔ¡¸Ó©Ä»¡¹Îªµ¥Î»¾í¶¯¡£¾ÙÀýÀ´Ëµ£¬C-u 8 C-v 
-½«ÏÔʾөĻ¾í¶¯ 8 ÐС£
+¶ø C-v ºÍ M-v ÔòÊôÓÚÁíÒ»ÖÖÀàÐ͵ÄÀýÍâ¡£µ±¸ø¶¨Ò»¸ö²ÎÊýʱ£¬ËüÃǽ«¹ö¶¯ÄãÖ¸
+¶¨µÄ¡°ÐÐÊý¡±£¬¶ø²»ÊÇ¡°ÆÁÊý¡±¡£¾ÙÀýÀ´Ëµ£¬C-u 8 C-v ½«ÆÁÄ»ÏòϹö¶¯ 8 ÐУ¬
+¶ø²»ÊÇ 8 ÆÁ¡£
 
->> ÏÖÔÚÊÔÖø¼üÈë C-u 8 C-v¡£
+>> ÏÖÔÚÊÔÊÔ¿´£¬ÊäÈë C-u 8 C-v¡£
 
-ÕâÖ¸ÁîÓ¦¸ÃÒѾ­½«Ó©Ä»ÏòÉÏÒÆÁË 8 ÐС£ÈôÄúÏ뽫ËüÔٴεØÏòÏÂ¾í¶¯£¬Äú¿ÉÒÔÔÚ
-Ö´ÐÐ M-v ʱ¸ø¶¨Ò»¸ö²ÎÊý¡£
+Õâ¸öÃüÁîÓ¦¸ÃÒѾ­½«ÎÄ×ÖÏòÉϹö¶¯ÁË 8 ÐС£Èç¹ûÄãÏ뽫ËüÔٴεØÏòϹö¶¯£¬Äã¿É
+ÒÔ¸ø¶¨Ò»¸ö²ÎÊýÈ»ºóÖ´ÐÐ M-v¡£
 
-Èç¹ûÄúÕýÔÚʹÓà X ´°¿Úϵͳ£¬ÔÚ Emacs ´°¿Ú×óÊÖ²àÓ¦¸ÃÓÐÒ»¸ö³ÆΪ¡¸¾í¶¯Ö᡹
-µÄ³¤·½ÐÍÇøÓò¡£Äú¿ÉÒÔÓû¬ÊóÔÚ¾í¶¯Öá°´Ò»ÏÂÀ´¾í¶¯ÎÄ×Ö¡£
+Èç¹ûÄãÕýÔÚʹÓÃÒ»¸ö´°¿Úϵͳ£¬±ÈÈç X11 »òÕß΢ÈíµÄ Windows£¬ÄÇôÔÚ Emacs
+´°¿ÚµÄ×ó±ß»òÕßÓÒ±ßÓ¦¸ÃÓÐÒ»¸ö³¤·½ÐεÄÇøÓò½Ð¡°¹ö¶¯Ìõ¡±£¬Äã¿ÉÒÔÓÃÊó±ê²Ù×Ý
+¹ö¶¯ÌõÀ´¹ö¶¯ÎÄ×Ö¡£
 
->> ÊÔÖøÔÚ¡¸¾í¶¯ÖáÄÚ·´°×ÇøÓòÉÏ¡¹Ñ¹Ò»ÏÂÖмäÅ¥¡£ÕâÓ¦¸Ã»á½«ÎÄ×Ö¾í¶¯µ½
-   ¡¸ÓÉÄúËù°´Ò»Ï»¬ÊóµÄµØ·½¡¹Ëù¾ö¶¨µÄλÖá£
+>> ÊÔ×ÅÔÚ¡°¹ö¶¯ÌõÄڵķ´°×ÇøÓò¡±ÉÏ°´Ò»ÏÂÊó±êÖмü¡£
+   ÎÄ×ÖÓ¦¸Ã»á¹ö¶¯µ½Êó±êËùָʾµÄλÖá£
 
->> µ±°´×¡Öмäʱ£¬ÊÔÖø½«»¬ÊóÉÏÏÂÒƶ¯¡£
-   Äú»á¿´µ½ÎÄ×ÖËæÖøÄúÒƶ¯»¬Êó¶øÉÏÏÂÒƶ¯¡£
+>> µ±°´×¡Öмüʱ£¬ÊÔ׎«Êó±êÉÏÏÂÒƶ¯¡£
+   Äã»á¿´µ½ÎÄ×ÖËæ×ÅÊó±êµÄÒƶ¯¶øÉÏϹö¶¯¡£
+   ¡¾Windows °æ±¾·ûºÏ Windows ³ÌÐòµÄ´«Í³²Ù×÷Ï°¹ß£¬ÉÏÊö²Ù×÷²»ÊÊÓᣡ¿
 
 
-* µ± EMACS ·¢´ôʱ£¨ WHEN EMACS IS HUNG £©
------------------------------------------
+* ÔÚ EMACS ʧȥÏìÓ¦µÄʱºò£¨WHEN EMACS IS HUNG£©
+-----------------------------------------------
 
-Èç¹û Emacs Í£Ö¹»ØÓ¦ÄúµÄÖ¸ÁÄú¿ÉÒÔ¼üÈë C-g À´°²È«µØÍ£Ö¹Ëü¡£ÄúÒ²¿ÉÒÔʹ
-Óà C-g À´Í£Ö¹Ö´Ðйý¾ÃµÄÖ¸Áî¡£
+Èç¹û Emacs ¶ÔÄãµÄÃüÁîʧȥÏìÓ¦£¬Äã¿ÉÒԺܰ²È«µØÓà C-g À´ÖÕÖ¹Õâ¸öÃüÁî¡£
+C-g Ò²¿ÉÒÔ±»ÓÃÀ´ÖÕÖ¹Ò»¸öÖ´Ðйý¾ÃµÄÃüÁî¡£
 
-ÄúÒ²¿ÉÒÔʹÓà C-g À´È¡ÏûÊý×Ö²ÎÊý»òÄú²»ÏëÒªÍê³ÉµÄÖ¸Áî¡£
+C-g »¹¿ÉÒÔ±»À´È¡ÏûÊý×Ö²ÎÊýºÍÄÇЩÊäÈëµ½Ò»°ëµÄÃüÁî¡£
 
->> ¼üÈë C-u 100 ÒÔÉ趨һ¸ö 100 µÄÊý×Ö²ÎÊý£¬È»ºó¼üÈë C-g¡£
-   ÏÖÔÚ¼üÈë C-f¡£ËüÓ¦¸ÃÖ»»áÒƶ¯Ò»¸ö×ÖÔª£¬ÒòΪÄúÒѾ­ÒÔ C-g
-   È¡ÏûÁ˲ÎÊý¡£
+>> ÊäÈë C-u 100 É趨һ¸öֵΪ 100 µÄÊý×Ö²ÎÊý£¬È»ºó°´ C-g¡£
+   ÏÖÔÚÔÙ°´ C-f£¬¹â±êÓ¦¸ÃÖ»»áÒƶ¯Ò»¸ö×Ö·û£¬ÒòΪÄãÒѾ­Óà C-g È¡ÏûÁ˲ÎÊý¡£
 
-Èç¹ûÄúÒѾ­²»Ð¡ÐĵؼüÈëÒ»¸ö <ESC>£¬Äú¿ÉÒÔ C-g À´È¡ÏûËü¡£
+Èç¹ûÄ㲻СÐÄ°´ÁËһϠ<ESC>£¬ÄãÒ²¿ÉÒÔÓà C-g À´È¡ÏûËü¡£
+¡¾Õâ¸ö˵·¨ËƺõÓÐÎÊÌ⣬ÒòΪ°´ÕÕÕâ¸ö°´¼ü˳ÐòÊäÈëµÄÓ¦¸ÃÊÇ C-M-g¡£
+  È¡Ïû<ESC> µÄÕýÈ·×ö·¨ÊÇÔÙÁ¬°´Á½´Î <ESC>¡£¡¿
 
 
-* ÎÞЧ»¯µÄÖ¸Á DISABLED COMMANDS £©
--------------------------------------
+* ±»½ûÓõÄÃüÁDISABLED COMMANDS£©
+-----------------------------------
 
-ÓÐһЩ Emacs Ö¸Áî±»¡¸ÎÞЧ»¯¡¹ÁË£¬Òò´Ë³õѧÕß²»»áÒâÍâµØʹÓõ½ËüÃÇ¡£
+ÓÐһЩ Emacs ÃüÁî±»¡°½ûÓá±ÁË£¬ÒÔ±ÜÃâ³õѧÕßÔÚ²»Á˽âÆäÈ·Çй¦ÄܵÄÇé¿öÏÂÎó
+ÓÃÕâЩÃüÁÔì³ÉÂé·³¡£
 
-Èç¹ûÄú¼üÈëÁËijһ¸öÎÞЧ»¯µÄÖ¸ÁEmacs »áÏÔʾһ¸öѶϢ£¬ËµÃ÷Õâ¸öÖ¸ÁîÊÇʲ
-ô£¬²¢ÇÒѯÎÊÄúÊÇ·ñÏëÒª¼ÌÐø£¬È»ºóÖ´ÐÐÕâÖ¸Áî¡£
+Èç¹ûÄãÓõ½ÁËÒ»¸ö±»½ûÓõÄÃüÁEmacs »áÏÔʾһ¸öÌáʾÏûÏ¢£¬¸æËßÄãÕâ¸öÃüÁî
+µ½µ×ÊǸÉʲôµÄ£¬Ñ¯ÎÊÄãÊÇ·ñÒª¼ÌÐø£¬²¢Ôڵõ½ÄãµÄ¿Ï¶¨Ö®ºóÔÙÖ´ÐÐÕâÃüÁî¡£
 
-Èç¹ûÄúÕæµÄÏëÒªÊÔÒ»ÏÂÕâ¸öÖ¸ÁÄÇôÔÚµ± Emacs ѯÎÊÄúʱ£¬Çë¼üÈë¿Õ°×¡£Ò»
-°ãÀ´Ëµ£¬Èç¹ûÄú²»ÏëÒªÖ´ÐÐÕâ¸öÎÞЧ»¯µÄÖ¸ÁÇëÒÔ¡ºn¡»À´»Ø´ðËü¡£
+ÄãÒªÊÇÕæµÄÏëÖ´Ðб»½ûÓõÄÃüÁÄÇôÔÚ Emacs ѯÎÊÄãµÄʱºòÓ¦¸Ã°´¿Õ¸ñ¡£Ò»°ã
+À´Ëµ£¬Èç¹ûÄã²»ÏëÖ´ÐУ¬°´¡°n¡±¾ÍÐÐÁË¡£
 
->> ¼üÈë C-x C-l £¨ÕâÊǸöÎÞЧ»¯µÄÖ¸Á
-   È»ºó¼üÈë n À´»Ø´ðÎÊÌâ¡£
+>> ÊÔÊÔ C-x C-l £¨ÕâÊÇÒ»¸ö±»½ûÓõÄÃüÁ
+   È»ºóÓà n À´»Ø´ðÎÊÌâ¡£
 
 
-* ´°¸ñ£¨ WINDOWS £©
--------------------
+* ´°¸ñ£¨WINDOWS£©
+-----------------
 
-Emacs ¿ÉÒÔÓÐÊý¸ö´°¸ñ£¬Ã¿Ò»¸öÏÔʾËü×Ô¼ºµÄÎÄ×Ö¡£ÎÒÃÇÔÚÉÔºó»á½âÊÍÈçºÎʹÓÃ
-¶àÖØ´°¸ñ¡£ÏÖÔÚÎÒÃÇÏëÒª½âÊÍÈçºÎ³ýÈ¥¶àÓàµÄ´°¸ñ£¬È»ºó»Øµ½»ù±¾µÄµ¥´°¸ñ±à¼­¡£
-ËüºÜ¼òµ¥£º
+Emacs ¿ÉÒÔÓжà¸ö´°¸ñ£¬Ã¿¸ö´°¸ñ¶¼ÏÔʾ²»Í¬µÄÎÄ×Ö¡£ÎÒÃǺóÃæÔÙ½éÉÜÔõô¶Ô¸¶
+¶à¸ö´°¸ñ£¬ÏÖÔÚÏÈÈÃÎÒÃÇÏȸãÃ÷°×ÈçºÎ¹Øµô¶àÓàµÄ´°¸ñ¡£ÆäʵҲºÜ¼òµ¥£º
 
-        C-x 1   One window £¨¼´£¬³ýÈ¥ÆäËûËùÓеĴ°¸ñ£©¡£
+        C-x 1   Ö»±£ÁôÒ»¸ö´°¸ñ£¨Ò²¾ÍÊǹصôÆäËûËùÓеĴ°¸ñ£©¡£
 
-ÄÇÊǸö CONTROL-x ºóÃæ¸úÖøÊý×Ö 1 ¡£C-x 1 ½«º¬ÓÐÓαêµÄ´°¸ñÀ©´óµ½Õû¸öÓ©Ä»¡£
-Ëü½«ËùÓÐÆäËûµÄ´°¸ñ³ýÈ¥¡£
+Ò²¾ÍÊÇÏÈ°´ CONTROL-x È»ºóÔÙ°´ 1¡£C-x 1 »á±£Áô¹â±êËùÔڵĴ°¸ñ£¬²¢½«ÆäÀ©´ó
+µ½Õû¸öÆÁÄ»£¬Í¬Ê±¹ØµôËùÓÐÆäËüµÄ´°¸ñ¡£
 
->> Òƶ¯Óα굽±¾Ðв¢ÇÒ¼üÈë C-u 0 C-l¡£
->> ¼üÈë CONTROL-h k CONTROL-f¡£
-   ¿´¿´Õâ¸ö´°¸ñÔÚµ±Ò»¸öеĴ°¸ñ³öÏÖ
-   £¨ÒÔÏÔʾÓÐ¹Ø CONTROL-f Ö¸ÁîµÄÎĵµÊ±£©£¬ËüÊÇÈçºÎËõСµÄ¡£
+>> °Ñ¹â±êÒƵ½±¾ÐÐÈ»ºóÊäÈë C-u 0 C-l¡£
+
+>> ÊäÈë CONTROL-h k CONTROL-f¡£¹Û²ìµ±Ò»¸öд°¸ñ³öÏÖʱµ±Ç°´°¸ñ£¨ÓÃÀ´ÏÔʾ
+   CONTROL-f ÃüÁîµÄÎĵµ£©ÊÇÈçºÎËõСµÄ¡£
 
->> ¼üÈë C-x 1 ÒÔʹÎĵµÁÐ±í´°¸ñÏûʧ¡£
+>> ÊäÈë C-x 1 ¹ØµôÎĵµ´°¸ñ¡£
 
-Õâ¸öÖ¸Áî²¢²»ÏñÄúÏÈÇ°Ëùѧ¹ýµÄÖ¸ÁîÄǰ㣬Ëü°üÀ¨ÁËÁ½¸ö×ÖÔª¡£ËüÊÇÒÔ×ÖÔª 
-CONTROL-x ×÷Ϊ¿ªÊ¼¡£ÓÐÒ»Õû¸öϵÁеÄÖ¸ÁîÊÇÒÔ CONTROL-x ×÷Ϊ¿ªÊ¼£»ËüÃÇÖ®
-ÖÐÓÐÐí¶àÊÇÓ롸´°¸ñ¡¢µµ°¸¡¢ÔÝ´æÇøÒÔ¼°Ïà¹ØÊÂÎÓйصġ£ÕâЩָÁîÓÐ 2 ¡¢ 
-3 »ò 4 ¸ö×ÖÔª³¤¡£
+Õâ¸öÃüÁî¸úÏÈǰѧµ½µÄÃüÁ̫һÑù£¬ÒòΪËü°üº¬ÁËÁ½¸ö×Ö·û£¬ÒÔ CONTROL-x ¿ª
+ʼ¡£ÓÐһϵÁÐÃüÁÊÇÒÔ CONTROL-x ¿ªÊ¼µÄ£¬ÕâЩÃüÁîÐí¶à¶¼¸ú¡°´°¸ñ¡¢Îļþ¡¢
+»º³åÇø¡¾»º³åÇø£¨buffer£©»áÔÚºóÎÄÏêϸ½éÉÜ¡¿¡±µÈµÈÖîÈç´ËÀàµÄ¶«Î÷Óйأ¬Æä
+ÖÐÓÐЩÃüÁî¿ÉÄÜÓÐ 2 ¸ö¡¢3 ¸ö»òÕß 4 ¸ö×Ö·û³¤¡£
 
 
-* ²åÈëÓëɾ³ý£¨ INSERTING AND DELETING £©
-----------------------------------------
+* ²åÈëÓëɾ³ý£¨INSERTING AND DELETING£©
+--------------------------------------
+
+²åÈëÎÄ×ֺܼòµ¥£¬ÇüüÅ̾ÍÐÐÁË¡£ÄãÄÜ¿´µ½µÄ×Ö·û£¬±ÈÈç A¡¢7¡¢* µÈµÈ£¬¶¼±»
+Emacs ÊÓΪÎÄ×Ö²¢ÇÒ¿ÉÒÔÖ±½Ó²åÈë¡£Çà <Return>£¨»Ø³µ¼ü£©»á²åÈëÒ»¸ö»»Ðзû¡£
 
-Èç¹ûÄúÏëÒª²åÈëÎÄ×Ö£¬°ÑËü¼üÈë¾ÍÊÇÁË¡£Äú¿ÉÒÔ¿´µ½µÄ×ÖÔª£¬ÏñÊÇ A ¡¢ 7 ¡¢ * 
-µÈ£¬±» Emacs ÊÓΪÎÄ×Ö²¢ÇÒ¿ÉÒÔÖ±½Ó²åÈë¡£¼üÈë <Return> 
-£¨ carriage-return ¼ü£©ÒÔ²åÈëÒ»¸ö Newline ×ÖÔª¡£
+Äã¿ÉÒÔÓà <Delback> À´É¾³ý×îºóÊäÈëµÄµÄÒ»¸ö×Ö·û£¬Õâ¸ö¸úÄãÔÚ Emacs Ö®ÍâµÄ
+Ó÷¨Ó¦¸ÃÒ»Ñù¡£Ò»°ãÀ´Ëµ <Delback> ¾ÍÊÇλÓÚ <Return> ¼üÉÏ·½Ä³´¦µÄÒ»¸ö´óºÅ
+¼ü£¬Í¨³£±»±êʾΪ¡°Delete¡±¡¢¡°Del¡±»òÕß¡°Backspace¡±¡£
 
-Äú¿ÉÒÔ¼üÈë <Delback> ÒÔɾ³ýÄú×îºó¼üÈëµÄ×ÖÔª¡£<Delback> ÊÇÒ»¸öµÄ¼üÅ̼ü 
--- ¾ÍÊÇÄúͨ³£ÔÚ Emacs Í⣬ʹÓÃÀ´¡¸É¾³ýÄú×îºó¼üÈë×ÖÔª¡¹µÄͬһ¸ö¡£Ò»°ãÀ´
-˵ÊǸöÔÚ <Return> ÉÏ·½ÊýÐеĴó¼ü£¬Í¨³£±êʾΪ¡ºDelete¡»¡¢¡ºDel¡»»ò
-¡ºBackspace¡»¡£
+Èç¹ûÄãÕÒµ½Á˱ê×Å¡°Backspace¡±µÄ¼ü£¬ÄÇôËüÓ¦¸Ã¾ÍÊÇ <Delback>£»¼´±ãÄãÓÖÔÚ
+¼üÅÌÆäËüµØ·½ÕÒµ½ÁËÒ»¸ö±êʾΪ¡°Del¡±µÄ¼ü£¬ÄÇôËüÒ²Ó¦¸Ã²»ÊÇ <Delback>¡£
+
+Ò»ÖÖ¸üͨÓõÄ˵·¨ÊÇ£¬<Delback> ½«Î»ÓÚ¹â±êÇ°µÄÒ»¸ö×Ö·ûɾ³ý¡£
 
-Èç¹ûÔÚÄÇÀïÓиö±êʾΪ¡ºBackspace¡»µÄ´ó¼ü£¬ÄÇôÄÇÒ»¸ö¾ÍÊÇÄúʹÓÃÀ´×÷Ϊ 
-<Delback> µÄ¼üÁË¡£Ä³¸öµØ·½¿ÉÄÜÒ²»áÓÐÁíÒ»¸ö±êʾΪ¡ºDelete¡»µÄ¼ü£¬µ«ÄǸö
-²¢²»ÊÇ <Delback> ¡£
+>> ÏÖÔÚ¾ÍÊÔÊÔ¡ª¡ªÇõã×Ö£¬È»ºó°´¼¸Ï <Delback> ɾ³ýËüÃÇ¡£
+   ²»Óõ£ÐÄÄã»áÐÞ¸ÄÎļþ£¬Äã¸Éʲô¶¼Ã»¹Øϵ£¬ÕâÀï¾ÍÊÇר¸øÄãÁ·Ï°Óõġ£
 
-¸üÒ»°ãµØ˵£¬ <Delback> ½«Î»ì¶Ä¿Ç°ÓαêλÖÃÇ°Ò»¸ö×ÖÔª¼ÓÒÔɾ³ý¡£
+Èç¹ûÒ»ÐÐÎÄ×ֺܳ¤¡¢³¬³öÁË´°¸ñµÄ¿í¶È£¬ÏÔʾ²»ÏµIJ¿·Ö»áÔÚ½ôÁÚµÄÏÂÒ»ÐмÌÐø
+ÏÔʾ¡£Õâʱ»áÓÐÒ»¸ö·´Ð±Ïߣ¨¿ØÖÆ̨ÏÂÊÇ·´Ð±Ïߣ¬Èç¹ûÄãÓÃͼÐδ°¿Úϵͳ£¬ÔòÓ¦
+¸ÃÊÇÒ»¸öССµÄתÍä¼ýÍ·£©ÏÔʾÔÚÓÒ±ßÑØ£¬±íÃ÷ÕâÊÇijһÐеĽÓÐøÏÔʾ¡£
 
->> ÏÖÔÚ×ö -- ¼üÈëһЩ×ÖÔª£¬È»ºó¼üÈ뼸´Î <Delback> À´É¾³ýËüÃÇ¡£
-   ²»Òªµ£ÐÄÕâ¸öµµ°¸»á±»¸ü¶¯£»Äú²»»áÓ°Ïìµ½Ô­À´µÄ¿ìËÙÖ¸ÄÏ¡£
-   £¨ÄúÏÖÔÚ¿´µ½µÄ£©ÕâÒ»¸öÊÇÄúµÄ¸öÈË¿½±´¡£
+>> ÊäÈëÎÄ×Ö£¬Ò»Ö±µ½ÆÁÄ»µÄÓұ߽磬Ȼºó¼ÌÐø£¬Äã»á¿´µ½Ò»¸ö½ÓÐøÐгöÏÖ¡£
+
+>> Óà <Delback> ɾµôһЩÎÄ×Ö£¬Ö±µ½´ËÐ㤶ÈСÓÚ´°¸ñ¿í¶È£¬½ÓÐøÐоÍÏûʧÁË¡£
 
-µ±Ò»ÐÐÎÄ×Ö±äµÃ±È¡¸ÔÚ´°¸ñÖеÄÒ»ÐС¹³¤Ê±£¬ÕâÒ»ÐÐÎÄ×ֻᡸ½ÓÐø¡¹µ½µÚ¶þÐд°
-¸ñÐС£Õâʱһ¸ö·´Ð±Ïß¡¸\¡¹£¨»òÈç¹ûÄúʹÓô°¿Ú»¯µÄÏÔʾ£¬ÔòÊÇÒ»¸öССÍäÍä
-µÄ¼ýÍ·£©»áλÔÚÆäÓұ߽çÒÔÖ¸³ö´ËÐнÓÐøÖø¡£
-
->> ²åÈëÎÄ×Ö£¬Ò»Ö±µ½Äú´ïµ½Óұ߽磬ȻºóÔÙ¼ÌÐø²åÈë¡£
-   Äú»á¿´µ½Ò»¸ö½ÓÐøÐгöÏÖ¡£
+Äã¿ÉÒÔÏñɾ³ýÆäËû×Ö·ûÒ»Ñùɾ³ý»»Ðзû¡£É¾³ýÁ½ÐÐÖмäµÄ»»Ðзû»á½«Á½Ðкϲ¢³É
+Ò»ÐС£Èç¹ûºÏ²¢µÄ½á¹ûʹÕâÒ»ÐÐÌ«³¤£¬³¬³öÁË´°¸ñµÄ¿í¶È£¬Ëü¾Í»áÒÔÒ»¸ö½ÓÐøÐÐ
+À´ÏÔʾ¡£
 
->> ʹÓà <Delback> ɾ³ýһЩÎÄ×Ö£¬Ö±µ½´ËÐÐÔٴγÉΪһ¸ö´°¸ñÐС£
-   ½ÓÐøÐÐÏûʧÁË¡£
+>> Òƶ¯¹â±êµ½±¾ÐеĿªÍ·²¢ÊäÈë <Delback>¡£
+   Õâʱ±¾ÐÐÓëÆäÇ°Ò»Ðн«±»ºÏ²¢ÎªÒ»ÐС£
 
-Äú¿ÉÒÔÏñɾ³ýÆäËû×ÖÔªÒ»ÑùµØɾ³ý Newline ×ÖÔª¡£½«Î»ÔÚÁ½ÐÐÖÐµÄ Newline ×Ö
-Ԫɾ³ý»áÈÃËüÃǺϲ¢³ÉΪһÐС£Èç¹ûºÏ²¢µÄ½á¹ûʹÕâÒ»ÐÐÌ«³¤£¬ÒÔÖÂÎÞ·¨·ûºÏ´°
-¸ñµÄ¿í¶È£¬Ëü»áÒÔÒ»¸ö½ÓÐøÐÐÀ´ÏÔʾ¡£
+>> ÊäÈë <Return> ÖØвåÈëÄã¸Õ²Åɾ³ýµÄ»»Ðзû¡£
 
->> Òƶ¯Óα굽±¾ÐеĿªÍ·²¢¼üÈë <Delback>¡£
-   Õâ»á½«±¾ÐÐÓëÆäÇ°Ò»ÐнáºÏΪһÐС£
-
->> ¼üÈë <Return> ÒÔÖØвåÈëÄú¸Õ²Åɾ³ýµÄ Newline ×ÖÔª¡£
+Ç°Ãæ˵¹ý£¬´ó²¿·ÖµÄ Emacs ÃüÁ¿ÉÒÔÖ¸¶¨Öظ´´ÎÊý£¬ÕâÆäÖÐÒ²°üÀ¨ÊäÈë×Ö·ûµÄ
+ÃüÁî¡£Öظ´Ö´ÐÐÊäÈë×Ö·ûµÄÃüÁîʵ¼ÊÉϾÍÊÇÊäÈë¶à¸öÒ»ÑùµÄ×Ö·û¡£
 
-¼ÇµÃ´ó²¿·ÝµÄ Emacs Ö¸Á¿ÉÒÔ¸øÓèÒ»¸öÖظ´¼ÆÊý£¨ repeat count £©£»ÕâÒ²
-°üÀ¨ÁËÎÄ×Ö×ÖÔª¡£Öظ´Ò»¸öÎÄ×Ö×ÖÔª»á½«Ëü²åÈëÊý´Î¡£
+>>  ÊÔÊÔ C-u 8 *£¬Õ⽫»á²åÈë ********¡£
 
->>  ÏÖÔÚ¾ÍÊÔһϠ-- ¼üÈë C-u 8 * ÒÔ²åÈë ********¡£
+ºÃ£¬ÏÖÔÚÄãÓ¦¸ÃÒѾ­ÕÆÎÕÁË×î»ù±¾µÄµÄÎı¾²åÈëºÍÐ޸ŦÄÜ£¬Æäʵɾ³ý»¹¿ÉÒÔ
+¡°ÒÔ´ÊΪµ¥Î»¡±½øÐУ¬ÏÂÃæÊÇÒ»¸ö¹ØÓÚ¡°É¾³ý¡±²Ù×÷µÄС½á£º
 
-ÄúÏÖÔÚÒѾ­Ñ§µ½ÁË¡¸¼üÈë¸öʲô¶«Î÷½ø Emacs ÒÔ¼°ÐÞÕý´íÎ󡹵Ĵ󲿷ݻù±¾·½
-·¨¡£ÄúÒ²¿ÉÒÔ¡¸ÒÔ×Ö»òÐÐΪµ¥Î»¡¹µØɾ³ý¡£ÕâÀïÓзݹØ춡¸É¾³ý²Ù×÷¡¹µÄÕªÒª£º
+        <Delback>    ɾ³ý¹â±êÇ°µÄÒ»¸ö×Ö·û
+        C-d          ɾ³ý¹â±êºóµÄÒ»¸ö×Ö·û
 
-        <Delback>     ɾ³ýÓαêËùÔÚµÄ Ç°Ò»¸ö×ÖÔª
-        C-d          ɾ³ýÓαêËùÔÚµÄ ºóÒ»¸ö×ÖÔª
+        M-<Delback>  ÒƳý¹â±êÇ°µÄÒ»¸ö´Ê
+        M-d          ÒƳý¹â±êºóµÄÒ»¸ö´Ê
 
-        M-<Delback>   ɾ³ýÓαêËùÔÚµÄ Ç°Ò»¸ö×Ö
-        M-d          ɾ³ýÓαêËùÔÚµÄ ºóÒ»¸ö×Ö
+        C-k          ÒƳý´Ó¹â±êµ½¡°ÐÐβ¡±¼äµÄ×Ö·û
+        M-k          ÒƳý´Ó¹â±êµ½¡°¾äβ¡±¼äµÄ×Ö·û
 
-        C-k          ɾ³ý´ÓÓαêËùÔÚµ½¡¸ÐÐβ¡¹¼äµÄ×ÖÔª
-        M-k          ɾ³ý´ÓÓαêËùÔÚµ½¡¸¾äβ¡¹¼äµÄ×ÖÔª
+¡¾¿ÉÄÜÄãÒѾ­×¢Òâµ½ÁË¡°É¾³ý£¨delete£©¡±ºÍ¡°ÒƳý£¨kill£©¡±µÄÓôÊÇø±ð£¬ºó
+ÎÄ»áÓÐÏêϸ˵Ã÷¡£¡¿
 
-×¢Ò⡸<Delback> ºÍ C-d¡¹»¹ÓС¸M-<Delback> ºÍ M-d¡¹ÊÇƽÐеØ×Ô C-f ºÍ 
-M-f À©³ä³öÀ´µÄ£¨àÅ£¬<Delback> ²¢²»ÊÇ¿ØÖÆ×ÖÔª£¬µ«ÊÇûʲôºÃµ£Ðĵģ©¡£
-C-k ºÍ M-k ÔÚijÖ̶ֳÈÉÏÓë C-e ºÍ M-e Ò»Ñù£¬Èç¹û°Ñ¡¸Ò»ÐС¹ºÍ¡¸Ò»¾ä¡¹×÷
-ΪÀà±ÈµÄ»°¡£
+×¢Òâ¡°<Delback> ºÍ C-d¡±»¹ÓС°M-<Delback> ºÍ M-d¡±ÊǸù¾ÝÇ°Êö¹ßÀý´Ó C-f
+ºÍ M-f ÑÜÉú³öÀ´µÄ£¨Æäʵ<Delback>²»ÊÇ¿ØÖÆ×Ö·û£¬ÎÒÃÇÏȺöÂÔÕâÒ»µã£©¡£C-k
+ºÍ M-k µÄ¹ØϵÔÚijÖ̶ֳÈÉÏÓë C-e ºÍ M-e Ò»Ñù¡ª¡ªÈç¹û°Ñ¡°Ò»ÐС±ºÍ¡°Ò»¾ä¡±
+×÷Ò»¸öÀà±ÈµÄ»°¡£
 
-ÄúÒ²¿ÉÒÔÖ»ÒÔÒ»ÖÖ·½·¨À´É¾³ý»º³åÇøÄÚµÄÈκβ¿·Ý£¬ÏÈÒƶ¯µ½ÄúÏëҪɾ³ýµÄ²¿·Ý
-µÄÒ»¶Ë£¬È»ºó¼üÈë C-@ »ò C-SPC £¨ÈÎÒ»¸ö¼´¿É£©¡££¨ SPC Ö¸µÄÊÇ Space Bar 
-£©ÔÙÒƵ½ÄDz¿·ÝµÄÁíÒ»¶Ë£¬½ÓÖø¼üÈë C-w ¡£ÕâÑù¾Í»á°Ñ½éì¶ÕâÁ½¸öλÖüäµÄËù
-ÓÐÎÄ×Öɾ³ý¡£
+ÄãÒ²¿ÉÒÔÓÃÒ»ÖÖͳһµÄ°ì·¨À´ÒƳý»º³åÇøÀïµÄÈκÎÒ»²¿·Ö£ºÊ×ÏȰѹâ±êÒƶ¯µ½Äã
+ÏëÒªÒƳýµÄÇøÓòµÄÒ»¶Ë£¬È»ºó°´ C-@ »ò C-SPC£¨ÈÎÒ»¼´¿É£¬SPCÖ¸¿Õ¸ñ£©¡¾×¢Ò⣬
+C-SPC ÍùÍù±»ÖÐÎÄÓû§É趨³ÉÊäÈë·¨Èȼü£¬Èç¹ûÕâÑù£¬C-SPC ¾Í±»ÏµÍ³À¹½Ø¶øÎÞ
+·¨ÊäÈë¸ø Emacs ÁË£¬Òò´ËÕâÀﻹÊÇÍƼöʹÓÃC-@¡£¡¿£¬È»ºóÔÙÒƶ¯µ½ÁíÒ»¶Ë£¬ÔÙ
+°´ C-w ¾Í¿ÉÒÔ°ÑλÓÚÕâÁ½µãÖ®¼äµÄËùÓÐÎÄ×ÖÒƳýÁË¡£
 
->> Òƶ¯Óα굽ÉÏÒ»¶Î¿ªÍ·µÄ¡¸Äú¡¹×Ö¡£
->> ¼üÈë C-SPC ¡£ Emacs Ó¦¸Ã»áÔÚÓ©Ä»µÄÏ·½ÏÔʾһ¸ö¡¸Mark set¡¹Ñ¶Ï¢¡£
->> Òƶ¯Óα굽µÚ¶þÐÐÖеġ¸¶Ë¡¹×Ö¡£
->> ¼üÈë C-w ¡£ÕâÑù»á°Ñ´Ó¡¸Äú¡¹¿ªÊ¼µ½¸ÕºÃ¡¸¶Ë¡¹Ö®Ç°µÄÎÄ×Öɾ³ý¡£
+>> Òƶ¯¹â±êµ½ÉÏÒ»¶Î¿ªÍ·µÄ¡°Ä㡱×Ö¡£
+>> ÊäÈë C-@ ¡£Emacs Ó¦¸Ã»áÔÚÆÁÄ»µÄÏ·½ÏÔʾһ¸ö¡°Mark set¡±µÄÏûÏ¢¡£
+>> Òƶ¯¹â±êµ½µÚ¶þÐÐÖеġ°¶Ë¡±×Ö¡£
+>> ÊäÈë C-w£¬¾Í»á°Ñ´Ó¡°Ä㡱¿ªÊ¼µ½¡°¶Ë¡±Ö®Ç°µÄÎÄ×ÖÈ«²¿ÒƳý¡£
 
-ҪעÒâµÄÊÇ¡¸É±µô£¨ killing £©¡¹ºÍ¡¸É¾³ý£¨ deleting £©¡¹µÄ²»Í¬ÔÚ춱»É±
-µôµÄ¿ÉÒÔÀ­»Ø£¬¶ø±»É¾³ýµÄÔò²»ÄÜ¡£¡¾ÓеãÄÑÒÔÀí½â£¬Äú¿ÉÒÔÕâôÏ룺(1)¡¸±»
-ɱµôµÄ¡¹Éдæʬ¹Ç£¬¶ø¡¸±»É¾³ýµÄ¡¹Ôòʬ¹ÇÎÞ´æÁË£¡¿É¼ûµÃ¶ÔµçÄÔ×ÊÁÏÀ´Ëµ£¬
-¡¸É¾³ý¡¹±È¡¸É±µô¡¹ÑÏÖضàÁË¡£(2)ʵ¼ÊÉÏ£¬¾ÍË㱻ɾ³ýÁË£¬ÎÒÃÇ»¹ÊÇÓм¼Êõ¿É
-ÒÔ°ÑËü¾È»ØÀ´£¬ÓÈÆäÊÇÎÄ×Ö×ÊÁÏ£¬Ç°ÌáÊÇɾ³ýºó²»ÄܽøÐÐʵÌå¼ÇÒäÌåµÄ¸ñʽ»¯¶¯
-×÷¡£µ«Õâ¶Ôì¶Ò»°ãʹÓÃÕ߶øÑÔÊDz»¿ÉÄܵģ¬Òò´Ë¾Í²»¿¼ÂÇÕâÇéÐÎÁË¡£¡¿ÖØвåÈë
-±»É±µôµÄÎÄ×Ö³ÆΪ¡¸À­»Ø£¨ yanking £©¡¹¡£Ò»°ã¶øÑÔ£¬¿ÉÒÔÒƳýµôºÜ¶àÎÄ×ÖµÄ
-Ö¸Áî»á°ÑÄÇЩÎÄ×Ö´¢´æÆðÀ´£¨ËüÃÇÉ趨³ÉÄú¿ÉÒÔ½«ÎÄ×ÖÀ­»Ø£©£¬¶øÄÇЩֻÊÇɾ³ý
-Ò»¸ö×ÖÔª»òÕßÖ»ÊdzýÈ¥¿Õ°×Ðлò¿Õ°×µÄÖ¸ÁÔò²»»á´¢´æÕâЩ±»É¾³ýµÄÎÄ×Ö£¨Òò
-´ËÄú²»Äܽ«ÄÇÎÄ×ÖÀ­»Ø£©¡£
+×¢Òâ,¡°ÒƳý£¨kill£©¡±ºÍ¡°É¾³ý£¨delete£©¡±µÄ²»Í¬ÔÚÓÚ±»ÒƳýµÄ¶«Î÷¿ÉÒÔÕÒ»Ø
+À´£¬¶ø±»É¾³ýµÄ¾Í²»ÐÐÁË¡£¡¾Êµ¼ÊÉÏ£¬ÒƳýµôµÄ¶«Î÷ËäÈ»¿´ÆðÀ´¡°Ïûʧ¡±ÁË£¬µ«
+ʵ¼ÊÉϱ» Emacs ¼Ç¼ÁËÏÂÀ´£¬Òò´Ë»¹¿ÉÒÔÕÒ»ØÀ´£»¶øɾ³ýµôµÄ¶«Î÷ËäȻҲ¿ÉÄÜ»¹
+ÔÚÄÚ´æÀµ«ÊÇÒѾ­±»Emacs¡°Å×Æú¡±ÁË£¬ËùÒÔ¾ÍÕÒ²»»ØÀ´ÁË¡£¡¿ÖØвåÈë±»ÒƳý
+µÄÎÄ×Ö³ÆΪ¡°Õٻأ¨yank£©¡±¡£Ò»°ã¶øÑÔ£¬ÄÇЩ»áÈ¥³ýºÜ¶àÎÄ×ÖµÄÃüÁî»á°ÑÈ¥³ý
+µôµÄÎÄ×Ö´¢´æÆðÀ´£¨ËüÃDZ»É趨³ÉÁË¡°¿ÉÕٻء±£©£¬¶øÄÇЩֻÊÇÈ¥³ýÒ»¸ö×Ö·û»ò
+ÕßÖ»ÊÇÈ¥³ý¿Õ°×µÄÃüÁî¾Í²»»á´¢´æÄÇЩ±»È¥³ýµôµÄ¶«Î÷£¨Òò´ËÄã¾ÍÎÞ·¨Õٻأ©¡£
 
->> Òƶ¯Óα굽һ·Ç¿Õ°×ÐеĿªÊ¼¡£
-   È»ºó¼üÈë C-k ɱµôÔÚÄÇÒ»ÐÐÉϵÄÎÄ×Ö¡£
->> µÚ¶þ´Î¼üÈë C-k¡£Äú½«»á¿´µ½Ëüɱµô¸úÔÚÄÇÒ»ÐкóÃæµÄ Newline ×ÖÔª¡£
+>> Òƶ¯¹â±êµ½Ò»·Ç¿Õ°×ÐеÄÐÐÍ·£¬È»ºóÊäÈë C-k ÒƳýÄÇÒ»ÐÐÉϵÄÎÄ×Ö¡£
+
+>> ÔÙ´Î C-k£¬Äã¿ÉÒÔ¿´µ½ËüÒƳýÁ˸úÔÚÄÇÒ»ÐкóÃæµÄ»»Ðзû¡£
 
-Çë×¢Òâµ¥¶ÀµÄ C-k »á°ÑÒ»ÐеÄÄÚÈÝɱµô£¬¶øµÚ¶þ¸ö C-k Ôò»áɱµôÄÇÒ»Ðб¾Éí£¬
-²¢ÇÒʹµÃËùÓÐÆäËûµÄÐÐÏòÉÏÒƶ¯¡£C-k ÒÔºÜÌرðµÄ·½Ê½À´´¦ÀíÊý×Ö²ÎÊý£¬Ëü»áɱ
-µôºÜ¶àÐÐÒÔ¼°ËüÃǵÄÄÚÈÝ£¬Õâ²»½ö½öÊÇÖظ´¶øÒÑ£¬C-u 2 C-k »á°ÑÁ½ÐÐÒÔ¼°ËüÃÇ
-µÄ Newline ×ÖԪɱµô£»Èç¹ûÖ»ÊǼüÈë C-k Á½´Î²¢²»»áÕâÑù¡£
+×¢Ò⣬µ¥¶ÀµÄ C-k »á°ÑÒ»ÐеÄÄÚÈÝÒƳý£¬¶øµÚ¶þ¸ö C-k Ôò»áÒƳý»»Ðзû£¬²¢Ê¹
+ÆäºóËùÓеÄÐж¼ÏòÉÏÒƶ¯¡£C-k ´¦ÀíÊý×Ö²ÎÊýµÄ·½Ê½ºÜÌرð£¬Ëü»á°Ñ²ÎÊýÖ¸¶¨µÄ
+ÄÇô¶àÐÐÁ¬Í¬ÆäºóµÄ»»ÐзûÒ»ÆðÒƳý£¬¶ø²»½ö½öÊÇÖظ´ C-k ¶øÒÑ¡£±ÈÈç C-u 2
+C-k »á°ÑÁ½ÐÐÒÔ¼°ËüÃǵĻ»ÐзûÒƳý£»¶øÈç¹ûÖ»ÊÇÊäÈë C-k Á½´ÎÏÔÈ»²»ÊÇÕâ¸ö½á
+¹û¡£
 
-½«±»É±µôµÄÎÄ×ֻظ´µÄ¶¯×÷³ÆΪ¡¸À­»Ø£¨ yanking £©¡¹¡££¨°ÑËüÏëÏñ³ÉÄú°Ñ±ð
-ÈË´ÓÄúÉíÉ϶áÈ¥µÄ¶«Î÷ÃÍÁ¦µØÀ­»ØÀ´£©Äú¿ÉÒÔÔÚÄúɾ³ýÎÄ×ֵĵط½À­»Ø£¬Ò²¿ÉÒÔ
-ÔÚÎÄ×ÖµÄÆäËûµØ·½À­»Ø¡£Äú¿ÉÒÔÀ­»ØÊý´ÎͬÑùµÄÎÄ×Ö£¬ÒÔÖÆ×÷ËüµÄÊý·Ý¿½±´¡£
+½«±»ÒƳýµÄÎÄ×Ö»Ö¸´µÄ¶¯×÷³ÆΪ¡°Õٻأ¨yanking£©¡±¡££¨¾ÍºÃÏñÄã°Ñ±ðÈË´ÓÄãÉí
+±ßÒÆ×ߵĶ«Î÷ÓÖÃÍÁ¦µØÀ­»ØÀ´¡££©Äã¿ÉÒÔÔÚÄãɾ³ýÎÄ×ֵĵط½Õٻأ¬Ò²¿ÉÒÔÔÚ±ð
+µÄµØ·½Õٻأ¬»¹¿ÉÒÔ¶à´ÎÕÙ»ØͬÑùµÄÎÄ×ÖÒԵõ½ËüµÄ¶à¸ö¿½±´¡£
 
-À­»ØµÄÖ¸ÁîΪ C-y¡£Ëü»áÔÚÄ¿Ç°ÓαêµÄλÖÃÖØвåÈë×îºóɱµôµÄÎÄ×Ö¡£
+ÕٻصÄÃüÁîÊÇ C-y¡£Ëü»áÔÚ¹â±êËùÔÚ´¦²åÈëÄã×îºóÒƳýµÄÎÄ×Ö¡£
 
->> ÊÔÊÔ¿´£»¼üÈë C-y ½«ÎÄ×ÖÀ­»Ø¡£
+>> ÊÔÊÔ¿´£¬ÊäÈë C-y ½«ÎÄ×ÖÕٻء£
 
-Èç¹ûÄúÁ¬ÐøµØ×öÁËÊý´Î C-k£¬ËùÓб»É±µôµÄÎÄ×Ö¶¼»á±»´¢´æÔÚÒ»Æð£¬Òò´Ë×öÒ»´Î 
-C-y ¾Í»á°ÑËùÓÐÕâЩÐж¼À­»ØÀ´¡£
+Èç¹ûÄãÒ»´ÎÁ¬°´Á˺ü¸Ï C-k£¬ÄÇôËùÓб»ÒƳýµÄÐлᱻ´æ´¢ÔÚÒ»Æð£¬Ö»ÒªÒ»¸ö
+C-y ¾Í¿ÉÒÔ°ÑËüÃǶ¼Õٻء£
 
->> ÏÖÔÚ×öһϣ¬¼üÈë C-k Êý´Î¡£
+>> ÔÚÕâÀïÊÔÊÔ£¬Á¬Ðø°´¼¸´Î C-k¡£
 
-ÏÖÔÚÒª»Ø¸´ÄÇЩɱµôµÄÎÄ×Ö£º
+ÏÖÔÚÔÙÀ´»Ö¸´¸Õ¸Õ±»ÎÒÃÇÒƳýµÄÎÄ×Ö£º
 
->> ¼üÈë C-y¡£È»ºó°ÑÓαêÍùÏÂÒƶ¯¸ö¼¸ÐУ¬ÔÙÒ»´Î¼üÈë C-y¡£
-   ÄúÏÖÔÚÖªµÀÈçºÎ¸´ÖÆijЩÎÄ×ÖÁË¡£
+>> °´ C-y¡£È»ºó°Ñ¹â±êÍùÏÂÒƶ¯¼¸ÐУ¬ÔÙ°´Ò»´Î C-y¡£
+   ÏÖÔÚÄãÓ¦¸ÃÖªµÀÔõô¸´ÖÆÎÄ×ÖÁË¡£
+
+C-y ¿ÉÒÔ°Ñ×î½üÒƳýµÄÎÄ×ÖÕٻأ¬µ«Èç¹ûÄãÏëÕٻصĶ«Î÷²»ÊÇ×î½üÒƳýµÄ£¬¸ÃÔõ
+ô°ìÄØ£¿ËüÃǵ±È»Ã»Óжª£¬Äã¿ÉÒÔÓà M-y À´ÕÙ»ØËüÃÇ¡£ÔÚÓà C-y ÕÙ»Ø×î½üÒƳý
+µÄÎÄ×ÖÖ®ºó£¬½ô½Ó×ÅÔÙÓà M-y ¾Í¿ÉÒÔÕÙ»ØÔÙÇ°Ò»´Î±»ÒƳýµÄÎÄ×Ö£¬ÔÙ°´Ò»´Î
+M-y ÓÖ¿ÉÒÔÕÙ»ØÔÙÉÏÒ»´ÎµÄ£¬Òò´ËÖ»Òª¶à°´¼¸´Î M-y ¾Í¿ÉÒÔÕÒµ½ÄãÏëÒªÕٻصĶ«
+Î÷ÁË¡£ÕÒµ½ÁËÖ®ºó£¬ÄãʲôҲ²»ÓÃ×ö£¬°ÑËüÃÇÁÀÔÚÄÇÀ¼ÌÐøÄãµÄ±à¼­¾ÍÐÐÁË¡£
 
-Èç¹ûÄúÓÐһЩÎÄ×ÖÏëÒªÀ­»ØÀ´£¬µ«ÊǺóÀ´ÄúÓÖɱÁËijЩ¶«Î÷£¬ÄÇô¸ÃÔõô×öÄØ£¿
-C-y »á°Ñ×î½üɱµôµÄÀ­»ØÀ´£¬µ«ÊÇÏÈÇ°µÄÎÄ×Ö²¢Ã»ÓÐÏûʧ£¬Äú¿ÉÒÔÓà M-y À´»Ø
-µ½Ëü¡£µ±ÄúÒѾ­Ê¹Óà C-y °Ñ×î½üɱµôµÄÀ­»ØÀ´Ö®ºó£¬ÔÙ¼üÈë M-y À´°ÑÕâЩÀ­»Ø
-À´µÄÎÄ×ÖÌ滻ΪÏÈÇ°ËùɱµôµÄ¡£Ò»´ÎÓÖÒ»´ÎµØ¼üÈë M-y »á°ÑÏÈÇ°ÔÙÏÈÇ°Ëùɱµô
-µÄÎÄ×Ö´ø»ØÀ´¡£µ±Äúµ½ÁËÄúÏëÕÒµÄÎÄ×Öʱ£¬Äú²»ÐèÒª×öÈκÎÊÂÀ´±£´æËü£¬Ö»Òª¼Ì
-ÐøÄúµÄ±à¼­£¬°ÑÕâЩÒÑÀ­»ØµÄÎÄ×ÖÁôÔÚÄÇÀï¾ÍºÃ¡£
+Èç¹ûÄãÒ»´Î°´ M-y °´Á˺ܶàÏ£¬Äã¿ÉÄÜ»á»Øµ½Æðʼµã£¬Ò²¾ÍÊÇ×î½üÒƳýµÄÎÄ×Ö¡£
+¡¾¿´µÃ³öÕâʵ¼ÊÉÏÊÇÒ»¸ö»·¡£¡¿
 
-Èç¹ûÄú M-y ×öÁ˺ܶà´Î£¬Äú¿ÉÄÜ»á»Øµ½Æðʼµã£¬Ò²¾ÍÊÇ×î½üɱµôµÄ¡£
-
->> ɱµôÒ»ÐУ¬µ½´¦ÈÆÈÆ£¬ÔÙɱµôÁíÒ»ÐС£
-   È»ºóÓà C-y ½«µÚ¶þ´ÎɱµôµÄÄÇÐдø»ØÀ´¡£
-   È»ºóÔÙÓà M-y£¬Ëü½«»á±»µÚÒ»´ÎɱµôµÄÄÇÐÐÈ¡´ú¡£
-   ÔÙ×ö¼¸´Î M-y ¿´¿´Äú»áµÃµ½Ê²Ã´¡£
-   ²»¼ä¶ÏµØ×ö£¬Ö±µ½µÚ¶þ¸öɱµôÐлØÀ´£¬ÔÙ×ö¸ö¼¸´Î¡£
-   Èç¹ûÄúÏëµÄ»°£¬Äú¿ÉÒÔÊÔÖø¸ø M-y ÕýµÄ»òÊǸºµÄ²ÎÊý¡£
+>> ÒƳýÒ»ÐУ¬Òƶ¯Ò»Ï¹â±ê£¬È»ºóÔÙÒƳýÁíÍâÒ»ÐС£
+   °´ C-y ½«µÚ¶þ´ÎÒƳýµÄÄÇÐÐÕÙ»ØÀ´¡£
+   ½ô½Ó×ÅÔÙ°´ M-y£¬Ëü½«»á±»µÚÒ»´ÎÒƳýµÄÄÇÐÐÈ¡´ú¡£
+   ÊÔ×ÅÔÙ°´¼¸Ï M-y ¿´¿´»á·¢Éúʲô¡£
+   ÔÙ¼ÌÐø£¬Ö±µ½µÚ¶þÐб»ÕÙ»ØÀ´£¬È»ºóÔÙ×ö¸ö¼¸´Î¡£
+   Èç¹ûÄãÔ¸Ò⣬Äã¿ÉÒÔÊÔןø M-y Ö¸¶¨Ò»¸öÕýµÄ»ò¸ºµÄ²ÎÊý¡£
 
 
-* È¡Ïû¶¯×÷£¨ UNDO £©
---------------------
+* ³·Ïú£¨UNDO£©
+--------------
 
-Èç¹ûÄú¶ÔÎÄ×Ö×öÁËһЩ¸Ä±ä£¬ºóÀ´¾õµÃËüÊǸö´íÎó£¬Äú¿ÉÒÔ Undo Ö¸ÁîÈ¡ÏûÕâÒ»
-¸ö¸Ä±ä£¬C-x u¡£
+Èç¹ûÄãÐÞ¸ÄÁËÒ»¶ÎÎÄ×Ö£¬ÓÖ¾õµÃ¸ÄµÃ²»ºÃ£¬¿ÉÒÔÓà undo ÃüÁî½øÐг·Ïú£º
+C-x u¡£
 
-ͨ³£ C-x u »á°ÑÒ»¸öÖ¸ÁîËùÔì³ÉµÄ¸Ä±äÈ¡Ïûµô£»Èç¹ûÄúÔÚÒ»ÐÐÖÐÖظ´ÁËÐí¶à´Î 
-C-x u£¬Ã¿Ò»¸öÖظ´¶¼»áÈ¡Ïû¶îÍâµÄÖ¸Áî¡£
+ͨ³£ C-x u »áÏû³ýÒ»¸öÃüÁîËùÔì³ÉµÄËùÓиı䣻Èç¹ûÄãÔÚÒ»ÐÐÖÐÁ¬Ðø¶à´ÎµØʹÓÃ
+C-x u£¬Äã»á°ÑÒÔÇ°µÄÃüÁîÒ²ÒÀ´Î³·Ïú¡£
 
 µ«ÊÇÓÐÁ½¸öÀýÍ⣺
-(1) ûÓиıäÎÄ×ÖµÄÖ¸Áî²»Ë㣨Õâ°üÀ¨ÁËÓαêÒƶ¯µÄÖ¸ÁÓоíÖáÖ¸Á£»
-(2) ×ÔÐмüÈëµÄ×ÖÔªÒÔһȺһȺ -- ÿȺ×î¶à 20 ¸ö -- À´½øÐд¦Àí¡£
-    £¨ÕâÊÇΪÁ˼õÉÙÄúÔÚÈ¡Ïû¡¸²åÈëÎÄ×Ö¶¯×÷¡¹Ëù±ØÐë¼üÈë C-x u µÄ´ÎÊý£©
+1£© ûÓиıäÎÄ×ÖµÄÃüÁî²»Ë㣨°üÀ¨¹â±êÒƶ¯ÃüÁîºÍ¹ö¶¯ÃüÁ
+2£© ´Ó¼üÅÌÊäÈëµÄ×Ö·ûÒÔ×éΪµ¥Î»¡ª¡ªÃ¿×é 20 ¸ö×Ö·û¡ª¡ªÀ´½øÐд¦Àí¡£
+    £¨ÕâÊÇΪÁ˼õÉÙÄãÔÚ³·Ïú¡°²åÈëÎÄ×Ö¡±¶¯×÷ʱÐèÒªÊäÈë C-x u µÄ´ÎÊý£©
 
->> ÒÔ C-k ½«ÕâÒ»ÐÐɱµô£¬È»ºó¼üÈë C-x u ºóËü»áÔٴγöÏÖ¡£
+>> Óà C-k ½«ÕâÒ»ÐÐÒƳý£¬È»ºóÊäÈë C-x u £¬Ëü»áÔٴγöÏÖ¡£
 
-C-_ ÊÇÁíÒ»¸öÈ¡ÏûÖ¸ÁËüµÄ×÷ÓÃ¾ÍºÍ C-x u Ò»Ñù£¬µ«ÊÇÔÚÒ»ÐÐÖÐËü±È½ÏÈÝÒ×
-¼üÈëÐí¶à´Î¡£C-_ µÄȱµãÊÇÔÚijЩ¼üÅÌÖв»Ì«Çå³þÈçºÎ¼üÈëËü£¬ÕâÒ²ÊÇΪʲôÎÒ
-ÃÇͬʱÌṩ C-x u µÄÔ­Òò¡£ÔÚijЩÖն˻ú£¬Äú¿ÉÒÔ°´×¡ CONTROL ÔÙ¼üÈë / £¬
-À´¼üÈë C-_¡£
+C-_ Ò²Êdz·ÏúÃüÁËüµÄ×÷Óøú C-x u Ò»Ñù£¬µ«ÊÇËü±È½ÏÈÝÒ׶à´ÎÊäÈë¡£C-_ µÄ
+ȱµãÊÇÔÚijЩ¼üÅÌÉÏ¿ÉÄܲ»Ì«ÈÝÒ×°´£¬ÕâÒ²ÕýÊÇÎÒÃÇͬʱÌṩ C-x u µÄÔ­Òò¡£ÔÚ
+ijЩÖÕ¶ËÉÏ£¬Äã¿ÉÒÔ°´×¡ CONTROL ÔÙ°´¡°/¡±À´ÊäÈë C-_¡£
 
-Ò»¸öÊý×Ö²ÎÊý¶Ô C-_ or C-x u À´Ëµ£¬ÊÇ×÷ΪÖظ´µÄ´ÎÊý¡£
+Êý×Ö²ÎÊý¶ÔÓÚ C-_ ºÍ C-x u µÄÒâÒåÊÇÖ´Ðг·ÏúµÄÖظ´´ÎÊý¡£
 
 
-* µµ°¸£¨ FILE £©
-----------------
-
-ΪÁËʹÄú±à¼­µÄÎÄ×ÖÓÀ¾Ã±£´æ£¬Äú±ØÐë°ÑËü·Åµ½Ò»¸öµµ°¸ÖС£²»È»£¬µ±ÄúÀ뿪 
-Emacs ºó£¬Ëü¾Í»áËæÖ®Ïûʧ¡£ÎªÁË°ÑÄúµÄÎÄ×Ö·ÅÔÚµµ°¸ÖУ¬Äú±ØÐëÔÚÄú¼üÈëÕâЩ
-ÎÄ×ÖÇ°¡¸ÕÒ£¨ find £©¡¹µµ°¸¡££¨ÕâÒ²³Æ֮Ϊ¡¸°Ý·Ã£¨ visiting £©¡¹µµ°¸£©
+* Îļþ£¨FILE£©
+--------------
 
-ÕÒÒ»¸öµµ°¸±íʾÄú¿ÉÒÔÔÚ Emacs Öп´µ½µµ°¸µÄÄÚÈÝ¡£´ÓÐí¶à·½ÃæÀ´¿´£¬Ëü¾ÍÏñ
-ÊÇÄúÖ±½Ó±à¼­ÄǸöµµ°¸Ò»Ñù¡£È»¶ø£¬Ö±µ½Äú¡¸´¢´æ¡¹Õâ¸öµµ°¸Ö®Ç°£¬ÄúʹÓà 
-Emacs ±à¼­Ëù×ö³öµÄ¸Ä±ä²¢²»»á±£´æÏÂÀ´¡£Õâ¾ÍÊÇΪʲôµ±Äú²»ÏëҪʱ£¬Äú¿ÉÒÔ
-±ÜÃâÁôÏÂÐ޸ĵ½Ò»°ëµÄµµ°¸ÔÚϵͳÖС£¼´Ê¹µ±Äú´¢´æÁË£¬Emacs Ò²»á°ÑÔ­±¾µÄµµ
-°¸ÒÔÒ»¸ö²»Í¬µÄÃû³Æ±£ÁôÏÂÀ´£¬ÈôÄúÉÔºó¾õµÃÄúµÄ¸Ä±äÊÇÒ»¸ö´íÎóµÄ»°£¬¾Í¿ÉÒÔ
-ʹÓÃËü¡£
+Ïë±£´æ¹¤×÷³É¹û¾ÍÒª¼ÇµÃ´æÅÌ£¬·ñÔòÒ»µ©Í˳ö Emacs Äã±à¼­µÄÎÄ×־Ͷ¼¶ªÁË¡£Òª
+´æÅÌ£¬¾ÍÒªÔڱ༭ǰ¡°Ñ°ÕÒ¡±µ½Ò»¸ö´æÅÌÎļþ¡££¨Õâ¸ö¹ý³Ìͨ³£Ò²±»³ÆΪ¡°·ÃÎÊ¡±
+Îļþ¡££©
+
+Ñ°ÕÒµ½Ò»¸öÎļþÒâζ×ÅÄã¿ÉÒÔÔÚ Emacs Àï²é¿´Õâ¸öÎļþµÄÄÚÈÝ¡£´ÓºÜ¶à½Ç¶È½²£¬
+Õâ¾ÍµÈÓÚÄãÔÚÖ±½Ó±à¼­Õâ¸öÎļþ¡£µ«ÊÇÄãËù×öµÄÐÞ¸ÄÖ»ÓÐÔÚ¡°´æÅÌ¡±µÄʱºò²Å»á
+±»Ð´ÈëÎļþ¡£Ò²ÕýÒòΪÈç´Ë£¬Äã¿ÉÒÔ¶ªÆúÒ»¸ö¸Äµ½Ò»°ëµÄÎļþ¶ø²»±Ø°ÑÕâ¸ö²Ð·Ï
+ÎļþÒ²±£´æµ½¼ÆËã»úÉÏ¡£×îºó¾ÍËãÄãÕæÕý´æÁËÅÌ£¬Emacs Ò²»á°Ñ´æÅÌÇ°µÄÎļþÖØ
+ÃüÃû±£´æ£¬ÒÔ·ÀÄã¸ÄÍêÖ®ºóÓÖÏë·´»Ú¡£
 
-ÔÚ¿¿½üÓ©Ä»µÄÏ·½£¬Äú¿ÉÒÔ¿´µ½ÓÉÆÆÕۺſªÊ¼Óë½áÊøµÄÒ»ÐÐ -- ͨ³£ÊÇÒÔ¡¸--:--
-TUTORIAL.cn¡¹»òÆäËûÀàËƵĶ«Î÷×÷Ϊ¿ªÊ¼¡£ÕâÊÇÓ©Ä»µÄÒ»²¿·Ö£¬Í¨³£ÓÃÀ´±íʾ
-ÄúÕýÔڰݷõĵµ°¸¡£ÏÖÔÚ£¬ÄúÕýÔڰݷõĵµ°¸½Ð×ö¡¸TUTORIAL.cn¡¹£¬ËüÊÇÄú¸ö
-È˵Ŀ½±´¡£µ±ÄúÒÔ Emacs ÕÒ³öÒ»¸öµµ°¸Ê±£¬ÄǸöµµ°¸µÄÃû×־ͻá³öÏÖÔÚÄǸöµØ
-·½¡£
+ÔÚÆÁÄ»µÄÏ·½£¬ÄãÓ¦¸ÃÄܹ»¿´µ½Í·Î²¶¼ÊǶÌÏß¡°-¡±µÄÒ»ÐУ¬Æ俪ͷͨ³£¶¼ÊÇÖîÈç
+¡°--:-- TUTORIAL.cn¡±ÕâÑùµÄ¶«Î÷£¬ÕâЩÎÄ×־ʹú±íÁËÄ㵱ǰÕýÔÚ·ÃÎʵÄÎļþ¡£
+ÏÖÔÚÄã·ÃÎʵÄÎļþ½Ð¡°TUTORIAL.cn¡±£¬ËüÖ»ÊǸøÄã¸öÈËÁÙʱʹÓõÄÒ»¸ö¿½±´¡£Ö»
+ÒªÄãÓà Emacs Ñ°ÕÒµ½Ò»¸öÎļþ£¬ÎļþÃû¾Í»á³öÏÖÔÚÉÏÊöλÖá£
 
-¹Øì¶Ñ°ÕÒµµ°¸µÄÖ¸ÁîÖУ¬ÓÐÒ»¸öºÜÌرðµÄÊÇ£¬Äú±ØÐë˵³öÕâ¸öÄúÏëÒªµÄµµ°¸Ãû³Æ¡£
-ÎÒÃÇ˵Õâ¸öÖ¸Á´ÓÖն˻úÖжÁ½øÁËÒ»¸ö²ÎÊý¡¹¡££¨ÔÚÕâ¸öÀý×ÓÖУ¬Õâ²ÎÊý¾ÍÊÇ
-µµ°¸µÄÃû³Æ£©µ±Äú¼üÈëÕâ¸öÖ¸Áîºó£¬
+Ñ°ÕÒÎļþµÄÃüÁîÓÐÒ»¸öÌرðÖ®´¦£¬ÄǾÍÊÇÄã±ØÐë¸ø³öÎļþÃû¡£ÎÒÃdzÆÕâ¸öÃüÁî
+¡°´ÓÖն˶ÁÈëÁËÒ»¸ö²ÎÊý¡±£¨ÔÚÕâÀÕâ¸ö²ÎÊýÏÔÈ»¾ÍÊÇÎļþÃû£©¡£µ±ÄãÊäÈëÁË
+Õâ¸öÃüÁîÖ®ºó£º
 
-        C-x C-f   ÕÒÒ»¸öµµ°¸
+        C-x C-f   Ñ°ÕÒÒ»¸öÎļþ
 
-Emacs »áÒªÄú¼üÈëµµÃû¡£ÄúËù¼üÈëµÄµµÃû»á³öÏÖÔÚÓ©Ä»µÄµ×ÐС£ÔÚ±»ÓÃÀ´×÷ΪÕâ
-ÖÖÐÎʽµÄÊäÈëʱ£¬µ×Ðб»³ÆΪС»º³åÇø£¨ minibuffer £©¡£Äú¿ÉÒÔʹÓÃÕý³£µÄ 
-Emacs ±à¼­Ö¸ÁîÀ´±à¼­Õâ¸öµµÃû¡£
+Emacs »áÌáʾÄãÊäÈëÎļþÃû¡£ÄãÊäÈëµÄÎļþÃû»á³öÏÖÔÚÆÁÄ»×îµ×¶ËµÄÒ»ÐУ¬ÕâÒ»
+Ðб»³ÆΪС»º³å£¨minibuffer£©£¬ÔÚС»º³åÀïÄã¿ÉÒÔʹÓÃͨ³£µÄ Emacs ±à¼­ÃüÁî
+À´±à¼­ÎļþÃû¡£
 
-µ±ÄúÕýÔÚ¼üÈëµµÃûʱ£¨»òÊÇÈκεÄС»º³åÇøÊäÈëʱ£©£¬Äú¿ÉÒÔÓà C-g Õâ¸öÖ¸Áî
-À´È¡ÏûËü¡£
+ÔÚС»º³åÀïÊäÈëÎļþÃû£¨ÆäʵÊäÈë±ðµÄ¶«Î÷Ò²Ò»Ñù£©Ê±¿ÉÒÔÓà C-g È¡Ïû¡£
 
->> ¼üÈë C-x C-f£¬È»ºó¼üÈë C-g¡£Õâ»áÈ¡ÏûС»º³åÇø£¬
-   ²¢ÇÒÒ²»áÈ¡ÏûʹÓÃÕâ¸öС»º³åÇøµÄ C-x C-f Ö¸Áî¡£
-   Òò´ËÄúûÓÐÕÒÈκεµ°¸¡£
+>> ÊäÈë C-x C-f£¬È»ºóÊäÈë C-g
+   Õâ»á¹ØµôС»º³å£¬Í¬Ê±Ò²»áÈ¡ÏûʹÓÃС»º³åµÄ C-x C-f ÃüÁî¡£
+   µ±È»ÁË£¬ÄãҲûÓÐÕÒÈκÎÎļþ¡£
 
-µ±ÄúÒѾ­¼üÈëÁËÕâ¸öµµÃû£¬Çë¼üÈë <Return> À´½áÊøËü¡£È»ºó C-x C-f Ö¸Áî¾Í
-»á¿ªÊ¼ÔË×÷£¬²¢ÇÒÕÒµ½ÄúËùÑ¡ÔñµÄµµ°¸¡£Ð¡»º³åÇøÔÚµ± C-x C-f Ö¸Áî½áÊøʱ¾Í
-»áÏûʧ¡£
+ÊäÈëÍêÎļþÃûÖ®ºóÓà <Return> ½áÊø£¬È»ºó C-x C-f ÃüÁʼ¹¤×÷²¢ÕÒµ½ÄãÖ¸¶¨
+µÄÎļþ¡£Ð¡»º³åÔÚ C-x C-f ÃüÁî½áÊøÖ®ºóÒ²»áÏûʧ¡£
 
-¹ýÁËÒ»»á¶ù£¬µµ°¸µÄÄÚÈݾͻá³öÏÖÔÚÓ©Ä»£¬È»ºóÄú¾Í¿ÉÒԱ༭ËüµÄÄÚÈÝ¡£µ±ÄúÏë
-ÒªÄúµÄ¸Ä±äÓÀ¾Ã±£´æʱ£¬¼üÈëÕâ¸öÖ¸Á
+Õ£ÑÛ¼äÎļþ¾Í»áÏÔʾÔÚÆÁÄ»ÉÏ£¬Äã¿ÉÒÔ¿ªÊ¼±à¼­ÁË¡£´æÅÌÓÃÕâ¸öÃüÁ
 
-        C-x C-s   ´¢´æÕâ¸öµµ°¸
+        C-x C-s   ´¢´æÕâ¸öÎļþ
 
-Õâ»á°ÑÔÚ Emacs ÖеÄÎÄ×Ö¸´ÖƵ½µµ°¸ÖС£µ±ÄúµÚÒ»´Î×öÕâ¸ö¶¯×÷ʱ£¬Emacs »á
-½«Ô­Ê¼µÄµµ°¸ÖØÐÂÃüÃû³ÉÒ»¸öеÄÃû×Ö£¬ÕâÑùËü²Å²»»áÏûʧ¡£ÐµÄÃû×Öͨ³£»á¼Ó
-È롸~¡¹µ½Ô­Ê¼µµ°¸µÄÃû×ÖºóÃæ¡£
+Õâ¸öÃüÁî°Ñ Emacs ÖеÄÎÄ×Ö´æ´¢µ½ÎļþÖС£µÚÒ»´Î´æÅ̵Äʱºò Emacs »á½«Ô­ÎÄ
+¼þÖØÃüÃûÒÔ±£ÁôÔ­ÎÄ¡£ÖØÃüÃûµÄ¹æÔòͨ³£ÊÇÔÚÔ­ÎļþÃûÖ®ºóÌí¼ÓÒ»¸ö¡°~¡±×Ö·û¡£
 
-µ±´¢´æ½áÊøʱ£¬Emacs »á°ÑдÈëµµ°¸µÄÃû×ÖÁгöÀ´¡£ÄúÓ¦¸Ã¾­³£µØ½øÐд¢´æ£¬Õâ
-Ñù×ÓÈç¹ûϵͳµ±»úʱ£¬Äú¾Í²»»áËðʧ̫¶à¹¤×÷¡£
+´æÅ̽áÊøºó£¬Emacs »áÏÔʾдÈëÎļþµÄÎļþÃû¡£Äã×îºÃÑø³É¾­³£´æÅ̵ÄÏ°¹ß£¬Õâ
+ÑùÔÚϵͳ±ÀÀ£»òÕßËÀ»úµÄʱºòÄã²»»áËðʧ̫¶à¡£
 
->> ¼üÈë C-x C-s ÒÔ´¢´æ±¾¿ìËÙÖ¸ÄϵÄÄúµÄ¿½±´¡£
-   Õâ»á°Ñ¡¸Wrote ...TUTORIAL.cn¡¹Õâ¸öѶϢÏÔʾÔÚÓ©Ä»µÄÏ·½¡£
+>> ÊäÈë C-x C-s °Ñ±¾¿ìËÙÖ¸ÄÏ´æÏÂÀ´¡£
+   Äã»á¿´µ½¡°Wrote ...TUTORIAL.cn¡±ÕâÑùµÄÏûÏ¢ÏÔʾÔÚÆÁÄ»µÄÏ·½¡£
 
-×¢Ò⣺ÔÚijЩϵͳÖУ¬¼üÈë C-x C-s ½«»á°ÑÓ©Ä»¶³½á£¬Äú½«¿´²»µ½´Ó Emacs À´
-µÄÈκÎÊä³ö¡£Õâ±íʾ²Ù×÷ϵͳһ¸ö³ÆΪ¡¸Á÷³Ì¿ØÖÆ¡¹µÄ¡¸¹¦ÄÜ¡¹½« C-s Ö¸ÁîÀ¹
-½Øס£¬²¢ÇÒ²»ÈÃËü´«µ½ Emacs¡£ÒªÈ¡ÏûÓ©Ä»µÄ¶³½á£¬Çë¼üÈë C-q¡£È»ºóµ½ Emacs 
-ʹÓÃÊÖ²áÖп´¿´¶Ô춡¸½¥½øʽËÑÑ°µÄͬʱ½øÈ루 Spontaneous Entry to
-Incremental Search £©¡¹Õâ¸öÖ÷Ì⣬ÒÔÈ¡µÃ´¦ÀíÕâ¸ö¡¸¹¦ÄÜ¡¹µÄ½¨Òé¡£
+×¢Ò⣺ʹÓÃijЩÖն˵Äʱºò£¬ÊäÈë C-x C-s »á¶³½áÆÁÄ»¡¾ÆÁĻûÓÐÈκÎÊä³ö¡¿£¬
+ÕâÑùÄã¾Í¿´²»µ½ Emacs µÄÈκα仯¡£ÆäÔ­ÒòÊDzÙ×÷ϵͳµÄ¡°Á÷Á¿¿ØÖÆ¡±¹¦ÄÜ°Ñ
+C-s À¹½ØÁË£¬²¢ÇÒ¶³½áÁËÆÁÄ»£¬Emacs ×ÔȻҲ¾Í¿´²»µ½Õâ¸öÊäÈëÁË¡£Óà C-q ¿ÉÒÔ
+½â³ýÆÁÄ»¶³½á¡£Òª½â¾öÕâ¸öÎÊÌ⣬Çë²Î¿¼ Emacs ÊÖ²áÀïµÄ¡°Spontaneous Entry
+to Incremental Search¡±Ò»½Ú¡¾Emacs ÊÖ²á¿ÉÄÜ»¹Ã»ÓÐÖÐÎÄ·­Òë¡¿£¬ÄÇÀï¿ÉÄÜÓÐ
+һЩÓÐÓõĽ¨Òé¡£
 
-Äú¿ÉÒÔÕÒ³öÒ»¸öÒѾ­´æÔڵĵµ°¸£¬È»ºó¹Û¿´Ëü»ò±à¼­Ëü¡£ÄúÒ²¿ÉÒÔÕÒÒ»¸ö»¹Ã»ÓÐ
-´æÔÚ¹ýµÄµµ°¸¡£ÕâÊÇÒÔ Emacs ½¨Á¢Ò»¸öµµ°¸µÄ·½·¨£ºÕÒÕâ¸öµµ°¸£¬¾Í´ÓÁ㿪ʼ£¬
-È»ºó¿ªÊ¼²åÈëÎÄ×Öµ½Õâ¸öµµ°¸ÖС£µ±ÄúÒªÇ󡸴¢´æ¡¹Õâ¸öµµ°¸£¬Emacs »áÕæµÄ½¨
-Á¢Ò»¸öµµ°¸£¬²¢°ÑÄúËù²åÈëµÄÎÄ×Ö°Úµ½µµ°¸ÖС£´ÓÄÇʱºò¿ªÊ¼£¬Äú¾Í¿ÉÒÔµ±×Ô¼º
-ÊÇÔڱ༭һ¸öÒѾ­´æÔڵĵµ°¸ÁË¡£
+Äã¿ÉÒÔÑ°ÕÒÒ»¸öÒÑÓеÄÎļþÈ»ºó²é¿´»òÕ߱༭£¬Ä㻹¿ÉÒÔÑ°ÕÒÒ»¸ö²»´æÔÚµÄÎļþ¡£
+ʵ¼ÊÉÏÕâÕýÊÇÓà Emacs ´´½¨ÐÂÎļþµÄ·½·¨£ºÕÒµ½²»´æÔÚµÄÐÂÎļþ£¬È»ºó´ÓÁ㿪ʼ¡£
+ÔÚ´æÅ̵Äʱºò£¬Emacs ²ÅÕæÕý´´½¨Õâ¸öÎļþÈ»ºóÔÙ´æÅÌ¡£ÔÚÕâÖ®ºóÒ»Çо͸úÄã±à
+¼­Ò»¸öÒÑÓÐÎļþÒ»ÑùÁË¡£
 
 
-* »º³åÇø£¨ BUFFER £©
---------------------
+* »º³åÇø£¨BUFFER£©
+------------------
 
-Èç¹ûÄúÒÔ C-x C-f¡¸ÕÒ¡¹µÚ¶þ¸öµµ°¸£¬µÚÒ»¸öµµ°¸ÈÔÈ»´æÔÚ Emacs ÄÚ¡£ÒªÇл»
-»ØËü£¬Äú¿ÉÒÔ C-x C-f ÔÙÕÒËüÒ»´Î¡£ÒÀ´Ë·½Ê½£¬Äú¿ÉÒÔÔÚ Emacs ÄÚ¿ªÆô²»ÉÙµµ
-°¸¡£
+Èç¹ûÄãÓà C-x C-f ÕÒµ½µÚ¶þ¸öÎļþ£¬µÚÒ»¸öÎļþÈÔÈ»»áÔÚ Emacs Àï¡£ÒªÇлصÚ
+Ò»¸öÎļþ£¬Äã¿ÉÒÔ C-x C-f ÔÙ´ÎÑ°ÕÒËü¡£ÕâÑù£¬Äã¿ÉÒÔÔÚ Emacs Àïͬʱ´ò¿ªºÜ
+¶àÎļþ¡£
 
->> ÒÔ¼üÈë C-x C-f foo <Return> µÄ·½Ê½½¨Á¢Ò»¸öÃûΪ¡¸foo¡¹µÄµµ°¸¡£
-   È»ºó²åÈëһЩÎÄ×Ö£¬±à¼­Ëü£¬È»ºóÔÙÒÔ C-x C-s ´¢´æ¡¸foo¡¹¡£
-   ×îºó£¬¼üÈë C-x C-f TUTORIAL.cn <Return> »Øµ½±¾¿ìËÙÖ¸ÄÏ¡£
+>> Óà C-x C-f foo <Return> µÄ·½Ê½½¨Á¢Ò»¸öÃûΪ¡°foo¡±µÄÎļþ¡£
+   È»ºóÇÃÈëһЩÎÄ×Ö£¬ÔÙÓà C-x C-s ±£´æÎļþ¡°foo¡±¡£
+   ×îºó£¬ÊäÈë C-x C-f TUTORIAL.cn <Return> »Øµ½ÕâÀï¡£
 
-Emacs ´¢´æÿ¸öµµ°¸µÄÎÄ×ÖÔÚÒ»¸ö³ÆΪ¡¸»º³åÇø£¨ buffer £©¡¹µÄÎï¼þÖС£ÕÒÒ»
-¸öµµ°¸»áÔÚ Emacs ÄÚ²¿½¨Á¢Ò»¸ö»º³åÇø¡£ÏëÒª¿´Ä¿Ç°´æÔÚÄúµÄ Emacs µÄ¹¤×÷ÖÐ
-»º³åÇøÁÐ±í£¬¼üÈë
+Emacs °Ñÿ¸ö±à¼­ÖеÄÎļþ¶¼·ÅÔÚÒ»¸ö³ÆΪ¡°»º³åÇø£¨buffer£©¡±µÄµØ·½¡£Ã¿Ñ°
+ÕÒµ½Ò»¸öÎļþ£¬Emacs ¾ÍÔÚÆäÄÚ²¿¿ª±ÙÒ»¸ö»º³åÇø¡£ÓÃÏÂÃæµÄÃüÁî¿ÉÒÔÁгöµ±Ç°
+ËùÓеĻº³åÇø£º
 
         C-x C-b   Áгö»º³åÇø
 
 >> ÏÖÔÚ¾ÍÊÔһϠC-x C-b
 
-¿´¿´Ã¿Ò»¸ö»º³åÇøÊÇÈçºÎÃüÃûµÄ£¬ËüÒ²¿ÉÄÜͬʱӵÓÐÒ»¸ö¡¸´¢´æÆäÄÚÈݵĵµ°¸¡¹
-µÄÃû³Æ¡£ÄúÔÚÒ»¸ö Emacs ´°¸ñËù¼ûµ½µÄ¡¸ÈκΡ¹ÎÄ×Ö¶¼ÊÇij¸ö»º³åÇøµÄÒ»²¿·Ý¡£
+¹Û²ìһϻº³åÇøÊÇÈçºÎÃüÃûµÄ£¬ËüºÜ¿ÉÄܸúÆä¶ÔÓ¦µÄÎļþͬÃû¡£ÊÂʵÉÏ£¬ÄãÔÚÒ»
+¸ö Emacs ´°¸ñÀï¿´µ½µÄÈκÎÎÄ×Ö¶¼ÊÇij¸ö»º³åÇøµÄÒ»²¿·Ö¡£
 
->> ¼üÈë C-x 1 ÒÔÀ뿪»º³åÁбí
+>> ÊäÈë C-x 1 À뿪»º³åÇøÁбí
 
-µ±ÄúÓÐÊý¸ö»º³åÇøʱ£¬ÔÚÈκÎʱºòÆäÖÐÖ»ÓÐÒ»¸öÊÇ¡¸Ä¿Ç°×÷Óõġ¹¡£¶øÄǸö¾ÍÊÇ
-ÄúÔڱ༭µÄ»º³åÇø¡£Èç¹ûÄúÏëÒª±à¼­ÁíÒ»¸ö»º³åÇø£¬ÄÇôÄú±ØÐ롸Çл»¡¹µ½Ëü¡£
-Èç¹ûÄúÏëÒªÇл»µ½Á¬½Óµ½Ä³¸öµµ°¸µÄ»º³åÇø£¬Äú¿ÉÒÔÓà C-x C-f ÔٴΰݷÃÄǸö
-µµ°¸¡£µ«ÊÇÓиö±È½Ï¼òµ¥µÄ·½Ê½£ºÊ¹Óà C-x b £»ÔÚÕâ¸öÖ¸ÁîÖУ¬Äú±ØÐë¼üÈ뻺
-³åÇøµÄÃû³Æ¡£
+²»¹Ü´æÔÚ¶àÉÙ»º³åÇø£¬ÈκÎʱºò¶¼Ö»ÄÜÓÐÒ»¸öÊÇ¡°µ±Ç°¡±»º³åÇø£¬Ò²¾ÍÊÇÄãÕýÔÚ
+±à¼­µÄÕâ¸ö¡£Èç¹ûÄãÏë±à¼­ÁíÍâÒ»¸ö»º³åÇø£¬ÄÇôÄã±ØÐë¡°Çл»¡±¹ýÈ¥¡£ÉÏÃæ½²
+¹ý£¬Óà C-x C-f ¿ÉÒÔÇл»µ½Ä³¸öÎļþ¶ÔÓ¦µÄ»º³åÇø¡£²»¹ý»¹ÓÐÒ»¸ö¸ü¼òµ¥µãµÄ°ì
+·¨£¬ÄǾÍÊÇÓà C-x b¡£ÓÃÕâ¸öÃüÁÄã±ØÐëÊäÈ뻺³åÇøµÄÃû³Æ¡£
 
->> ¼üÈë C-x b foo <Return> ÒԻص½º¬Óеµ°¸¡¸foo¡¹µÄÎÄ×ֵĻº³åÇø¡£
-   È»ºó½¨Èë C-x b TUTORIAL <Return> ÒԻص½±¾¿ìËÙÖ¸ÄÏ¡£
+>> ÊäÈë C-x b foo <Return> ÒԻص½Îļþ¡°foo¡±µÄ»º³åÇø¡£
+   È»ºóÊäÈë C-x b TUTORIAL.cn <Return> »Øµ½ÕâÀï¡£
 
-¾Í´ó²¿·ÝµÄÇé¿öÀ´Ëµ£¬»º³åÇøµÄÃû³ÆÓëµµ°¸µÄÃû³ÆÊÇÏàͬµÄ£¨³ýÈ¥Á˵µÃûÖеÄÄ¿
-¼²¿·Ý£©¡£È»¶ø²¢²»×ÜÊÇÈç´Ë¡£ÄúÒÔ C-x C-b ËùÖÆ×÷³öµÄ»º³åÇøÁбí×ÜÊÇ»áÏÔ
-ʾ¸øÄúÿһ¸ö»º³åÇøµÄÃû³Æ¡£
+´ó¶àÊýÇé¿öÏ£¬»º³åÇøºÍÓëÆä¶ÔÓ¦µÄÎļþÊÇͬÃûµÄ£¨²»°üÀ¨Ä¿Â¼Ãû£©£¬²»¹ýÕâÒ²
+²»ÊǾø¶ÔµÄ¡£Óà C-x C-b µÃµ½µÄ»º³åÇøÁбíÖÐÏÔʾµÄ×ÜÊÇ»º³åÇøµÄÃû³Æ¡£
 
-ÄúÔÚÒ»¸ö Emacs ´°¸ñÖÐËù¼ûµ½µÄ¡¸ÈκΡ¹ÎÄ×Ö×ÜÊÇij¸ö»º³åÇøµÄÒ»²¿·Ý¡£ÓÐÒ»
-Щ»º³åÇø²¢Ã»ÓÐÁ¬½Óµ½µµ°¸¡£¾ÙÀýÀ´Ëµ£¬ÃüÃûΪ¡¸*Buffer List*¡¹µÄ»º³åÇø²¢
-ûÓÐÈκεµ°¸¡£ËüÊÇ°üº¬ÓÐÄúÒÔ C-x C-b Ö¸ÁîËùÖÆ×÷³öÀ´µÄ»º³åÇøÁбíµÄ»º³å
-Çø¡£ÃüÃûΪ¡¸*Messages*¡¹µÄ»º³åÇøҲûÓÐÁ¬½Óµ½Èκεµ°¸£»ËüÔÚÄúµÄ Emacs 
-²Ù×÷½×¶ÎÖаüº¬³öÏÖÔÚµ×ÐеÄѶϢ¡£
+ÄãÔÚ Emacs ´°¸ñÀï¿´µ½µÄ¡°ÈκΡ±ÎÄ×Ö¶¼Ò»¶¨ÊÇÊôÓÚij¸ö»º³åÇøµÄ¡£Ò²ÓÐЩ»º³å
+Çø²¢Ã»ÓжÔÓ¦Îļþ£º±ÈÈçÏÔʾ»º³åÇøÁбíµÄ»º³åÇø¾ÍÊÇÕâÑù£¬ÔÙ±ÈÈçÒ»¸öÃû½Ð
+¡°*Messages*¡±µÄ»º³åÇøҲûÓжÔÓ¦µÄÎļþ£¬Õâ¸ö»º³åÇøÀï´æ·ÅµÄ¶¼ÊÇÔÚ Emacs
+µ×²¿³öÏÖµÄÏûÏ¢¡£
 
->> ¼üÈë C-x b *Messages* <Return> À´¿´¿´Ñ¶Ï¢µÄ»º³åÇø¡£
-   È»ºó¼üÈë C-x b TUTORIAL <Return> »Øµ½±¾¿ìËÙÖ¸ÄÏ¡£
+>> ÊäÈë C-x b *Messages* <Return> ³ò³òÏûÏ¢»º³åÇøÀﶼÓÐʲô¶«Î÷¡£
+   È»ºóÔÙÊäÈë C-x b TUTORIAL.cn <Return> »Øµ½ÕâÀï¡£
 
-Èç¹ûÄú¶Ôµµ°¸ÖеÄÎÄ×Ö×öÁËÐ޸ģ¬È»ºóÕÒÁíÒ»µµ°¸£¬Õâ¸ö¶¯×÷²¢²»»á´¢´æµÚÒ»¸ö
-µµ°¸¡£ËüµÄÐÞ¸ÄÈԾɴæÔÚ Emacs ÖУ¬Ò²¾ÍÊÇÔÚÄǸöµµ°¸µÄ»º³åÇøÖС£¶Ô춵ڶþ
-¸öµµ°¸µÄ½¨Á¢»ò±à¼­²¢²»»áÓ°Ïìµ½µÚÒ»¸öµµ°¸µÄ»º³åÇø¡£ÕâÑù×ӷdz£ÓÐÓ㬵«Õâ
-¸öÇéÐÎÒ²±íÃ÷ÁËÄúÐèÒª¡¸Ò»¸ö·½±ãµÄ·½·¨¡¹À´´¢´æµÚÒ»¸öµµ°¸µÄ»º³åÇø¡£Ö»ÊÇΪ
-´¢´æµÚÒ»¸öµµ°¸¾Í±ØÐëÒÔ C-x C-f Çл»»º³åÇø£¬²ÅÄÜÒÔ C-x C-s ½«Ëü´¢´æ£¬×Ü
-ÊǸöÈÃÈËÌÖÑáµÄ¹ý³Ì¡£Òò´ËÎÒÃÇÓÐ
+Èç¹ûÄã¶ÔÎļþ×öÁËÐ޸ģ¬È»ºóÇл»µ½ÁíÒ»¸öÎļþ£¬Õâ¸ö¶¯×÷²¢²»»á°ïÄã°ÑµÚÒ»¸ö
+Îļþ´æÅÌ£¬¶ÔµÚÒ»¸öÎļþµÄÐÞ¸ÄÈÔÈ»½öÏÞÓÚ Emacs ÖУ¬Ò²¾ÍÊÇÔÚËü¶ÔÓ¦µÄ»º³åÇø
+Àͬʱ¶ÔµÚ¶þ¸öÎļþµÄÐÞ¸ÄÒ²²»»áÓ°Ïìµ½µÚÒ»¸öÎļþ¡£ÕâºÜÓÐÓ㬵«ÊÇҲͦÂé
+·³£¬ÒòΪÈç¹ûÄãÓÖÏëÒª´æ´¢µÚÒ»¸öÎļþ£¬Ä㻹ÐèÒªÏÈÓà C-x C-f Çл»»ØÈ¥£¬È»ºó
+ÔÙÓà C-x C-s ´æÅÌ£¬ÕâÏÔȻ̫Âé·³ÁË¡£ÄãÐèÒªÒ»¸ö¸ü¼ò±ãµÄ·½·¨£¬¶ø Emacs µ±
+È»ÒѾ­ÌæÄãÏëµ½ÁË£º
 
-        C-x s   ´¢´æһЩ»º³åÇø
+        C-x s   ±£´æ¶à¸ö»º³åÇø
 
-C-x s »áѯÎÊÄú¹Øì¶ÄúÒÑ×ö³öÐ޸ĵ«»¹Ã»´¢´æµÄÿһ¸ö»º³åÇø¡£Ëü»áÎÊÄú£¬¶Ôì¶
-ÿһ¸öÕâÑùµÄ»º³åÇø£¬ÊÇ·ñÒª´¢´æ£¿
+C-x s »áÕÒµ½ËùÓÐÒѱ»Ð޸ĵ«ÉÐδ´æÅ̵Ļº³åÇø£¬È»ºóÏòÄãÖð¸öѯÎÊ£¬ÊÇ·ñÐèÒª
+´æÅÌ£¿
 
->> ²åÈëÒ»ÐÐÎÄ×Ö£¬È»ºó¼üÈë C-x s¡£
-   ËüÓ¦¸Ã»áÎÊÄúÊÇ·ñÒª´¢´æÃûΪ TUTORIAL.cn µÄ»º³åÇø¡£
-   ¼üÈ롺y¡»ÒԻشðÒª´¢´æ¡£
+>> ²åÈëÒ»ÐÐÎÄ×Ö£¬È»ºóÊäÈë C-x s¡£
+   ËüÓ¦¸Ã»áÎÊÄ㣬ÊÇ·ñÒª´¢´æÃûΪ TUTORIAL.cn µÄ»º³åÇø£¿
+   °´¡°y¡±¸æËßËüÄãÏë´æÅÌ¡£
 
 
-* À©³äÖ¸Á£¨ EXTENDING THE COMMAND SET £©
--------------------------------------------
+* ÃüÁÀ©Õ¹£¨EXTENDING THE COMMAND SET£©
+-----------------------------------------
 
-ÓÉì¶ Emacs ÓµÓÐÌ«¶àÖ¸Á¼´±ãʹÓÃÉÏËùÓÐµÄ CONTROL ºÍ META ×ÖÔª£¬Ò²Ã»°ì
-·¨ÍêÈ«°ÚÉÏ¡£Emacs ÒÔ X£¨À©³ä¡ºeXtend¡»£©Ö¸ÁîÀ´½â¾öÕâ¸öÎÊÌâ¡£À©³äÖ¸ÁîÓÐ
-Á½ÖÖÐÍʽ£º
+Emacs µÄÃüÁî¾ÍÏñÌìÉϵÄÐÇÐÇ£¬ÊýÒ²Êý²»Çå¡£°ÑËüÃǶ¼¶ÔÓ¦µ½ CONTROL ºÍ META
+×éºÏ¼üÉÏÏÔÈ»ÊDz»¿ÉÄܵÄÊÂÇé¡£Emacs ÓÃÀ©Õ¹£¨eXtend£©ÃüÁîÀ´½â¾öÕâ¸öÎÊÌ⣬
+À©Õ¹ÃüÁîÓÐÁ½ÖÖ·ç¸ñ£º
 
-        C-x     ×ÖÔªÀ©³ä¡£ºóÃæ¸úÖøÒ»¸ö×ÖÔª¡£
-        M-x     ÓÐÃû³ÆµÄÖ¸ÁîÀ©³ä¡£ºóÃæ¸úÖøÒ»¸ö³¤µÄÃû³Æ¡£
+        C-x     ×Ö·ûÀ©Õ¹¡£  C-x Ö®ºóÊäÈëÁíÒ»¸ö×Ö·û»òÕß×éºÏ¼ü¡£
+        M-x     ÃüÁîÃûÀ©Õ¹¡£M-x Ö®ºóÊäÈëÒ»¸öÃüÁîÃû¡£
 
-»¹ÓÐһЩָÁîͨ³£À´ËµÊǺÜÓÐÓõģ¬µ«ÊDZÈÄúÒѾ­Ñ§µ½µÄÖ¸Áî½ÏÉÙʹÓá£ÄúÒѾ­
-¿´¹ýÆäÖÐÁ½¸ö£ºµµ°¸Ö¸ÁîÖÐµÄ C-x C-f ȥѰÕÒ£¬ÒÔ¼° C-x C-s È¥´¢´æ¡£ÆäËûµÄ
-Àý×ÓÔòÓнáÊø Emacs ½×¶ÎµÄÖ¸Áî -- Õâ¸öÖ¸ÁîÊÇ C-x C-c¡££¨²»Òªµ£ÐÄÄú»áʧ
-È¥ÒѾ­×ö³öµÄ¸Ä±ä£¬C-x C-c ÔÚËüɱµô Emacs ֮ǰ»áÌṩ´¢´æÿһ¸ö±ä¶¯µÄµµ
-°¸µÄ»ú»á¡££©
+ºÜ¶àÀ©Õ¹ÃüÁºÜÓÐÓã¬ËäÈ»ÓëÄãÒѾ­Ñ§¹ýµÄÃüÁî±ÈÆðÀ´£¬ËûÃÇ¿ÉÄܲ»ÄÇô³£Óá£
+ÄãÓ¦¸ÃÒѾ­¼û¹ýһЩÀ©Õ¹ÃüÁîÁË£¬±ÈÈçÓà C-x C-f Ñ°ÕÒÎļþºÍÓà C-x C-s ±£´æ
+Îļþ¡£Í˳ö Emacs ÓÃµÄ C-x C-c Ò²ÊÇÀ©Õ¹ÃüÁî¡££¨²»Óõ£ÐÄÍ˳ö Emacs »á¸øÄã
+´øÀ´Ê²Ã´Ëðʧ£¬Emacs »áÔÚÍ˳ö֮ǰÌáÐÑÄã±£´æÎļþµÄ£©
+
+ÔÚ¿ØÖÆ̨Ï£¬C-z ¿ÉÒÔÔÝʱÀ뿪 Emacs¡ª¡ªµ±È»£¬Ä㻹¿ÉÒÔÔÙ»ØÀ´¡£
 
-C-z ÊÇ *ÔÝʱ* À뿪 Emacs µÄÖ¸Áî -- Òò´ËÄúÉÔºó¿ÉÒԻص½Í¬ÑùµÄ Emacs ½×¶Î¡£
+ÔÚÔÊÐí C-z µÄϵͳÖУ¬C-z »á°Ñ Emacs¡°¹ÒÆ𡱣¬Ò²¾ÍÊÇ˵£¬Ëü»á»Øµ½ shell
+µ«²»Í˳ö Emacs¡£ÔÚÄÇЩ×î³£ÓÃµÄ shell ÖУ¬Í¨³£¿ÉÒÔÓá°fg¡±»òÕß¡°%emacs¡±
+ÃüÁîÔٴλص½ Emacs ÖС£
 
-ÔÚijЩÔÊÐíËüµÄ×÷ÓõÄϵͳÖУ¬ C-z »á¡¸ÔÝͣס£¨ suspends £©¡¹Emacs£¬Ò²¾Í
-ÊÇ˵£¬Ëü»á»Øµ½ shell µ«²»»á°Ñ Emacs »Ùµô¡£ÔÚ×î³£ÓÃµÄ shell ÖУ¬Äú¿ÉÒÔ
-Óáºfg¡»»ò¡º%emacs¡»Á½ÖÖÖ¸Áî»Ö¸´ Emacs¡£
+ÔÚûÓÐÌṩ¹ÒÆð¹¦ÄܵÄϵͳÖУ¬C-z »áÔÚ Emacs ֮ϴ´½¨Ò»¸ö×Ó shell À´ÈÃÄã
+ÔËÐÐÆäËü³ÌÐò£¬²¢ÇÒÔٴΡ°»Øµ½¡± Emacs ÖСª¡ªËäÈ»ÎÒÃDz¢Ã»ÓÐÕæÕýÀ뿪¹ý¡£Õâ
+ÖÖÇé¿öÏ£¬Í¨³£ÓÃshell ÃüÁî¡°exit¡±´Ó×Ó shell »Øµ½ Emacs¡£
 
-ÔÚûÓÐÌṩÔÝÍ£¹¦ÄܵÄϵͳÖУ¬C-z »áÔÚ Emacs µ×Ͻ¨Á¢Ò»¸ö subshell ÒÔÈÃ
-ÄúÓлú»áÖ´ÐÐÆäËûµÄ³Ìʽ£¬²¢ÇÒÔÚÉÔºó»Øµ½ Emacs£¬Ëü²¢Ã»ÓÐÕæµÄÀ뿪 Emacs¡£
-ÔÚÕâ¸öÀý×ÓÖУ¬shell Ö¸Áexit¡»ÊÇ´Ósubshell »Øµ½ Emacs µÄͨ³£·½Ê½¡£
+C-x C-c ×îºÃÔÚÄã´òËãÍ˳öµÇ½µÄʱºòÔÙÓá£ÔÚ Emacs ±»ÖîÈçÓʼþ´¦Àí³ÌÐòÖ®Àà
+µÄÍⲿ³ÌÐòµ÷ÓÃÖ®ºó£¬Ò²¿ÉÒÔÓà C-x C-c Í˳ö¡£²»¹ýÒ»°ãÀ´½²£¬Èç¹ûÄã²»ÏëÍ˳ö
+µÇ¼£¬×îºÃ»¹ÊÇ°Ñ Emacs ¹ÒÆð¶ø²»ÊÇÍ˳ö¡£
 
-ʹÓà C-x C-c µÄʱ»úÊǵ±Äú´òËãÒªµÇ³öʱ¡£ËüÒ²·Ç³£ÊʺÏÓÃÀ´À뿪±»ÆäËûÓʼþ
-´¦Àí³Ìʽ£¬ÒÔ¼°Ðí¶à²»Í¬µÄÓ¦ÓóÌʽËùÆô¶¯µÄ Emacs¡£È»¶øÔÚÒ»°ãµÄ×´¿öÏ£¬Èç
-¹ûÄú²»´òËãµÇ³ö£¬×îºÃÊÇ°Ñ Emacs ÔÝÍ£¶ø²»ÊÇÀ뿪Ëü¡£
+C-x µÄÀ©Õ¹ÃüÁîÓкܶ࣬ÏÂÃæÁгöµÄÊÇÄãÒѾ­Ñ§¹ýµÄ£º
 
-ÓÐÐí¶à C-x µÄÖ¸Áî¡£ÕâÀïÊÇÒ»·ÝÄúÒѾ­Ñ§¹ýµÄÁÐ±í£º
-
-        C-x C-f         ÕÒµµ°¸¡£
-        C-x C-s         ´¢´æµµ°¸¡£
+        C-x C-f         Ñ°ÕÒÎļþ¡£
+        C-x C-s         ±£´æÎļþ¡£
         C-x C-b         Áгö»º³åÇø¡£
         C-x C-c         À뿪 Emacs¡£
-        C-x 1           ³ýÁËÒ»¸öÍ⣬ɾȥÆäËûËùÓеĴ°¸ñ¡£
-        C-x u           È¡Ïû¶¯×÷¡£
+        C-x 1           ¹ØµôÆäËüËùÓд°¸ñ£¬Ö»±£ÁôÒ»¸ö¡£
+        C-x u           ³·Ïú¡£
 
-ÒÔÀ©³äÀ´ÃüÃûµÄÖ¸Áîͨ³£ÊDz»Ì«³£Ê¹ÓõÄÖ¸Á»òÊÇÖ»ÔÚÌض¨µÄģʽϲŻáʹÓÃ
-µÄÖ¸Áî¡£Ò»¸öÀý×ÓÊÇÈ¡´ú×Ö´®Ö¸ÁËü»áÈ«ÓòµØ½«Ò»¸ö×Ö´®ÒÔÁíÒ»¸öÀ´È¡´ú¡£µ±
-Äú¼üÈë M-x ʱ£¬Emacs »áÔÚÓ©Ä»µÄµ×¶ËѯÎÊÄú£¬È»ºóÄúÒ²Ó¦¸Ã¼üÈëÕâ¸öÖ¸ÁîµÄ
-Ãû³Æ¡£ÔÚÕâ¸öÀý×ÓÖÐÊÇ¡ºreplace-string¡»Ö»Òª¼üÈ롺repl s<TAB>¡»£¬È»ºó 
-Emacs ½«»á²¹ÆëÕâ¸öÃû³Æ¡£ÒÔ <Return> À´½áÊøÕâ¸öÖ¸ÁîÃû³Æ¡£
+ÓÃÃüÁîÃûÀ©Õ¹µÄÃüÁîÒ»°ã¶¼²»Ì«³£Ó㬻òÕßÖ»ÔÚ²¿·Öģʽϱ»Óõ½¡£±ÈÈç
+replace-string£¨×Ö·û´®Ìæ»»£©Õâ¸öÃüÁËü»áÔÚÈ«ÎÄ·¶Î§ÄÚ°ÑÒ»¸ö×Ö·û´®Ìæ»»
+³ÉÁíÒ»¸ö¡£ÔÚÄãÊäÈë M-x µÄʱºò£¬Emacs »áÔÚÆÁÄ»µ×¶ËÏòÄãѯÎÊ£¬È»ºóÄãÓ¦¸ÃÊä
+ÈëÃüÁîÃû¡£Èç¹ûÄãÏëÊäÈë¡°replace-string¡±£¬ÆäʵֻÐèÒªÇá°repl s<TAB>¡±¾Í
+ÐÐÁË£¬Emacs »á°ïÄã×Ô¶¯²¹ÆëµÄ¡£ÊäÈëÍêÖ®ºó°´ <Return> ¡£
 
-È¡´ú×Ö´®Ö¸ÁîÐèÒªÁ½¸ö²ÎÊý -- ±»È¡´úµÄ×Ö´®ÒÔ¼°ÓÃÀ´È¡´úËüµÄ×Ö´®¡£Äú±ØÐëÒÔ 
-Newline ×ÖÔªÀ´½áÊøÿһ¸ö²ÎÊý¡£
+×Ö·û´®Ìæ»»ÃüÁîÐèÒªÁ½¸ö²ÎÊý¡ª¡ª±»Ìæ»»µÄ×Ö·û´®ºÍÓÃÀ´Ìæ»»ËüµÄ×Ö·û´®¡£Ã¿¸ö
+²ÎÊýµÄÊäÈëÓû»ÐзûÀ´½áÊø¡£
 
->> ½«ÓαêÒƵ½±¾ÐеÄÏÂÁ½Ðпհף¬È»ºó¼üÈë
+>> ½«¹â±êÒƵ½±¾ÐеÄÏÂÁ½Ðпհף¬È»ºóÊäÈë
    M-x repl s<Return>changed<Return>altered<Return>¡£
 
-   ¡¾ÎªÁË˵Ã÷µÄÄ¿µÄ£¬ì¶Ï±£ÁôÒ»ÐÐÔ­ÎÄ¡£
+   ¡¾ÎªÁ˼ÌÐøÁ·Ï°£¬±£ÁôÒ»ÐÐÔ­ÎÄÈçÏ£º
    Notice how this line has changed: you've replaced... ¡¿
 
-Çë×¢ÒâÕâÒ»ÐÐÊÇÔõô¸Ä±äµÄ£ºÔÚÓαêµÄÆðʼλÖÃÖ®ºó£¬ÄúÒѾ­½« c-h-a-n-g-e-d 
-Õâ¸ö×Ö -- ²»¹ÜËüÔÚÄÄÀï³öÏÖ -- ÒÔ¡¸altered¡¹Õâ¸ö×ÖÀ´È¡´úÁË¡£
+Çë×¢ÒâÕâÒ»ÐÐÊÇÔõô¸Ä±äµÄ£ºÔÚ¹â±êÖ®ºóµÄ·¶Î§ÄÚ£¬ÄãÒѾ­½«¡°changed¡±Õâ¸ö
+´Ê¡ª¡ª²»¹ÜËüÔÚÄÄÀï³öÏÖ¡ª¡ªÈ«²¿Óá°altered¡±Ìæ»»µôÁË¡£
 
 
-* ×Ô¶¯´æµµ£¨ AUTO SAVE £©
--------------------------
-
-µ±ÄúÔÚÒ»¸öµµ°¸ÖÐ×öÁËÐ޸ģ¬µ«ÊÇ»¹Ã»Óн«ËüÃÇ´¢´æÆðÀ´£¬ÄÇôÈç¹ûÄúµÄµçÄÔµ±
-»ú£¬ËüÃǽ«ÓпÉÄÜÒÅʧ¡£ÎªÁ˱ÜÃâÕâÖÖÇéÐη¢ÉúÔÚÄúµÄÉíÉÏ£¬Emacs »á¶¨Æڵؽ«
-ÄúÕýÔڱ༭µÄµµ°¸Ð´È롸×Ô¶¯´¢´æ¡¹µµ°¸ÖС£×Ô¶¯´¢´æµµ°¸ÔÚµµÃûµÄÇ°ºó»á¸÷ÓÐ
-Ò»¸ö # ·ûºÅ£»¾ÙÀýÀ´Ëµ£¬Èç¹ûÄúµÄµµ°¸ÃûΪ¡¸hello.c¡¹£¬ÄÇôËüµÄ×Ô¶¯´¢´æµµ
-°¸µÄµµÃû¾ÍÊÇ¡¸#hello.c#¡¹¡£µ±ÄúÒÔƽ³£µÄ·½Ê½´¢´æµµ°¸Ê±£¬Emacs ¾Í»á°ÑËü
-µÄ×Ô¶¯´¢´æµµÉ¾³ý¡£
-
-Èç¹ûµ±»ú£¬Äú¿ÉÒÔ¾­ÓÉÕý³£µØÑ°ÕÒµµ°¸£¬£¨Ö¸µÄÊÇÄúÔڱ༭µÄµµ°¸¶ø²»ÊÇ×Ô¶¯´¢
-´æµµ£©È»ºó¼üÈë M-x recover file<Return> À´»Ø¸´ÄúµÄ×Ô¶¯´¢´æµµ¡£µ±ËüÒªÇó
-È·ÈÏʱ£¬¼üÈë yes<Return> ÒÔ¼ÌÐø²¢»Ø¸´×Ô¶¯´¢´æµÄ×ÊÁÏ¡£
-
-
-* »ØÓ¦Çø£¨ ECHO AREA £©
+* ×Ô¶¯±£´æ£¨AUTO SAVE£©
 -----------------------
 
-Èç¹û Emacs ¼ûµ½ÄúºÜÂýµØ¼üÈë¶à×ÖÔªÖ¸ÁËü»á½«ËüÃÇÏÔʾÔÚλ춴°¸ñÏ·½£¬
-³ÆΪ¡¸»ØÓ¦Çø¡¹µÄÇøÓò¸øÄú²ÎÔÄ¡£»ØÓ¦ÇøλÔÚ´°¸ñµÄ×îºóÒ»ÐС£
+Èç¹ûÄãÐÞ¸ÄÁËÒ»¸öÎļþµ«ÊÇ»¹Ã»À´µÃ¼°´æÅÌ£¬È»ºóÄãµÄ¼ÆËã»ú°Õ¹¤ÁË£¬ÄÇôÄã±à
+¼­µÄ¶«Î÷ºÜ¿ÉÄܾÍÕÒ²»»ØÀ´ÁË¡£ÎªÁ˱ÜÃâÕâÑùµÄ²»ÐÒÒ»ÔÙ·¢Éú£¬Emacs »á¶¨ÆÚ½«
+ÄãÕýÔڱ༭µÄÎļþ´æÈëÒ»¸ö¡°×Ô¶¯±£´æ¡±ÎļþÖС£×Ô¶¯±£´æµÄÎļþÃûµÄͷβ¸÷ÓÐ
+Ò»¸ö¡°#¡±×Ö·û£¬±ÈÈçÄãÕýÔڱ༭¡°hello.c¡±£¬ÄÇôËüµÄ×Ô¶¯±£´æÎļþ¾Í½Ð
+¡°#hello.c#¡±¡£ÔÚÄãÕý³£´æÅÌÖ®ºó£¬Emacs »áɾ³ý×Ô¶¯±£´æÎļþ¡£
+
+¼ÙÈç²»ÐÒÕæµÄ·¢ÉúÁË£¬Äã´ó¿ÉÒÔ´ÓÈݵĴò¿ªÔ­À´µÄÎļþ£¨×¢Òâ²»ÊÇ×Ô¶¯±£´æÎļþ£©
+È»ºóÊäÈë M-x recover file<Return> À´»Ö¸´ÄãµÄ×Ô¶¯±£´æÎļþ¡£ÔÚÌáʾȷÈϵÄ
+ʱºò£¬ÊäÈë yes<Return> ¾ÍÐÐÁË¡£
+
+
+* »ØÏÔÇø£¨ECHO AREA£©
+---------------------
+
+Èç¹û Emacs ·¢ÏÖÄãÊäÈë¶à×Ö·ûÃüÁîµÄ½Ú×àºÜÂý£¬Ëü»áÔÚ´°¸ñµÄÏ·½³ÆΪ¡°»ØÏÔÇø¡±
+µÄµØ·½¸øÄãÌáʾ¡£»ØÏÔÇøλÓÚÆÁÄ»µÄ×îºóÒ»ÐС£
 
 
-* ״̬ÐУ¨ MODE LINE £©
------------------------
+* ״̬À¸£¨MODE LINE£©
+---------------------
 
-λÔÚ»ØÓ¦ÇøµÄÕýÉÏÃæÊdzÆΪ¡¸×´Ì¬ÐС¹µÄÒ»ÐС£×´Ì¬ÐÐÏÔʾ³öһЩÐÅÏ¢£¬È磺
+λÓÚ»ØÏÔÇøµÄÕýÉÏ·½µÄÒ»Ðб»³ÆΪ¡°×´Ì¬À¸¡±¡£×´Ì¬À¸ÉÏ»áÏÔʾһЩÐÅÏ¢£¬±ÈÈ磺
 
---:**  TUTORIAL.cn       (Fundamental)--L670--58%----------------
+--:**  TUTORIAL.cn       (Fundamental)--L670--54%----------------
 
-±¾ÐÐÌṩһЩ¹Ø춡¸Emacs µÄ״̬¡¹ÒÔ¼°¡¸ÄúÕýÔڱ༭µÄÎÄ×Ö¡¹µÄÓÐÓÃÐÅÏ¢¡£
+״̬À¸ÏÔʾÁË Emacs µÄ״̬ºÍÄãÕýÔڱ༭µÄÎÄ×ÖµÄһЩÐÅÏ¢¡£
 
-ÄúÒѾ­ÖªµÀµµÃûµÄÒâÒåÊÇʲôÁË -- ¾ÍÊÇÄúÕҵĵµ°¸¡£-NN%-- Ö¸³öÄ¿Ç°ÄúÔÚÎÄ
-×ÖµµÖеÄλÖã»ËüµÄÒâ˼ÊÇ˵£ºÓÐ NN °Ù·Ö±ÈµÄÎÄ×ÖλÔÚ´°¸ñµÄÉÏÃæ¡£Èç¹ûµµ°¸
-µÄ¶¥¶Ë¾ÍλÔÚ´°¸ñÖУ¬ÄÇôËü¾Í»áÏÔʾ --Top-- ¶ø²»ÊÇ --00%--¡£Èç¹ûµµ°¸µÄ
-µ×²¿¾ÍλÔÚ´°¸ñÖУ¬ÄÇôËüÊÇÏÔʾ --Bot--¡£Èç¹ûÄúÕýÔÚ¿´µÄÎÄ×ÖµµºÜС£¬ÔÚ´°
-¸ñÖоÍ×ãÒÔ¿´µ½È«²¿µÄÄÚÈÝ£¬ÄÇô״̬ÐоͻáÏÔʾ --All--¡£
-
-L ºÍÊý×ÖÒÔÁíÒ»ÖÖ·½Ê½À´±íʾ³öλÖãºËüÃǸø³öÁËÄ¿Ç°ËùÔÚµÄÐÐÊý£¨ Line £©¡£
+ÄãÓ¦¸ÃÖªµÀÎļþÃûµÄÒâ˼°É£¿¾ÍÊÇÄãÕÒµ½µÄÄǸöÎļþÂï¡£-NN%-- ÏÔʾµÄÊǹâ±êÔÚ
+È«ÎÄÖеÄλÖá£Èç¹ûλÓÚÎļþµÄ¿ªÍ·£¬ÄÇô¾ÍÏÔʾ --Top-- ¶ø²»ÊÇ --00%--£»Èç
+¹ûλÓÚÎļþµÄĩ⣬¾ÍÏÔʾ --Bot--¡£Èç¹ûÎļþºÜС£¬Ò»ÆÁ¾Í×ãÒÔÏÔʾȫ²¿ÄÚÈÝ£¬
+ÄÇô״̬À¸»áÏÔʾ --All--¡£
 
-ÔÚ¿¿½üÇ°ÃæµÄÐǺűíʾÄúÒѾ­¶ÔÕâЩÎÄ×Ö×öÁ˸ı䡣ÔÚÄú¸Õ°Ý·Ã»ò´¢´æÒ»¸öµµ°¸
-Ö®ºó£¬×´Ì¬ÐеÄÄǸö²¿·Ö»áûÓÐÐǺţ¬Ö»ÓÐÆÆÕۺš£
+L ºÍÆäºóµÄÊý×Ö¸ø³öÁ˹â±êËùÔÚÐеÄÐкš£
 
-״̬ÐÐÖÐλì¶Ð¡À¨»¡ÀïÃæµÄ²¿·Ö£¬ÊÇÓÃÀ´¸æËßÄúÕýÔÚʹÓÃʲô±à¼­Ä£Ê½¡£Ô¤ÉèµÄ
-ģʽÊÇ Fundamental£¬Ò²¾ÍÊÇÄúÏÖÔÚʹÓõġ£ËüÊÇ¡¸Ö÷ģʽ¡¹µÄÒ»¸öÀý×Ó¡£
+×ͷµÄÐǺţ¨*£©±íʾÄãÒѾ­¶ÔÎÄ×Ö×ö¹ý¸Ä¶¯¡£¸Õ¸Õ´ò¿ªµÄÎļþ¿Ï¶¨Ã»Óб»¸Ä¶¯
+¹ý£¬ËùÒÔ״̬À¸ÉÏÏÔʾµÄ²»ÊÇÐǺŶøÊǶÌÏߣ¨-£©¡£
+
+״̬À¸ÉÏСÀ¨ºÅÀïµÄÄÚÈݸæËßÄ㵱ǰÕýÔÚʹÓõı༭ģʽ¡£È±Ê¡µÄģʽÊÇ
+Fundamental£¬¾ÍÊÇÄãÏÖÔÚÕýÔÚʹÓõÄÕâ¸ö¡£ËüÊÇÒ»ÖÖ¡°Ö÷ģʽ¡±¡£
 
-Emacs ÓÐÐí¶à²»Í¬µÄÖ÷ģʽ¡£ËüÃÇÖ®ÖÐÓÐһЩÊÇÓÃÀ´±à¼­²»Í¬µÄÓïÑÔÒÔ¼°£¯»ò²»
-ͬÖÖÀàµÄÎÄ×Ö£¬ÏñÊÇ Lisp ģʽ¡¢ Text ģʽµÈµÈ¡£ÔÚÈκεÄʱ¼äÖ»ÓÐÒ»¸öÖ÷Ä£
-ʽ¿ÉÒÔ×÷Ó㬲¢ÇÒËüµÄÃû³Æ×Ü¿ÉÒÔÔÚ״̬ÐÐÖб»ÕÒµ½£¬¾ÍÔÚÏÖÔÚµÄ
-¡¸Fundamental¡¹ÖеÄλÖá£
+Emacs µÄÖ÷ģʽÁÖÁÖ×Ü×Ü¡£ÓÐÓÃÀ´±à¼­³ÌÐò´úÂëµÄ¡ª¡ª±ÈÈç Lisp ģʽ£»Ò²ÓÐÓÃ
+À´±à¼­¸÷ÖÖ×ÔÈ»ÓïÑÔÎı¾µÄ¡ª¡ª±ÈÈç Text ģʽ¡£ÈκÎÇé¿öÏÂÖ»ÄÜÓ¦ÓÃÒ»¸öÖ÷Ä£
+ʽ£¬ÆäÃû³Æ»áÏÔʾÔÚ״̬À¸ÉÏ£¬¾ÍÔÚÏÖÔÚÏÔʾ¡°Fundamental¡±µÄµØ·½¡£
 
-ÿһ¸öÖ÷ģʽ¶¼Ê¹µÃһЩָÁîµÄÐÐΪ±íÏֵò»Ì«Ò»Ñù¡£¾ÙÀýÀ´Ëµ£¬ÔÚÒ»¸ö³ÌʽÖÐ
-ÓÐһЩָÁîÓÃÀ´ÖÆ×÷³ö×¢½â£¬¶øÓÉì¶Ã¿Ò»ÖÖ³ÌʽÓïÑÔ¶Ôì¶Ò»¸ö×¢½âÓ¦¸Ã³¤µÃÏñʲ
-ô£¬¶¼ÓÐÖø²»Í¬µÄÏë·¨£¬Òò´Ëÿһ¸öÖ÷ģʽ¶¼±ØÐëÒÔ²»Í¬µÄ·½Ê½À´²åÈë×¢½â¡£Ã¿
-Ò»¸öÖ÷ģʽÊÇÒ»¸öÑÓÉìÖ¸ÁîµÄÃû³Æ£¬Ê¹µÃÄú¿ÉÒÔÓÃÀ´Çл»ÖÁÄǸöģʽ¡£¾ÙÀýÀ´Ëµ£¬
-M-x fundamental-mode ¾ÍÊÇÇл»µ½ Fundamental ģʽµÄÒ»¸öÖ¸Áî¡£
-
-Èç¹ûÄúÏëÒª±à¼­ÈËÀàÓïÑÔµÄÎÄ×Öµµ°¸ -- ÏñÊÇÏÖÔÚµÄÕâÒ»¸ö£¬ÄúÓ¦¸ÃʹÓà Text 
+Ö÷ģʽÓÐʱ»á¸Ä±äһЩÃüÁîµÄÐÐΪ¡£±ÈÈç˵£¬²»¹Ü±à¼­Ê²Ã´ÑùµÄ³ÌÐò´úÂ룬Ä㶼
+¿ÉÒÔÓÃÒ»¸öͳһµÄÃüÁîÀ´Ìí¼Ó×¢ÊÍ£¬µ«ÊÇÔÚ²»Í¬µÄÓïÑÔÖÐ×¢Ê͵ÄÓï·¨ÍùÍùÊDz»Í¬
+µÄ£¬ÕâʱÏàÓ¦µÄÖ÷ģʽ¾Í»á·Ö±ðÓø÷×ÔµÄÓï·¨¹æÔòÀ´Ìí¼Ó×¢ÊÍ¡£Ö÷ģʽ¶¼ÊÇ¿ÉÒÔ
+Óà M-x Æô¶¯µÄÃüÁËùÒÔ M-x fundamental-mode ¾Í¿ÉÒÔÇл»µ½ Fundamental
 ģʽ¡£
 
->> ¼üÈë M-x text mode<Return>¡£
+Èç¹ûÄãÒª±à¼­×ÔÈ»ÓïÑÔÎı¾¡ª¡ª±ÈÈçÏÖÔÚ¡ª¡ªÄãÓ¦¸ÃÓà Text ģʽ¡£
+
+>> ÊäÈë M-x text mode<Return>¡£
+
+±ðº¦Å£¬Ã»ÓÐʲôÃüÁî»á¸Ä±ä¹¦ÄÜ¡£²»¹ýÄã¿ÉÒÔ·¢ÏÖ£¬M-f ºÍ M-b ÏÖÔڰѵ¥ÒýºÅ
+£¨'£©ÊÓΪ´ÊµÄÒ»²¿·ÖÁË¡£¶øÔÚÏÈÇ°£¬ÔÚ Fundamental ģʽÖУ¬M-f ºÍ M-b ¶¼½«
+µ¥ÒýºÅÊÓΪ·Ö¸ôµ¥´ÊµÄ·ûºÅ¡£
 
-²»Òªµ£ÐÄ£¬Ã»ÓÐÈκÎÒ»¸öÄúÒѾ­Ñ§¹ýµÄ Emacs Ö¸Á»á±»¸Ä±ä³ÉÈκηdz£²»Í¬
-µÄÐÎʽ¡£µ«ÊÇÄú¿ÉÒÔ·¢ÏÖµ½ M-f ºÍ M-b ÏÖÔÚ°ÑƲºÅ£¨'£©ÊÓΪ×ÖµÄÒ»²¿·Ö¡£ÏÈ
-Ç°£¬ÔÚ Fundamental ģʽÖУ¬M-f ºÍ M-b ½«Æ²ºÅÊÓΪ×ֵķָô·ûºÅ¡£
+Ö÷ģʽͨ³£¶¼»á¸ãһЩÀàËƵÄС¶¯×÷£¬ÒòΪºÜ¶àÃüÁîÆäʵÍê³ÉµÄÊÇ¡°ÏàͬµÄ¹¤
+×÷¡±£¬Ö»ÊÇÔÚ²»Í¬Çé¿öÏ»áÓв»Í¬µÄ¹¤×÷·½Ê½¶øÒÑ¡£¡¾Ëùν¡°Çóͬ´æÒ족£¬ÔÚ
+Emacs ÀïµÃµ½Á˺ܺõÄÌåÏÖ¡¿
+
+Óà C-h m ¿ÉÒԲ鿴µ±Ç°Ö÷ģʽµÄÎĵµ¡£
+
+>> Óà C-u C-v ½«±¾Ðдøµ½¿¿½üÆÁÄ»µÄÉÏ·½¡£
+>> ÊäÈë C-h m£¬¿´¿´ Text ģʽÓë Fundamental ģʽÓÐÄÄЩ²»Í¬¡£
+>> ÊäÈë C-x 1 ¹ØµôÎĵµ´°¸ñ¡£
+
+Ö÷ģʽ֮ËùÒÔ³Æ֮Ϊ¡°Ö÷£¨major£©¡±Ä£Ê½£¬ÊÇÒòΪͬʱ»¹ÓС°¸¨Ä£Ê½¡±£¨minor
+mode£©´æÔÚ¡£¸¨Ä£Ê½²¢²»ÄÜÌæ´úÖ÷ģʽ£¬¶øÊÇÔÚÖ÷ģʽ֮ÍâÔÙ×öһЩ¸¨ÖúµÄÐ޸ġ£
+ÿ¸ö¸¨Ä£Ê½¶¼¿ÉÒÔ¶ÀÁ¢µØ¿ªÆôºÍ¹Ø±Õ£¬¸úÆäËü¸¨Ä£Ê½Î޹أ¬¸úÖ÷ģʽҲÎ޹ء£Ëù
+ÒÔÄã¿ÉÒÔ²»Óø¨Ä£Ê½£¬Ò²¿ÉÒÔÓÃÒ»¸ö»òÕ߶à¸ö¸¨Ä£Ê½¡£
 
-Ö÷ģʽͨ³£»áÏñÉÏÊöÄǸöÀý×ÓÒ»Ñù£¬×ö³öһЩ¾«Çɵĸı䣺´ó²¿·ÖµÄÖ¸ÁîÔÚÿһ
-¸öÖ÷ģʽÖС¸×öͬÑùµÄÊ¡¹£¬µ«ÊÇËüÃÇÒÔÒ»µãµã²»Í¬µÄ·½Ê½À´¹¤×÷¡£¡¾ÔپٸöÀý
-×Ó£¬½ÓÐøÉÏÃæËù¿ªµÄÍ·£¬ÒÔ³ÌʽÓïÑÔµÄ×¢½âÀ´Ëµ¡£Í¬ÑùÒ»¸ö²åÈë×¢½âµÄ¶¯×÷£¬Òò
-ΪÄúʹÓõijÌʽÓïÑÔ£¯Ö÷ģʽµÄ²»Í¬¶ø²»Í¬¡£ÈôÄúʹÓà C ÓïÑÔ£¬Emacs ²åÈë
-¡º/* ½éì¶ÖмäµÄΪע½âÇø¿é */¡»£»ÈôÄúʹÓõÄÊÇ Fortran ÓïÑÔ£¬Emacs ²åÈë
-¡ºc ÒÔ×ÖÔª c ΪÊ×µÄΪע½âÐС»£»ÈôÄúʹÓõÄÊÇ Basic ÓïÑÔ£¬Emacs Ôò²åÈ롺' 
-ƲºÅÒÔºóµÄΪע½âÎÄ×Ö¡»¡£±à¼­Æ÷µÄµ¯ÐÔÈç´Ë£¬ÊµÔÚûÓбØҪΪÁ˲»Í¬µÄÓïÑÔ¡¢
-Ä¿µÄ»òÍâ¹Û£¬Éè¼ÆÌØÊ⻯µÄ±à¼­Æ÷¡£¡¸Çó´óͬ£¬´æСÒ졹ÔÚÕâÀïÒ²ÊdzÉÁ¢µÄ¡£¡¿
+ÓÐÒ»¸ö½Ð×ö×Ô¶¯ÕÛÐУ¨Auto Fill£©µÄ¸¨Ä£Ê½Óô¦ºÜ´ó£¬ÌرðÊÇÔڱ༭×ÔÈ»ÓïÑÔÎÄ
+±¾µÄʱºò¡£Õâ¸ö¸¨Ä£Ê½Æô¶¯ºó£¬Emacs »áÔÚÄã´ò×Ö³¬³öÒ»Ðб߽çʱ×Ô¶¯ÌæÄã»»ÐС£
+
+Óà M-x auto fill mode<Return> Æô¶¯×Ô¶¯ÕÛÐÐģʽ¡£Æô¶¯Ö®ºó£¬Èç¹ûÎÒÃÇÔÙÓÃ
+Ò»´Î M-x auto fill mode<Return>£¬×Ô¶¯ÕÛÐÐģʽ¾Í±»¹Ø±ÕÁË¡£Ò²¾ÍÊÇ˵£¬Èç¹û
+×Ô¶¯ÕÛÐÐģʽûÓпªÆô£¬Õâ¸öÃüÁî»á¿ªÆôËü£»¶øÈç¹ûÒѾ­¿ªÆôÁË£¬Õâ¸öÃüÁî»á¹Ø
+±ÕËü¡£ÎÒÃÇ˵Õâ¸öÃüÁîÓÃÀ´¡°¿ª¹Ø£¨toggle£©¡±Ä£Ê½¡£
+
+>> ÏÖÔÚÊäÈë M-x auto fill mode<Return>¡£È»ºóËæ±ãÇõãʲô£¬Ö±µ½Äã¿´µ½Ëü
+   ·Ö³ÉÁ½ÐС£±ØÐëÇÃһЩ¿Õ¸ñ£¬ÒòΪ Auto Fill Ö»ÔÚ¿Õ°×´¦½øÐжÏÐС£¡¾¿Õ¸ñ
+   ¶ÔÓ¢ÎÄÀ´ËµÊDZØÐëµÄ£¬¶ø¶ÔÖÐÎÄÔò²»±Ø¡£¡¿
 
-Òªä¯ÀÀÄúÏÖÔÚËù´¦µÄÖ÷ģʽµÄÎĵµ£¬¼üÈë C-h m¡£
+Ðб߽çͨ³£±»É趨Ϊ 70 ¸ö×Ö·û¡¾ÕâÀïÖ¸Ó¢ÎÄ×Ö·û¡¿£¬Äã¿ÉÒÔÓà C-x f ÃüÁîÀ´ÖØ
+ÐÂÉ趨֮¡£Ö¸¶¨ÐÂÐб߽ç¿ÉÒÔÓÃÊý×Ö²ÎÊýÀ´½øÐд«µÝ¡£
 
->> ʹÓà C-u C-v Ò»»òÊý´Î£¬½«±¾Ðдøµ½¿¿½üÓ©Ä»µÄÉÏ·½¡£
->> ¼üÈë C-h m£¬¿´¿´ Text ģʽÓë Fundamental ģʽÊÇÄÄÀﲻͬ¡£
->> ¼üÈë C-x 1 ½«Îĵµ´ÓÓ©Ä»ÒƳýµô¡£
+>> ÊäÈë C-x f ²¢´«µÝ²ÎÊý 20£º C-u 2 0 C-x f¡£
+   È»ºóÊäÈëһЩÎÄ×Ö£¬¹Û²ì Emacs µÄ×Ô¶¯ÕÛÐж¯×÷
+   ×îºóÔÙÓà C-x f ½«±ß½çÉè»Ø 70¡£
 
-Ö÷ģʽ֮ËùÒÔ³ÆΪ¡¸Ö÷Òª£¨ major £©¡¹µÄÔ­ÒòÊÇÒòΪËüÃÇÒ²ÓдÎģʽ£¨ minor
-mode £©¡£´ÎÒªµÄģʽ²¢²»ÊÇÖ÷ģʽµÄÆäËûÑ¡Ôñ£¬¶øÖ»ÊÇ´ÎÒªµÄ¸ü¸Ä¡£Ã¿Ò»¸ö´Î
-ģʽ¿ÉÒÔ±»Ëü±¾ÉíÆôÓûòÍ£Ö¹£¬ºÍËùÓÐÆäËûµÄ´ÎģʽÎ޹أ¬²¢ÇÒÒ²ºÍÄúµÄÖ÷ģʽ
-Î޹ء£ËùÒÔÄú¿ÉÒÔ²»Ê¹ÓôÎģʽ£¬»òÒ»¸ö£¬»òÈκÎÊýÁ¿µÄ´ÎģʽµÄ×éºÏ¡£
+Èç¹ûÄãÔÚ¶ÎÂäµÄÖмä×öÁËһЩÐ޸ģ¬ÄÇô×Ô¶¯ÕÛÐÐģʽ²»»áÌæÄã°ÑÕû¸ö¶ÎÂäÖØÐÂ
+ÕÛÐС£ÖØÐÂ×Ô¶¯ÕÛÐÐÓà M-q£¬×¢ÒâʹÓõÄʱºò¹â±ê±ØÐëλÓÚÄãÏëÕÛÐеÄÄÇÒ»¶ÎÀï¡£
+
+>> Òƶ¯¹â±êµ½Ç°Ò»¶ÎÖУ¬È»ºóÊäÈë M-q¡£
 
-ÓÐÒ»¸ö½Ð×ö Auto Fill ģʽµÄ´Îģʽ·Ç³£ÓÐÓã¬ÌرðÊÇÔڱ༭ÈËÀàÓïÑÔµÄÎÄ×Ö
-ʱ¡£µ±Õâ¸öģʽÆôÓÃʱ£¬ Emacs ÔÚµ±Äú²åÈëÎÄ×Ö²¢ÇÒʹһÐÐÌ«¿íʱ£¬»á½«ÄÇÒ»
-ÐУ¬ÔÚ×ÖÓë×ÖÖ®¼ä×Ô¶¯µØ·Ö¸ô¿ª¡£
+
+* ËÑË÷£¨SEARCHING£©
+-------------------
+
+Emacs ¿ÉÒÔÏòÇ°»òÕßÏòºóËÑË÷×Ö·û´®¡£ËÑË÷ÃüÁîÊÇÒ»¸öÒƶ¯¹â±êµÄÃüÁËÑË÷³É
+¹¦ºó£¬¹â±ê»áÍ£ÁôÔÚËÑË÷Ä¿±ê³öÏֵĵط½¡£
+
+Emacs µÄËÑË÷ÃüÁîµÄ¶ÀÌØÖ®´¦ÔÚÓÚ£¬ËüÊÇ¡°½¥½øµÄ£¨incremental£©¡±£¬Òâ˼ÊÇËÑ
+Ë÷ÓëÊäÈëͬʱ½øÐУºÄãÔÚÕâ±ßÒ»¸ö×ÖÒ»¸ö×ÖµØÊäÈëÄãÏëËÑË÷µÄ¶«Î÷£¬Í¬Ê± Emacs
+ÔÚÄDZ߾ÍÌæÄãËÑË÷ÁË¡£
 
-Äú¿ÉÒÔ M-x auto fill mode<Return> À´½« Auto Fill ģʽÆôÓᣵ±Õâ¸öģʽ
-ÆôÓÃʱ£¬Äú¿ÉÒÔʹÓà M-x auto fill mode<Return> À´½«ËüÈ¡Ïû¡£µ±Õâ¸öģʽ²»
-ÓÃʱ£¬ÔòÕâ¸öÖ¸Áî»á½«ËüÆô¶¯£¬¶øµ±Õâ¸öģʽÆôÓÃʱ£¬Õâ¸öÖ¸Áî»á½«Ëü¹Ø±Õ¡£ÎÒ
-ÃÇ˵Õâ¸öÖ¸ÁîÓÃÀ´¡¸Çл»£¨ toggle £©¡¹Ä£Ê½¡£
+C-s ÊÇÏòÇ°ËÑË÷£¬C-r ÊÇÏòºóËÑË÷¡£²»¹ýÊÖ±ðÕâô¿ì£¡Ïȵȵȱð׿±ÊÔ¡£
+
+ÔÚÄã°´Ï C-s Ö®ºó£¬Äã»á·¢ÏÖ»ØÏÔÇøÀïÓС°I-search¡±×ÖÑù³öÏÖ£¬ÕâÊÇÔÚÌáʾ
+ÄãÄ¿Ç° Emacs Õý´¦ÓÚ¡°½¥½øËÑË÷¡±×´Ì¬£¬ÕýÔڵȴýÄãÊäÈëËÑË÷×Ö´®¡£<Return>
+»á½áÊøËÑË÷¡£
 
->> ÏÖÔÚ¼üÈë M-x auto fill mode<Return>¡£È»ºóÒ»ÔٵزåÈë×Ö´®
-   ¡¸ asdf ¡¹£¬Ö±µ½Äú¿´µ½Ëü·Ö³ÉÁ½ÐС£Äú±ØÐëÔÚËüÃÇÖ®¼ä°ÚÉÏ¿Õ°×£¬
-   ÒòΪ Auto Fill Ö»ÔÚ¿Õ°×´¦¶ÏÐС£
+>> ÊäÈë C-s ¿ªÊ¼Ò»¸öËÑË÷¡£×¢ÒâÇÃÂýÒ»µã£¬Ò»´ÎÊäÈëÒ»¸ö×Ö·û¡£
+   ÂýÂýÊäÈë¡°cursor¡±Õû¸ö´Ê£¬Ã¿ÇÃÒ»¸ö×Ö¾ÍÔÝͣһϣ¬×¢Òâ¹Û²ì¹â±ê¡£
+   ÏÖÔÚÄãÓ¦¸ÃÒÑÔø¾­ÕÒµ½¡°cursor¡±Õâ¸ö´ÊÁË¡£
+>> ÔÙ°´Ò»´Î C-s£¬ËÑË÷ÏÂÒ»¸ö¡°cursor¡±³öÏÖµÄλÖá£
+>> ÏÖÔÚ°´ËÄ´ÎÍ˸ñ¼ü£¬¿´¿´¹â±êÊÇÈçºÎÒƶ¯µÄ¡£
+>> Çà <Return> ½áÊøËÑË÷¡£
 
-±ß½çͨ³£±»É趨Ϊ 70 ¸ö×ÖÔª£¬µ«ÊÇÄú¿ÉÒÔÓà C-x f Ö¸ÁîÀ´¸Ä±äËü¡£ÄúÓ¦¸ÃÒÔ
-Ò»¸öÊý×Ö²ÎÊýµÄ·½Ê½À´¸ø¶¨ÄúËùÏ£ÍûµÄ±ß½çÉ趨¡£
+¸Õ²Å¿´×ÐϸÁËô£¿ÔÚÒ»¸ö½¥½øʽËÑË÷ÖУ¬Emacs »á³¢ÊÔÌøµ½ÄãÊäÈëµÄ×Ö·û´®µÄ³ö
+ÏÖλÖá£ÏëÌøµ½ÏÂÒ»¸öËÑË÷Ä¿±ê³öÏÖµÄλÖã¬Ö»ÒªÔÙ°´Ò»´Î C-s ¾ÍÐÐÁË¡£Èç¹ûÕÒ
+²»µ½£¬Emacs »á·¢³ö¡°ßÙ¡±µÄÒ»Éù£¬¸æËßÄãËÑË÷ʧ°Ü¡£ÔÚÕû¸ö¹ý³ÌÖУ¬¶¼¿ÉÒÔÓÃ
+C-g À´ÖÕÖ¹ËÑË÷¡£¡¾Äã»á·¢ÏÖ C-g Ö®ºó¹â±ê»Øµ½ÁËËÑË÷¿ªÊ¼Ç°µÄµØ·½£¬¶ø
+<Return> »áÈùâ±êÁôÔÚËÑË÷½á¹ûÉÏ£¬ÕâÊǺÜÓÐÓõŦÄÜ¡£¡¿
 
->> ¼üÈë C-x f ²¢¸½ÉÏÒýÊý 20£º¡ºC-u 2 0 C-x f¡»¡£
-   È»ºó¼üÈëһЩÎÄ×Ö£¬¿´¿´ Emacs ÒÔ 20 ¸ö×ÖÔª£¬
-   ÔÚÐÐÓëÐÐÖ®¼ä½øÐÐ fill ¶¯×÷¡£È»ºóÔÙÓÃÒ»´Î C-x f ½«±ß½çÉè»Ø 70¡£
+×¢Ò⣺ʹÓÃijЩÖն˵Äʱºò£¬ÊäÈë C-x C-s »á¶³½áÆÁÄ»¡¾ÆÁĻûÓÐÈκÎÊä³ö¡¿£¬
+ÕâÑùÄã¾Í¿´²»µ½ Emacs µÄÈκα仯¡£ÆäÔ­ÒòÊDzÙ×÷ϵͳµÄ¡°Á÷Á¿¿ØÖÆ¡±¹¦ÄÜ°Ñ
+C-s À¹½ØÁË£¬²¢ÇÒ¶³½áÁËÆÁÄ»£¬Emacs ×ÔȻҲ¾Í¿´²»µ½Õâ¸öÊäÈëÁË¡£Óà C-q ¿ÉÒÔ
+½â³ýÆÁÄ»¶³½á¡£Òª½â¾öÕâ¸öÎÊÌ⣬Çë²Î¿¼ Emacs ÊÖ²áÀïµÄ¡°Spontaneous Entry
+to Incremental Search¡±Ò»½Ú¡¾Emacs ÊÖ²á¿ÉÄÜ»¹Ã»ÓÐÖÐÎÄ·­Òë¡¿£¬ÄÇÀï¿ÉÄÜÓÐ
+һЩÓÐÓõĽ¨Òé¡£
 
-Èç¹ûÄúÔÚÒ»¸ö¶ÎÂäµÄÖмä×ö³ö¸Ä±ä£¬Auto Fill ģʽ²¢²»»áΪÄúÖØнøÐÐ fill 
-µÄ¶¯×÷£¨ re-fill £©¡£Òª re-fill Õâ¸ö¶ÎÂ䣬¼üÈë M-q (META-q)£¬¶øÓαê±Ø
-Ðë´¦ÔÚÆäÖС£
+Èç¹ûÄãÕýÔÚ½¥½øʽËÑË÷ÖУ¬°´Í˸ñ¼ü»áɾ³ýÄ¿±ê×Ö·û´®µÄ×îºóÒ»¸ö×Ö·û£¬²¢ÇÒ¹â
+±ê»á»Øµ½×î½üÒ»´ÎËÑË÷µÄÃüÖÐλÖᣱÈÈçÄãÒѾ­ÊäÈëÁË¡°c¡±£¬¹â±ê¾ÍÍ£ÔÚ¡°c¡±
+µÚÒ»´Î³öÏֵĵط½£¬ÔÙÊäÈë¡°u¡±£¬¹â±êÍ£ÔÚ¡°cu¡±µÚÒ»´Î³öÏֵĵط½£¬ÕâʱÔÙ°´
+Í˸ñ¼ü£¬¡°u¡±¾Í´ÓËÑË÷×Ö´®ÖÐÏûʧÁË£¬È»ºó¹â±ê»á»Øµ½¡°c¡±µÚÒ»´Î³öÏֵĵط½¡£
 
->> Òƶ¯Óα굽ǰһ¶ÎÖУ¬È»ºó¼üÈë M-q¡£
+ÁíÍâÈç¹ûÄãÔÚËÑË÷µÄʱºòÊäÈëÁË CONTROL »òÕß META ×éºÏ¼üµÄ»°£¬ËÑË÷¿ÉÄÜ»á
+½áÊø¡££¨Ò²ÓÐÀýÍ⣬±ÈÈç C-s ºÍ M-r ÕâЩ¶ÔËÑË÷ÓÐÌرðÒâÒåµÄ×éºÏ¼ü¡££©
+
+Ç°Ãæ˵µÄ¶¼ÊÇ¡°ÏòÏ¡±ËÑË÷£¬Èç¹ûÏë¡°ÏòÉÏ¡±ËÑË÷£¬¿ÉÒÔÓà C-r¡£C-r Óë C-s
+Ïà±È³ýÁËËÑË÷·½ÏòÏà·´Ö®Í⣬ÆäËüµÄ²Ù×÷¶¼Ò»Ñù¡£
 
 
-* ËÑÑ°£¨ SEARCHING £©
----------------------
+* ¶à´°¸ñ£¨MULTIPLE WINDOWS£©
+----------------------------
+
+Emacs µÄÃÔÈËÖ®´¦ºÜ¶à£¬Äܹ»ÔÚÆÁÄ»ÉÏͬʱÏÔʾ¶à¸ö´°¸ñ¾ÍÊÇÆäÖÐÖ®Ò»¡£
 
-Emacs ¿ÉÒÔËÑÑ°×Ö´®£¨×Ö´®¿ÉÒÔÊÇһȺÁ¬ÐøµÄ×ÖÔª»ò×Ö£©¡¾¾ÍÖÐÎÄÀ´Ëµ£¬×ÖÔªºÍ
-×Ö»ù±¾ÉÏÒâÒåÏàͬ£»´Ë´¦ËùÖ¸µÄ¡º×Ö¡»£¬ÊÇÓ¢ÎÄÖÐûÓб»¿Õ°×¸ô¿ªµÄ×ÖÔª¼¯
-ºÏ¡£¡¿£¬ÍùÇ°»òÍùºóËÑÑ°¶¼¿ÉÒÔ¡£ËÑÑ°Ò»¸ö×Ö´®ÊÇÒ»ÖÖÓαêÒƶ¯Ö¸ÁËü»á½«ÓÎ
-±êÒƶ¯µ½×Ö´®³öÏÖµÄÏÂÒ»¸öµØ·½¡£
+>> Òƶ¯¹â±êµ½ÕâÒ»ÐУ¬È»ºóÊäÈë C-u 0 C-l¡£
+
+>> ÏÖÔÚÊäÈë C-x 2£¬Ëü»á½«ÆÁÄ»»®·Ö³ÉÁ½¸ö´°¸ñ¡£
+   ÕâÁ½¸ö´°¸ñÀïÏÔʾµÄ¶¼ÊDZ¾Æª¿ìËÙÖ¸ÄÏ£¬¶ø¹â±êÔòÍ£ÁôÔÚÉÏ·½µÄ´°¸ñÀï¡£
 
-Emacs ËÑÑ°Ö¸ÁîÓë´ó²¿·Ö±à¼­Æ÷µÄËÑÑ°Ö¸ÁͬµÄµØ·½ÔÚ춣¬ËüÊÇ¡¸½¥½øµÄ
-£¨ incremental £©¡¹¡£Õâ±íʾËÑÑ°·¢ÉúÔÚÄú¼üÈëÏëÒªËÑÑ°µÄÎÄ×Ö´®ºó¡£
+>> ÊÔÊÔÓà C-M-v ¹ö¶¯Ï·½µÄ´°¸ñ¡£
+   £¨Èç¹ûÄ㲢ûÓÐ META ¼ü£¬Óà ESC C-v Ò²¿ÉÒÔ¡££©
+   ¡¾ÏòÉϹö¶¯ÊÇ C-M-S-v£¬Ò²¾ÍÊÇͬʱ°´×¡ CONTROL¡¢META ºÍ SHIFT ÔÙ°´ v¡¿
 
-Òª¿ªÊ¼ËÑÑ°µÄÖ¸ÁîÊÇ£ºC-s ÍùÇ°ËÑÑ°£¬C-r ÍùºóËÑÑ°¡£µ«ÏȵÈһϣ¡ÏÖÔÚÏȲ»Òª
-ÊÔ¡£
+>> ÊäÈë C-x o£¨¡°o¡±Ö¸µÄÊÇ¡°ÆäËü£¨other£©¡±£©£¬
+   ½«¹â±êתÒƵ½Ï·½µÄ´°¸ñ¡£
 
-µ±Äú¼üÈë C-s ʱ£¬»á·¢ÏÖµ½ÓÐÒ»¸ö×Ö´®¡¸I-search¡¹³öÏÖÔÚ»ØÓ¦ÇøÖÐ×÷ΪÌáʾ¡£
-Ëü¸æËßÄú Emacs ÏÖÔÚÕý´¦ì¶³ÆΪ¡¸½¥½øʽËÑÑ°¡¹µÄ״̬ÖУ¬µÈ´ýÄú¼üÈëÄúÏëÒª
-ËÑÑ°µÄ×Ö´®¡£<Return> »á½áÊøÒ»¸öËÑÑ°¡£
+>> ÔÚÏ·½µÄ´°¸ñÖУ¬Óà C-v ºÍ M-v À´¹ö¶¯¡£
+   ͬʱ¼ÌÐøÔÚÉÏ·½µÄ´°¸ñÀïÔĶÁÕâЩָµ¼¡£
+
+>> ÔÙÊäÈë C-x o ½«¹â±êÒƻص½ÉÏ·½µÄ´°¸ñÀï¡£
+   ¹â±ê»á»Øµ½ËüÔÚÉÏ·½´°¸ñÖÐÔ­±¾ËùÔÚµÄλÖá£
 
->> ÏÖÔÚ¼üÈë C-s ¿ªÊ¼Ò»¸öËÑÑ°¡£ÂýÒ»µã£¬Ò»´Î¼üÈëÒ»¸ö×ÖÔª£¬
-   ¼üÈ롺cursor¡»Õâ¸ö×Ö£¬Ã¿¼üÈëÒ»¸ö×ÖԪʱ£¬ÉÔ΢ͣһÏ£¬
-   ×¢Òâ¿´¿´Óα귢ÉúÁËʲôÊ¡£ÏÖÔÚÄúÒÑÔø¾­ËÑÑ°¹ý¡¸cursor¡¹Õâ¸ö×ÖÁË¡£
->> ÔٴμüÈë C-s À´ËÑÑ°¡¸cursor¡¹µÄÏÂÒ»¸ö³öÏÖλÖá£
->> ÏÖÔÚ¼üÈë <Delback> ËĴΣ¬¿´¿´ÓαêÊÇÈçºÎÒƶ¯µÄ¡£
->> ¼üÈë <Return> ½áÊøËÑÑ°¡£
+Á¬ÐøʹÓà C-x o ¿ÉÒÔ±éÀúËùÓд°¸ñ¡£Ã¿Ò»¸ö´°¸ñ¶¼ÓÐËü×Ô¼ºµÄ¹â±êλÖ㬵«ÊÇÖ»
+ÓÐÒ»¸ö´°¸ñ»áÕæÕýÏÔʾÕâ¸ö¹â±ê¡£¡¾ÆäËü´°¸ñÔÚ¿ØÖÆ̨ϲ»»áÏÔʾ¹â±ê£¬ÔÚͼÐÎ
+´°¿ÚÏÂȱʡÏÔʾΪïοչâ±ê¡£¡¿Ò»°ãËùÓеı༭ÃüÁ×÷ÓÃÓÚÕâ¸ö¹â±êËùÔڵĴ°
+¸ñ£¬ÎÒÃdzÆÕâ¸ö´°¸ñΪ¡°±»Ñ¡ÖеĴ°¸ñ¡±¡£
 
-ÄúÓÐûÓп´µ½·¢ÉúÁËʲô£¿ÔÚÒ»¸ö½¥½øʽËÑÑ°ÖУ¬Emacs ÊÔÖøÒª×ßµ½Äú¼üÈëµÄ×Ö
-´®µÄÏÂÒ»¸ö³öÏÖλÖá£ÒªÒƶ¯µ½ÓαêËùÔÚµÄÏÂÒ»¸ö³öÏÖλÖã¬Ö»ÒªÔÙ¼üÈë C-s 
-Ò»´Î¡£Èç¹û²¢Ã»ÓÐÕâÑùµÄ³öÏÖλÖôæÔÚ£¬Emacs »áßÙÒ»Éù£¬²¢¸æËßÄúÄ¿Ç°µÄËÑÑ°
-¡¸Ê§°Ü¡¹¡£ÁíÍâ C-g Ò²¿ÉÒÔÓÃÀ´½áÊøËÑÑ°¡£
+µ±ÄãÔÚÒ»¸ö´°¸ñÖб༭£¬µ«ÊÇÏëÓÃÁíÒ»¸ö´°¸ñ×÷²Î¿¼µÄʱºò£¬C-M-v ÊǺÜÓÐÓõÄ
+ÃüÁî¡£Äã¿ÉÒÔ±£³Ö¹â±êʼÖÕ´¦Óڱ༭´°¸ñÖУ¬È»ºóÓà C-M-v ÃüÁîÔÚÁíÍâÒ»¸ö´°¸ñ
+Àï¹ö¶¯¡£¡¾·­ÒëºÍУ¶Ô¾ÍºÜÊʺÏÓÃÕâÖÖ·½Ê½½øÐС£¡¿
+
+C-M-v ÊÇÒ»¸ö CONTROL-META ×éºÏ¼ü¡£Èç¹ûÄãÓÐ META ¼ü£¬Äã¿ÉÒÔͬʱ°´×¡
+CONTROL ºÍ META ¼üÈ»ºóÊäÈë v¡£CONTROL ºÍ META ¼üÄĸöÏÈ°´Ã»ÓйØϵ£¬ÒòΪ
+ËüÃÇÖ»ÊÇÓÃÀ´¡°ÐÞÊΣ¨modify£©¡±ÄãÊäÈëµÄ×Ö·ûµÄ¡£
 
-×¢Ò⣺ÔÚijЩϵͳÖУ¬¼üÈë C-s ½«»á°ÑÓ©Ä»¶³½á£¬Äú½«¿´²»µ½´Ó Emacs À´µÄÈÎ
-ºÎÊä³ö¡£Õâ±íʾ²Ù×÷ϵͳһ¸ö³ÆΪ¡¸Á÷³Ì¿ØÖÆ¡¹µÄ¡¸¹¦ÄÜ¡¹½« C-s Ö¸ÁîÀ¹½Øס£¬
-²¢ÇÒ²»ÈÃËü´«µ½ Emacs¡£ÒªÈ¡ÏûÓ©Ä»µÄ¶³½á£¬Çë¼üÈë C-q¡£È»ºóµ½ Emacs ʹÓÃ
-ÊÖ²áÖп´¿´¶Ô춡¸½¥½øʽËÑÑ°µÄͬʱ½øÈ루 Spontaneous Entry to
-Incremental Search £©¡¹Õâ¸öÖ÷Ì⣬ÒÔÈ¡µÃ´¦ÀíÕâ¸ö¡¸¹¦ÄÜ¡¹µÄ½¨Òé¡£
+Èç¹ûÄ㲢ûÓÐ META ¼ü£¬ÄãÒ²¿ÉÒÔÓà ESC À´´úÌ棬²»¹ýÕâÑù×Ó°´¼ü˳Ðò¾ÍÓйØϵ
+ÁË£ºÄã±ØÐëÊäÈë ESC £¬È»ºóÔÙÊäÈë CONTROL-v¡£CONTROL-ESC v ÊÇûÓõģ¬ÒòΪ
+ESC ±¾ÉíÊÇÒ»¸ö×Ö·û¼ü£¬¶ø²»ÊÇÒ»¸öÐÞÊμü£¨modifier key£©¡£
+
+>> £¨ÔÚÉÏ·½´°¸ñÀÊäÈë C-x 1 ¹ØµôÏ·½´°¸ñ¡£
+
+£¨Èç¹ûÄãÔÚÏ·½µÄ´°¸ñÀïÊäÈë C-x 1£¬ÄÇô¾Í»á¹ØµôÉÏ·½µÄ´°¸ñ¡£Äã¿ÉÒÔ°ÑÕâ¸ö
+ÃüÁî¿´³ÉÊÇ¡°Ö»±£ÁôÒ»¸ö´°¸ñ¡±¡ª¡ª¾ÍÊÇÎÒÕýÔڱ༭µÄÕâ¸ö¡££©
 
-Èç¹ûÄúÔÚÒ»¸ö½¥½øʽËÑÑ°µÄÖм䣬²¢ÇÒ¼üÈë <Delback>£¬Äú¿ÉÒÔ·¢ÏÖÔÚËÑÑ°×Ö´®
-ÖеÄ×îºóÒ»¸ö×ÖÔª±»Ïû³ýÁË£¬²¢ÇÒËÑÑ°»á»Øµ½Õâ¸öËÑÑ°µÄ×îºóÒ»¸öµØ·½¡£¾ÙÀýÀ´
-˵£¬¼ÙÉèÄúÒѾ­¼üÈëÁË¡ºc¡»£¬ÓÃÀ´Ñ°ÕÒ¡¸c¡¹µÄµÚÒ»´Î³öÏÖ¡£ÏÖÔÚÈç¹ûÄú¼üÈë
-¡ºu¡»£¬Óαê»áÒƶ¯µ½¡¸cu¡¹µÄµÚÒ»´Î³öÏÖλÖá£ÏÖÔÚ¼üÈë <Delback> £¬Õâ»á½«
-¡¸u¡¹´ÓËÑÑ°×Ö´®ÖÐÏû³ý£¬²¢ÇÒÓαê»áÒƻص½¡¸c¡¹µÄµÚÒ»´Î³öÏÖλÖá£
+²»Í¬µÄ´°¸ñÀï¿ÉÒÔÏÔʾ²»Í¬µÄ»º³åÇø¡£Èç¹ûÄãÔÚÒ»¸ö´°¸ñÀïÓà C-x C-f ´ò¿ªÁË
+Ò»¸öÎļþ£¬ÁíÒ»¸ö´°¸ñ²¢²»»áÓÐʲô±ä»¯¡£ÔÚÈκÎÒ»¸ö´°¸ñÀﶼ¿ÉÒÔ´ò¿ªÎļþ¡£
+
+ÓÐÒ»ÖÖ·½Ê½¿ÉÒÔÈÃÄãÔÚÁíÒ»¸ö´°¸ñÀï´ò¿ªÎļþ£º
 
-Èç¹ûÄúÔÚÒ»¸öËÑÑ°µÄÖм䣬²¢ÇÒ¼üÈëÒ»¸ö CONTROL »ò META ×ÖÔªµÄ»°£¬£¨µ«ÓÐ
-һЩÀýÍâ -- ¶ÔËÑÑ°¶øÑÔÌرðµÄ×ÖÔª£¬ÏñÊÇ C-s ºÍ C-r £©£¬ËÑÑ°»á±»½áÊø¡£
+>> ÊäÈë C-x 4 C-f£¬ºóÃæ½ô¸ú×ÅÊäÈëÒ»¸öÎļþÃû£¬Óà <Return> ½áÊø¡£
+   ¿ÉÒÔ¿´µ½ÄãÖ¸¶¨µÄÎļþ³öÏÖÔÚÏ·½µÄ´°¸ñÖУ¬Í¬Ê±¹â±êÒ²Ìøµ½ÁËÄÇÀï¡£
 
-C-s »á¿ªÊ¼Ò»¸öËÑÑ°£¬Ëü»áÑ°ÕÒËÑÑ°×Ö´®ÔÚÄ¿Ç°ÓαêλÖá¸Ö®ºó¡¹£¬µÄÈκγöÏÖ
-λÖá£Èç¹ûÄúÏëÒªÔÚÏÈÇ°ÎÄ×ÖÖÐËÑÑ°£¬¼üÈë C-r ×÷ΪÌæ´ú¡£³ýÁËËÑÑ°µÄ·½ÏòÏà
-·´Ö®Í⣬ÎÒÃÇËù˵µÄÓÐ¹Ø C-s µÄËùÓÐÊÂÇ飬ͬÑùµØ¿ÉÒÔÓ¦Óõ½ C-r ÉÏ¡£
+>> ÊäÈë C-x o »Øµ½ÉÏ·½µÄ´°¸ñ£¬È»ºóÔÙÓà C-x 1 ¹ØµôÏ·½´°¸ñ¡£
 
 
-* ¶àÖØ´°¸ñ£¨ MULTIPLE WINDOWS £©
---------------------------------
-
-Emacs Ðí¶àºÃ¹¦ÄܵÄÆäÖÐÖ®Ò»ÊÇ£¬Äú¿ÉÒÔÔÚÓ©Ä»ÖÐͬʱչʾ³¬¹ýÒ»¸ö´°¸ñ¡£
-
->> Òƶ¯Óα굽ÕâÒ»Ðв¢ÇÒ¼üÈë C-u 0 C-l¡£
-
->> ÏÖÔÚ¼üÈë C-x 2£¬Ëü»á½«Ó©Ä»Æ½·Ö³ÉÁ½¸ö´°¸ñ¡£
-   ÕâÁ½¸ö´°¸ñ¶¼ÏÔʾÖøÕâ¸ö¿ìËÙÖ¸ÄÏ¡£ÓαêÔòÍ£ÁôÔÚÉÏ·½µÄ´°¸ñ¡£
-
->> ¼üÈë C-M-v ÒÔ¾í¶¯Ï·½µÄ´°¸ñ¡£
-   £¨Èç¹ûÄú²¢Ã»ÓÐÒ»¸öÕæµÄ META ¼ü£¬Ôò¼üÈë ESC C-v Òà¿É¡££©
-
->> ¼üÈë C-x o£¨¡ºo¡»Ö¸µÄÊÇÆäËû¡ºother¡»µÄÒâ˼£©£¬
-   ½«ÓαêÒƶ¯µ½Ï·½µÄ´°¸ñ¡£
-
->> ÔÚÏ·½µÄ´°¸ñÖУ¬Ê¹Óà C-v ºÍ M-v À´¾í¶¯Ëü¡£
-   ¼ÌÐøά³ÖÔÚÉÏ·½µÄ´°¸ñÖÐÔĶÁÕâЩָÒý¡£
-
->> ÔÙÒ»´Î¼üÈë C-x o ½«ÓαêÒƻص½ÉÏ·½µÄ´°¸ñ¡£
-   Óαê»á»Øµ½ËüÔÚÉÏ·½´°¸ñÖУ¬Ô­±¾ËùÔÚµÄλÖá£
-
-Äú¿ÉÒÔ³ÖÐøʹÓà C-x o ÔÚ´°¸ñÖ®¼äÇл»¡£Ã¿Ò»¸ö´°¸ñÓÐËü×Ô¼ºµÄÓαêλÖ㬵«
-ÊÇÖ»ÓÐÒ»¸ö´°¸ñ»áÕæµÄÏÔʾ³öÓαꡣËùÓÐͨ³£µÄ±à¼­Ö¸ÁîÖ»»áÓ¦Óõ½ÄǸöÓαêËù
-ÔڵĴ°¸ñ¡£ÎÒÃdzÆÕâ¸öΪ¡¸±»Ñ¡ÔñµÄ´°¸ñ¡¹¡£
+* µÝ¹é±à¼­£¨RECURSIVE EDITING LEVELS£©
+--------------------------------------
 
-Ö¸Áî C-M-v ÔÚµ±Äúì¶Ò»¸ö´°¸ñÖб༭ÎÄ×Ö£¬²¢Ê¹ÓÃÆäËûµÄ´°¸ñ×÷Ϊ²Î¿¼Ö®ÓÃʱ£¬
-ÊǷdz£ÓÐÓõġ£Äú¿ÉÒÔ½«ÓαêÒ»Ö±±£³ÖÔÚÄúÕýÔڱ༭µÄ´°¸ñÖУ¬²¢ÒÔ C-M-v Ö¸
-ÁîÔÚÆäËûµÄ´°¸ñÑ­ÐòµØÇ°½ø¡£¡¾ÑéÖ¤¹¤×÷ÌرðÊʺÏÒÔÕâÖÖ·½Ê½À´½øÐУ¬Èç GNU 
-ÖÐÒëС×飺ÕÒÒ»¸öԭʼӢÎĵµ°¸£»ÔÙÕÒËü·­ÒëºÃµÄÖÐÎĵµ°¸£¬±à¼­Õâ¸ö¡¸±»Ñ¡Ôñ
-µÄ´°¸ñ¡¹£¬ÒÔ C-M-v Ö¸Áî¸úÉÏÑéÖ¤ÖеĶÎÂä¡­¡­¡£¡¿
-
-C-M-v ÊÇ CONTROL-META ×ÖÔªµÄÒ»¸öÀý×Ó¡£Èç¹ûÄúÓÐÒ»¸öÕæµÄ META ¼ü£¬Äú¿ÉÒÔ
-ͬʱ°´×¡ CONTROL ºÍ META ÔÙ¼üÈë v À´¼üÈë C-M-v¡£CONTROL »ò META ¡¸Ë­ÏÈ
-±»°´×¡¡¹²¢Ã»ÓÐÓ°Ï죬ÒòΪÕâÁ½¸ö¼ü¶¼ÊÇÓÃÀ´ÐÞÊÎÄúËù¼üÈëµÄ×ÖÔª¡£
-
-Èç¹ûÄú²¢Ã»ÓÐÒ»¸öÕæµÄ META ¼ü£¬Äú¿ÉÒÔʹÓà ESC À´×÷ΪÌæ´ú£¬ÕâÑù×Ó˳Ðò¾Í
-ÓйØϵÁË£ºÄú±ØÐë¼üÈë ESC £¬¸úÖø¼üÈë CONTROL-v£¬CONTROL-ESC v ²¢²»»á×÷
-Óá£ÕâÊÇÒòΪ ESC ÊÇÒ»¸ö¾ßÓб¾Éí×÷ÓõÄ×ÖÔª£¬¶ø²»ÊÇÒ»¸öÐÞÊμü¡£
+ÓÐʱºòÄã»á½øÈëËùνµÄ¡°µÝ¹é±à¼­¡±¡£µÝ¹é±à¼­×´Ì¬ÓÉλÓÚ״̬À¸µÄ·½À¨ºÅËùÖ¸
+ʾ£¬ÆäÖаüº¬ÁËÓÃСÀ¨ºÅÀ´Ö¸Ã÷µÄģʽÃû³Æ¡£±ÈÈç˵£¬ÄãÓÐʱ¿ÉÄܻῴµ½
+[(Fundamental)]£¬¶ø²»ÊÇ (Fundamental)¡£¡¾±ÈÈçÔÚÓà M-% ½øÐн»»¥Ê½Ìæ»»µÄ
+ʱºòÄãÓÖÓÃÁË C-s ½øÐÐËÑË÷£¬ÕâʱÌ滻ģʽ²¢Ã»ÓнáÊø£¬µ«ÄãÓÖ½øÈëÁËËÑË÷ģʽ£¬
+Õâ¾ÍÊÇËùνµÄµÝ¹é±à¼­¡£¡¿
 
->> £¨ÔÚÉÏ·½´°¸ñ£©¼üÈë C-x 1 ÒÔ³ýȥϷ½´°¸ñ¡£
-
-£¨Èç¹ûÄúÒѾ­Ôڵ׶˵Ĵ°¸ñ¼üÈë C-x 1£¬ÄÇô½«»á°ÑÉÏÃæµÄ´°¸ñÒþ²Øס¡£½«Õâ¸ö
-Ö¸ÁîÏëÏñ³É¡¸Ö»±£ÁôÒ»¸ö´°¸ñ -- ÎÒÕýÔڱ༭µÄÕâ¸ö¡£¡¹£©
+À뿪µÝ¹é±à¼­¿ÉÒÔÓà ESC ESC ESC¡£ÕâÊÇÒ»¸ö×îͨÓõġ°À뿪¡±ÃüÁÄãÉõÖÁ¿É
+ÒÔʹÓÃËüÀ´¹Øµô¶àÓàµÄ´°¸ñ£¬»òÕßÀ뿪С»º³å¡£
 
-Äú²»ÐèÒªÔÚÁ½¸ö²»Í¬µÄ´°¸ñÖÐÏÔʾÏàͬµÄ»º³åÇø¡£Èç¹ûÄúʹÓà C-x C-f ÔÚÒ»¸ö
-´°¸ñÖÐÕÒµµ°¸£¬ÁíÒ»¸ö´°¸ñ²¢²»Òò¶ø¸Ä±ä¡£Äú¿ÉÒÔÔÚ¶ÀÁ¢µÄÈÎÒ»¸ö´°¸ñÖÐÕÒ¡²Ëü
-×Ô¼ºµÄ¡³Ò»¸öµµ°¸¡£
-
-ÕâÀïÓÐÁíÍâÒ»¸ö·½Ê½¿ÉÒÔÓÃÀ´£¬Ê¹ÓÃÁ½¸ö´°¸ñÏÔʾÁ½¸ö²»Í¬µÄ¶«Î÷£º
+>> ÊäÈë M-x ½øÈëС»º³å£»È»ºóÊäÈë ESC ESC ESC À뿪¡£
 
->> ¼üÈë C-x 4 C-f£¬ºóÃæ¸úÖøÄúµÄÆäÖÐÒ»¸öµµ°¸µÄÃû³Æ¡£
-   ÒÔ <Return> ×÷Ϊ½áÊø¡£¿´¿´Ö¸¶¨µÄµµ°¸³öÏÖÔÚÏ·½µÄ´°¸ñ¡£
-   ÓαêÒ²Åܵ½ÄÇÀï¡£
-
->> ¼üÈë C-x o ÒԻص½ÉÏ·½µÄ´°¸ñ£¬È»ºóÒÔ C-x 1 ɾ³ýµôÏ·½´°¸ñ¡£
+Äã²»ÄÜÓà C-g À´À뿪µÝ¹é±à¼­£¬ÒòΪ C-g µÄ×÷ÓÃÊÇÈ¡ÏûÃüÁîºÍ¡°²ÎÊý
+£¨arguments£©¡±£¬¶øÕâЩ¶«Î÷¶¼Î»ÓÚ±¾²ãµÝ¹é±à¼­¡°Ö®ÄÚ¡±¡£
 
 
-* µÝ¹é±à¼­½×²ã£¨ RECURSIVE EDITING LEVELS £©
---------------------------------------------
-
-ÓÐʱºòÄú»á½øÈëËùνµÄ¡¸µÝ¹é±à¼­½×²ã¡¹¡£ËüÊÇÓÉλÔÚ״̬Ðеķ½À¨»¡ËùÖ¸Ã÷£¬
-²¢ÇÒ°üº¬×¡ÒÔСÀ¨»¡À´Ö¸Ã÷µÄģʽÃû³Æ¡£¾ÙÀýÀ´Ëµ£¬Äú¿ÉÄܻῴµ½ 
-[(Fundamental)]£¬¶ø²»ÊÇ (Fundamental)¡£
+* »ñµÃ¸ü¶à°ïÖú£¨GETTING MORE HELP£©
+-----------------------------------
 
-ÒªÀ뿪µÝ¹é±à¼­½×²ã£¬Çë¼üÈë ESC ESC ESC¡£ÕâÊǸöÈ«¹¦Äܵġ¸À뿪¡¹Ö¸Áî¡£Äú
-Ò²¿ÉÒÔʹÓÃËüÀ´³ýÈ¥¶àÓàµÄ´°¸ñ£¬²¢ÇÒÀ뿪С»º³åÇø¡£
-
->> ¼üÈë M-x ÒÔ½øÈëС»º³åÇø£»È»ºó¼üÈë ESC ESC ESC À뿪¡£
-
-ÄúÎÞ·¨Ê¹Óà C-g À´À뿪µÝ¹é±à¼­½×²ã¡£ÕâÊÇÒòΪ C-g ÊÇÓÃÀ´È¡ÏûÖ¸ÁîÒÔ¼°¡¸Î»
-춡¹µÝ¹é±à¼­½×²ãÖеġ¸ÒýÊý£¨ arguments £©¡¹Ö®¹Ê¡£
-
-
-* È¡µÃ¸ü¶àµÄ°ïÖú£¨ GETTING MORE HELP £©
----------------------------------------
+±¾¿ìËÙÖ¸ÄϵÄÄ¿µÄ½ö½öÊÇ°ïÖúÄãѧ»áÔÚ Emacs µÄ´óº£ÀïÓÎÓ¾£¬²»ÖÁÓÚÒ»ÉÏÀ´¾ÍÑÍ
+ËÀ¡£ÓÐ¹Ø Emacs µÄ»°ÌâÈýÌìÈýÒ¹Ò²½²²»Í꣬ÕâÀï×ÔÈ»ÊÇд²»ÏÂÁË¡£Emacs ºÜÀí½â
+ÄãÇóÖªÈô¿ÊµÄÐÄÇ飬ÒòΪËüÌṩµÄÇ¿¾¢¹¦ÄÜʵÔÚÊÇÌ«¶àÁË¡£Emacs ÌṩÁËһЩÃü
+ÁîÀ´²é¿´ Emacs ÃüÁîµÄÎĵµ£¬ÕâЩÃüÁÒÔ CONTROL-h ¿ªÍ·£¬Õâ¸ö×Ö·ûÒ²Òò´Ë
+±»³ÆΪ¡°Help£¨°ïÖú£©×Ö·û¡±¡£
 
-ÔÚ±¾¿ìËÙÖ¸ÄÏÖУ¬ÎÒÃÇÊÔÖø½öÌṩ¸Õ¸ÕºÃµÄÐÅÏ¢ÈÃÄú¿ÉÒÔ¿ªÊ¼Ê¹Óà Emacs¡£ÔÚ 
-Emacs ÖÐÓÐÌ«¶à¿ÉÈ¡µÃµÄÐÅÏ¢£¬ÏëÒªÔÚÕâÀïÈ«²¿½âÊÍÊDz»¿ÉÄܵġ£È»¶ø£¬ÄúÒ²Ðí
-»áÏëҪѧϰ¸ü¶à Emacs Ïà¹ØµÄÐÅÏ¢£¬ÒòΪËüÓÐÐí¶àÆäËûÓÐÓõŦÄÜ¡£Emacs Ìá
-¹©ÁË¡¸ÔĶÁÓÐ¹Ø Emacs Ö¸ÁµÄÖ¸Áî¡£ÕâЩ¡¸help¡¹Ö¸ÁÒÔ CONTROL-h Õâ¸ö
-×ÖÔª×÷Ϊ¿ªÍ·£¬³Æ×÷Ϊ¡¸Help ×ÖÔª¡¹¡£
-
-ҪʹÓà Help ¹¦ÄÜ£¬¼üÈë C-h ×ÖÔª£¬È»ºóÔÙ¼üÈëÒ»¸ö˵Ã÷ÄúËùÐèÒªµÄ°ïÖúµÄ×Ö
-Ôª¡£Èç¹ûÄúÕæµÄ²»ÖªµÀÒªÎÊʲô£¬ÄÇôÇë¼üÈ롺C-h ?¡»£¬´Ëʱ Emacs ½«»á¸æËß
-ÄúËüÄܹ»ÌṩµÄ°ïÖú¡£Èç¹ûÄúÒѾ­¼üÈë C-h£¬µ«·¢ÏÖÄú²¢²»ÐèÒªÈκΰïÖú£¬¼üÈë 
-C-g À´È¡ÏûµôËü¾ÍÊÇÁË¡£
+ҪʹÓðïÖú£¨Help£©¹¦ÄÜ£¬ÇëÏÈÊäÈë C-h£¬È»ºóÔÙÊäÈëÒ»¸ö˵Ã÷ÄãÐèÇóµÄ×Ö·û¡£
+Èç¹ûÄãÔε½Á¬ÐèҪʲô°ïÖú¶¼²»ÖªµÀ£¬ÄÇô¾ÍÊäÈë C-h ?£¬Emacs »á¸æËßÄãËüÄÜ
+ÌṩÄÄЩ°ïÖú¡£Èç¹ûÄãÒѾ­°´ÁË C-h ÓÖÏë·´»Ú£¬ÄÇôÓà C-g È¡ÏûËü¾ÍÊÇÁË¡£
 
-£¨ÓÐЩÍøÕ¾½« C-h Õâ¸ö×ÖÔªµÄÒâÒå¸Ä±äÁË¡£ËûÃÇÕæµÄ²»Ó¦¸Ã°ÑËüÉèΪ¶ÔËùÓÐʹ
-ÓÃÕßÈ«²¿¶¼ÊÊÓõķ½·¨£¬ËùÒÔÄúÏÖÔÚ¾ÍÓÐÁ˸öÀíÓÉÀ´±§Ô¹ÏµÍ³¹ÜÀíÕßÁË¡£ÔÚ´Ëͬ
-ʱ£¬Èç¹û C-h ²¢Ã»ÓÐÔÚ´°¸ñµÄµ×²¿ÏÔʾÈκÎÓйذïÖúµÄѶϢ£¬ÊÔÖø¼üÈë F1 ¼ü£¬
-»òÊÇ M-x help <Return>¡££©
+£¨ÓÐЩվµã¸Ä±äÁË C-h µÄÒâ˼£¬ËûÃÇÕâÖÖÒÔ¼º¶ÈÈËÍâ¼ÓÒ»µ¶ÇеÄ×ö·¨Èõ¹ÊÇÈÃÄã
+¿ÉÒÔÒåÕý´ÇÑϵı§Ô¹ÏµÍ³¹ÜÀíÔ±£¬ÕæµÄ²»ÊÇÌ«ºÃ¡£»°Ëµ»ØÀ´£¬Èç¹ûÄã°´ C-h Ö®ºó
+ûÓÐÈκΰïÖúÐÅÏ¢ÏÔʾ³öÀ´£¬ÄÇôÊÔÊÔ F1 ¼ü»òÕß M-x help <Return>¡££©
 
-×î»ù±¾µÄ HELP ¹¦ÄÜÊÇ C-h c¡£¼üÈë C-h£¬×ÖÔª c£¬ÒÔ¼°Ò»¸ö»òÒ»´®×ÖÔª£»È»ºó 
-Emacs »áÏÔʾһ¸ö·Ç³£¼ò¶ÌµÄÓйØÕâ¸öÖ¸ÁîµÄ½âÊÍ¡£
+×î»ù±¾µÄ°ïÖú¹¦ÄÜÊÇ C-h c¡£ÊäÈë C-h c Ö®ºóÔÚÊäÈëÒ»¸ö×éºÏ¼ü£¬Emacs »áºÜ¼ò
+ÒªµØ¸ø³öÕâ¸öÃüÁîµÄ˵Ã÷¡£
 
->> ¼üÈë C-h c C-p¡£
+>> ÊäÈë C-h c C-p¡£
 
-ѶϢӦ¸Ã»áÏñÊÇÕâÑù£º
+ÏÔʾµÄÏûÏ¢Ó¦¸Ã»áÊÇÕâÑù£º
 
         C-p runs the command previous-line
 
-Õâ¸æËßÁËÄú¡¸º¯ÊýµÄÃû³Æ¡¹¡£º¯ÊýÃû³ÆÖ÷ÒªÊÇÓÃÀ´×Ô¶©ÒÔ¼°À©³ä Emacs¡£µ«ÊÇÓÉ
-춺¯ÊýÃû³ÆÊÇÓÉ¡¸ÓÃÀ´Ö¸³öÕâÖ¸ÁîÔÚ×öЩʲô¡¹¶ø±»Ñ¡¶¨£¬ËüÃÇÒò´ËÒ²¿ÉÒÔ×÷Ϊ
-·Ç³£¼ò¶ÌµÄÎĵµ -- ×ã¹»ÌáÐÑÄúÒѾ­Ñ§¹ýµÄÖ¸Áî¡£
+ÕâÌõÏûÏ¢ÏÔʾÁË C-p ÃüÁî¶ÔÓ¦µÄº¯ÊýÃû£¬º¯ÊýÃûÖ÷ÒªÓÃÀ´¶¨ÖƺÍÀ©Õ¹ Emacs¡£Ãü
+ÁîµÄ¹¦ÄÜÓɺ¯ÊýÍê³É£¬ËùÒÔº¯ÊýÃû±¾ÉíÒ²¿ÉÒÔ±»¿´³ÉÊÇ×î¼òµ¥µÄÎĵµ¡ª¡ªÖÁÉÙ¶Ô
+ÓÚÄãÒѾ­Ñ§¹ýµÄÃüÁîÀ´Ëµ£¬ËüÃǵĺ¯ÊýÃû×ãÒÔ½âÊÍËüÃÇËùÍê³ÉµÄ¹¤×÷ÁË¡£
 
-¶à×ÖÔªÖ¸ÁîÏñÊÇ C-x C-s ºÍ £¨Èç¹ûÄúûÓÐ META »ò EDIT »ò ALT ¼ü£©<ESC>v 
-Ò²¿ÉÒÔÔÚ C-h c ºóÃæ³öÏÖ¡£
+¶à×Ö·ûÃüÁîÒ»Ñù¿ÉÒÔÓà C-h c À´²é¿´¡£
 
-ҪȡµÃ¸ü¶àÓйØÒ»¸öÖ¸ÁîµÄÐÅÏ¢£¬Óà C-h k À´È¡´úʹÓà C-h c ¡£
+ÏëµÃµ½¸ü¶àµÄÐÅÏ¢£¬Çë°Ñ C-h c »»³É C-h k ÊÔÊÔ¿´¡£
 
->> ¼üÈë C-h k C-p¡£
+>> ÊäÈë C-h k C-p¡£
 
-Õâ»áÔÚÒ»¸ö Emacs ´°¸ñÏÔʾÕâ¸öº¯ÊýµÄ˵Ã÷ÎĵµÒÔ¼°ËüµÄÃû³Æ¡£µ±ÄúÔĶÁÍêºó£¬
-¼üÈë C-x 1 ÒÔÌøÀëÕâЩ°ïÖúÎÄ×Ö¡£Äú²¢²»ÐèÒªÂíÉϸúÖø×ö¡£Äú¿ÉÒÔ×öЩ±à¼­£¬
-µ±²Î¿¼µ½°ïÖúÎÄ×ÖʱÔÙ¼üÈë C-x 1¡£
-
-ÕâÀïÓÐһЩÆäËûÓÐÓÃµÄ C-h Ñ¡Ï
+ÉÏÃæµÄÃüÁî»áдò¿ªÒ»¸ö Emacs ´°¸ñ£¬²¢ÔÚÆäÖÐÏÔʾº¯ÊýµÄÃû³Æ¼°ÆäÎĵµ¡£Äã¶Á
+ÍêÖ®ºó£¬¿ÉÒÔÓà C-x 1 ¹ØµôÕâ¸ö°ïÖú´°¸ñ¡£µ±È»Äã²¢²»ÐèÒªÔÚ C-h k Ö®ºóÁ¢¼´
+ÕâÑù×ö£¬ÄãÍêÈ«¿ÉÒÔÏÈÔڱ༭´°¸ñÀï×öµã±ðµÄÊÂÇ飬ȻºóÔÙÓà C-x 1 ¹Øµô°ïÖú¡£
 
-   C-h f        ½âÊÍÒ»¸öº¯Êý¡£ÄúÒª¼üÈë´Ëº¯ÊýµÄÃû³Æ¡£
+»¹ÓÐһЩÆäËûÓÐÓÃµÄ C-h ÃüÁ
 
->> ÊÔÖø¼üÈë C-h f previous-line<Return>¡£
-   Õâ»áÓ¡³ö Emacs ËùÓеÄÓйء¸Êµ×÷³ö C-p Õâ¸öÖ¸ÁîµÄº¯Êý¡¹µÄÐÅÏ¢
+   C-h f        ½âÊÍÒ»¸öº¯Êý¡£ÄãÒªÊäÈ뺯ÊýÃû¡£
 
-C-h v Õâ¸öÀàËƵÄÖ¸Áî»áÏÔʾ³ö¡¸Äú¿ÉÒÔÓÃÀ´×Ô¶© Emacs ÐÐΪµÄ±äÊý¡¹µÄÎĵµ¡£
-µ± Emacs ÒªÇóʱ£¬ÄúÐèÒª¼üÈëÕâ±äÊýµÄÃû³Æ¡£
+>> ÊÔÊÔ¿´£¬ÊäÈë C-h f previous-line<Return>¡£
+   Emacs »á¸ø³öËüËùÖªµÀµÄËùÓÐÓйء°ÊµÏÖ C-p ÃüÁÄܵĺ¯Êý¡±µÄÐÅÏ¢¡£
 
-   C-h a        Ö¸ÁîÏà¹Ø²éÕÒ£¨ Command Apropos £©¡£
-                ¼üÈëÒ»¸ö¹Ø¼ü×ÖÈ»ºó Emacs »áÁгöËùÓÐ
-                ¡¸ÔÚÆäÃû³ÆÖк¬Óд˹ؼü×Ö¡¹µÄÈ«²¿Ö¸Áî¡£
-                ÕâЩָÁîÈ«²¿¶¼¿ÉÒÔ¾­ÓÉ META-x À´Æô¶¯¡£
-                ¶Ôì¶Ò»Ð©Ö¸Áî¶øÑÔ£¬Ö¸ÁîÏà¹Ø²éÕÒÒ²»áÁгö
-                ¡¸¿ÉÒÔÖ´ÐÐÏàָͬÁµÄÒ»¸ö»òÁ½¸ö×ÖÔªµÄ´®ÁС£
+C-h v ÓÃÀ´ÏÔʾ Emacs ±äÁ¿µÄÎĵµ£¬Emacs ±äÁ¿¿ÉÒÔ±»ÓÃÀ´¡°¶¨ÖÆ Emacs µÄÐÐ
+Ϊ¡±¡£Í¬Ñù£¬ÄãÐèÒªÊäÈë±äÁ¿µÄÃû³Æ¡£
 
->> ¼üÈë C-h a file<Return>¡£
+   C-h a        Ïà¹ØÃüÁîËÑË÷£¨Command Apropos£©¡£
+                ÊäÈëÒ»¸ö¹Ø¼ü´ÊÈ»ºó Emacs »áÁгöËùÓÐÃüÁîÃûÖаüº¬´Ë¹Ø¼ü´Ê
+                µÄÃüÁî¡£ÕâЩÃüÁîÈ«¶¼¿ÉÒÔÓà M-x À´Æô¶¯¡£¶ÔÓÚijЩÃüÁîÀ´Ëµ£¬
+                Ïà¹ØÃüÁîËÑË÷»¹»áÁгöÒ»Á½¸ö×éºÏ¼ü¡£
 
-Õâ»áÔÚÁíÒ»¸ö´°¸ñÏÔʾһ¸ö¡¸ÔÚÆäÃû³ÆÖк¬ÓСºfile¡»µÄÈ«²¿ M-x Ö¸ÁµÄÁÐ
-±í¡£Äú½«»á¿´µ½ÏñÊÇ C-x C-f µÄ¡¸×ÖÔª-Ö¸ÁÁÐÔÚÆäÏà¶ÔÓ¦Ö¸ÁîÃû³Æ£¨È磺
-find-file £©µÄÅԱߡ£
+>> ÊäÈë C-h a file<Return>¡£
 
->> ¼üÈë C-M-v ÉÏÏÂÒƶ¯ help ´°¸ñ¡£ÊÔ¸ö¼¸´Î¡£
+Emacs »áÔÚÁíÒ»¸ö´°¸ñÀïÏÔʾһ¸ö M-x ÃüÁîÁÐ±í£¬Õâ¸öÁбí°üº¬ÁËËùÓÐÃû³ÆÖк¬
+ÓС°file¡±µÄÃüÁî¡£Äã¿ÉÒÔ¿´µ½Ïñ¡°C-x C-f¡±ÕâÑùµÄ×éºÏ¼üÏÔʾÔÚ¡°find-file¡±
+ÕâÑùµÄÃüÁîÃûµÄÅԱߡ£
 
->> ¼üÈë C-x 1 À´É¾³ý help ´°¸ñ¡£
+>> Óà C-M-v À´»Ø¹ö¶¯ help ´°¸ñ£¬¶àÊÔ¼¸´Î¡£
+
+>> ÊäÈë C-x 1 À´É¾³ý help ´°¸ñ¡£
 
-   C-h i        ÔĶÁÏßÉÏʹÓÃÊֲᣨ a.k.a. Info £©¡£
-                Õâ¸öÖ¸ÁÄú´øµ½Á˳ÆΪ¡¸*info*¡¹µÄÌØÊ⻺³åÇø£¬ÔÚÄÇ£¬
-                Äú¿ÉÒÔÔĶÁ°²×°ÔÚÄúµÄϵͳÀïµÄÈí¼þ°üµÄÏßÉÏʹÓÃÊֲᡣ
-                ¼üÈë m emacs <Return> ÒÔÔĶÁ Emacs ʹÓÃÊֲᡣ
-                Èç¹ûÄúÔÚ´Ë֮ǰδÔøʹÓùý Info ϵͳ£¬Çë¼üÈ롺?¡»¡£
-                Emacs ½«»á´øÄú½øÈë Info ģʽ¹¦Äܵĵ¼ÀÀÖ¸ÄÏ¡£
-                Ò»µ©Íê³ÉÁ˱¾¿ìËÙÖ¸ÄϵÄÑжÁ£¬ÄúÓ¦¸Ã²éÔÄ Emacs Info
-                ʹÓÃÊֲᣬÒÔ×÷ΪÖ÷ÒªµÄ²Î¿¼Îĵµ¡£
+   C-h i        ÔĶÁÁª»úÊֲᣨҲ¾ÍÊÇͨ³£½²µÄ Info£©¡£
+                Õâ¸öÃüÁî»á´ò¿ªÒ»¸ö³ÆΪ¡°*info*¡±µÄÌØÊ⻺³åÇø£¬ÔÚÄÇÀ
+                Äã¿ÉÒÔÔĶÁ°²×°ÔÚϵͳÀïµÄÈí¼þ°üʹÓÃÊֲᡣҪ¶Á Emacs µÄʹ
+                ÓÃÊֲᣬ°´ m emacs <Return> ¾Í¿ÉÒÔÁË¡£Èç¹ûÄã֮ǰ´ÓûÓÃ
+                ¹ý Info ϵͳ£¬ÄÇôÇë°´¡°?¡±£¬Emacs »á´øÄã½øÈë Info µÄʹ
+                ÓÃÖ¸ÄÏ¡£ÔÚ¿´Íê±¾¿ìËÙÖ¸ÄÏÖ®ºó£¬Emacs Info »á³ÉΪÄãµÄÖ÷Òª
+                ²Î¿¼Îĵµ¡£
 
 
-* ¸ü¶à¹¦ÄÜÌØÉ«£¨ MORE FEATURES £©
----------------------------------
+* ¸ü¶à¾«²Ê£¨MORE FEATURES£©
+---------------------------
 
-Äú¿ÉÒÔ¾­ÓÉÔĶÁ Emacs ʹÓÃÊֲᡴ²»ÂÛÊÇÒ»±¾Êé»òÊÇÔÚ Info ÖеÄÏßÉÏ°æ±¾
-£¨Ê¹Óà Help Ñ¡µ¥»òÊǼüÈë F10 h r £©¡µÀ´Ñ§µ½¸ü¶àÓйØËüµÄ֪ʶ¡£ÓÐÁ½¸öÄú
-¿ÉÄÜ»áÌرðϲ»¶µÄ¹¦ÄÜÌØÉ«ÊÇ¿ÉÒÔ½ÚÊ¡´ò×ÖÁ¿µÄ completion »¹Óмò»¯µµ°¸´¦Àí
-µÄ dired ¡£
-
-Completion ÊÇÒ»ÖÖ±ÜÃâ²»±ØÒªµÄ´ò×ֵķ½Ê½¡£¾ÙÀýÀ´Ëµ£¬Èç¹ûÄúÏëÒªÇл» 
-*Messages* »º³åÇø£¬Äú¿ÉÒÔ¼üÈë C-x b *M<Tab> £¬Ö»Òª¿ÉÒÔ´ÓÄúÒѾ­¼üÈëµÄÎÄ
-×ÖÖÐÈ·¶¨£¬ Emacs ¾Í»á½«Ê£ÏµĻº³åÇøÃû³Æ²¹Æë¡£ Completion ÊÇÔÚ Emacs ʹ
-ÓÃÊÖ²áµÄ Info ÖУ¬³ÆΪ¡¸Completion¡¹µÄ½ÚµãÖÐËù½âÊ͵ġ£
+ÏëÁ˽â¸ü¶àʹÓà Emacs µÄ֪ʶ£¬Ó¦¸ÃÈ¥¶ÁÒ»¶Á Emacs ʹÓÃÊֲᡪ¡ª¿ÉÒÔÊÇÖ½°æ
+µÄÊ飬Ҳ¿ÉÒÔÊǵç×Ó°æµÄÁª»ú°ïÖú£¨¿ÉÒÔ´Ó Help ²Ëµ¥½øÈë»òÕß°´ F10 h r£©¡£
+ÌáÁ½¸öÄã¿ÉÄÜ»áºÜ¸ÐÐËȤµÄ¹¦ÄÜ°É£¬Ò»¸öÊÇ¿ÉÒÔ°ïÄãÉÙÇüüÅÌµÄ completion£¨×Ô
+¶¯²¹È«£©£¬Ò»¸öÊÇ·½±ãÎļþ´¦ÀíµÄ dired£¨Ä¿Â¼±à¼­£©¡£
 
-Dired ʹÄú¿ÉÒÔÔÚÒ»¸öĿ¼ÖÐÁгöµµ°¸£¨´ÎĿ¼ÔòÊÇ¿ÉÑ¡µÄ£©¡¢ÔÚÁбíÖе½´¦ÒÆ
-¶¯¡¢°Ý·Ã¡¢ÖØÐÂÃüÃû¡¢É¾³ýÒÔ¼°¶Ôµµ°¸×÷²Ù×÷¡£ Dired ÊÇÔÚ Emacs ʹÓÃÊÖ²áµÄ 
-Info ÖУ¬³ÆΪ¡¸Dired¡¹µÄ½ÚµãÖÐËù½âÊ͵ġ£
-
-ʹÓÃÊÖ²áÒ²½âÊÍÁËÐí¶àÆäËü Emacs µÄ¹¦ÄÜÌØÉ«¡£
-
+Completion ¿ÉÒÔÌæÄã½ÚÊ¡²»±ØÒªµÄ¼üÅÌÊäÈë¡£±ÈÈç˵ÄãÏëÇл»µ½ *Message* »º
+³åÇø£¬Äã¾Í¿ÉÒÔÓà C-x b *M<Tab> À´Íê³É£¬Ö»Òª Emacs Äܹ»´ÓÄãÒѾ­ÊäÈëµÄÎÄ
+×ÖÖÐÅжϳöÄãÏëÒªÊäÈëµÄ¶«Î÷£¬Ëü»á×Ô¶¯°ïÄã²¹ÆëÓàϵġ£ÓÐ¹Ø Completion µÄ
+Ïêϸ½âÊÍ¿ÉÒÔÔÚ Emacs Info Öеġ°Completion¡±Ò»½ÚÀïÕÒµ½¡£
 
-* ½áÂÛ£¨ CONCLUSION £©
-----------------------
+Dired ¿ÉÒÔÔÚÒ»¸ö»º³åÇøÀïÁгöÒ»¸öĿ¼ÀïµÄËùÓÐÎļþ£¨¿ÉÒÔÑ¡ÔñÊÇ·ñÒ²Áгö×Ó
+Ŀ¼£©£¬È»ºóÄã¿ÉÒÔÔÚÕâ¸öÎļþÁбíÉÏÍê³É¶ÔÎļþµÄÒƶ¯¡¢·ÃÎÊ¡¢¸ÄÃû»òÕßɾ³ý
+µÈµÈ²Ù×÷¡£Dired Ò²ÔÚ Emacs Info ÖÐÓÐÏêϸ˵Ã÷£¬¾ÍÔÚ¡°Dired¡±Ò»½Ú¡£
 
-¼Çס£¬ÒªÍêÈ«À뿪 Emacs ÇëʹÓà C-x C-c ¡£ÒªÔÝʱÀ뿪µ½ shell£¬ÉÔºóÔٻص½ 
-Emacs£¬ÇëʹÓà C-z ¡£
-
-±¾¿ìËÙÖ¸Ä϶Ôì¶ËùÓеÄÐÂÊÖÓ¦¸Ã¶¼ÊÇÒ×ì¶Àí½âµÄ£¬ËùÒÔÈç¹ûÄú·¢ÏÖÁËʲôµØ·½²»
-Çå³þ£¬²»ÒªÖ»ÊÇ×øÖø¹Ö×Ô¼º -- £¨Ïò±¾ÎÄ×÷Õߺͷ­Ò룩·¢µãÀÎɧ°É£¡
+Emacs ʹÓÃÊÖ²áÀﻹÓкܶàºÜ¶àµÄ¾«²Ê¹¦ÄܵÈ×ÅÄãÀ´Á˽⡣
 
 
-* ·­Ò루 TRANSLATION £©
------------------------
-
-±¾¿ìËÙÖ¸Äϵķ­ÒëÈËÔ±ÁбíÈçÏ£¬Èç¹ûÄúÔÚÔĶÁ±¾ÎÄ֮ǰ£¬¡¸ÍêÈ«¡¹¶Ô Emacs 
-ûÓиÅÄÇë¸æËßÎÒÃÇÄúµÄÒâ¼ûÒÔ×÷Ϊ±¾ÎĺóÐøµÄ¸Ä½øÒÀ¾Ý¡£·­ÒëÒ²ÌṩÁËÒ»·Ý
-¡¶GNU Emacs ÖÐÎÄ´¦Àí˵Ã÷¡·ÔÚ 
-http://www.gnu.org/software/chinese/guide/emacs-chinese.cn.html ¡´²¿·Ý
-ÄÚÈÝÒѾ­ÕûÀíµ½±¾¿ìËÙÖ¸ÄÏ¡µ£¬Ò²ÇëÄú×ÔÐвÎÔÄ¡£
-
-±à¼­Æ÷ÊǵçÄÔʹÓÃÕß×î³£½Ó´¥µ½µÄÓ¦ÓóÌʽ£¬Òò´Ë²»Ó¦¸ÃÈóõѧÕ߸е½¹ýì¶À§ÄÑ£¬
-¾ÍÒ»°ãµÄÆÀÂÛÀ´Ëµ£¬ Emacs ÊDz»ÄÑѧ»áʹÓõı༭Æ÷£¬µ«ÄúµÄÒâ¼û¿ÉÒÔʹËü¸ü
-ΪÌù½üÒ»°ãµÄʹÓÃÕߣ¬²¢Ê¹µçÄÔ×÷Ϊ¹¤¾ßµÄ½ÇÉ«µÃÒÔ³ä·Ö·¢»Ó¡£Èç¹ûÄúÔ¸ÒâÌṩ
-¸Ä½øµÄÒâ¼û£¬Çë¼Ä email µ½<chinese-translators@gnu.org> ¡£Çë²»Òªº¦Ðߣ¬
-ÎÒÃÇ»¶Ó­ÈκÎÓйصÄÌÖÂÛ£»Èç¹ûÄú²»Ïë¼Äµ½ÓʼþÇåµ¥£¬ÇëÖ±½Ó email ¸ø±¾ÎÄ·­
-Òë <chliu@gnu.org> ¡£ÇëÔÚ Title ÐÐÖаüº¬´Ë×Ö´®¡¸Emacs TUTORIAL: <your
-issue here>¡¹¡£
-
-Èç¹ûÄúÊÇ Emacs ÀÏÊÖ£¬GNU Chinese Translators Team (GNU/CTT)
-<http://www.gnu.org/software/chinese/> »¶Ó­ÄúµÄ¼ÓÈ룬ÎÒÃÇÏÖÔÚÕýÐèÒªÔ¸
-ÒâͶÈë·­Òë Emacs ʹÓÃÊÖ²áµÄÈËÔ±¡£
-
-±¾¿ìËÙÖ¸Äϲ¢Ã»ÓвÉÓÃÏ°¹ßÉϱ༭Æ÷ËùʹÓõķ­ÒëÊõÓһ·½ÃæÒòΪËüµÄʵ¼ÊÒâ
-ÒåÓëÒ»°ãµÄ±à¼­Æ÷²»Í¬£¬Ô­Îı¾¾Í²»Í¬£»ÁíÒ»·½ÃæÒ²ÒòΪ Emacs Ëù²ÉÓõÄÊÓ¾õ
-Éè¼Æ¸ÅÄÔçÔÚ´°¿Ú»¯ÏµÍ³Ö®Ç°¾ÍÒѾ­´æÔÚ£¬±¾ÖÊÒ²²»Ïàͬ¡£×ÜÖ®£¬·­ÒëÒÔΪÕâ
-Ñù¿ÉÒÔ°ïÖú¶Ôì¶ Emacs Õû¸öÉè¼ÆÕÜѧµÄÀí½â¡£Èç¹ûÊÕµ½µÄ»Ø¸²ÖУ¬´ó²¿·ÝÒªÇó
-Ìá³öÐ޸ģ¬ÎÒÃÇ»¹ÊÇ´ÓÉÆÈçÁ÷¡£
+* ×ܽᣨCONCLUSION£©
+--------------------
 
-(0) ΪÁ˱ÜÃ⡸ÓαêÒƶ¯Ö¸ÁÂÛÊöÉϵĻìÏý£¬±¾ÎIJÉÓõÄÊõÓïΪ£º
-    Íù¡¸Ç°¡¹ÒÆ£¨ move Forward £©£»Íù¡¸ºó¡¹ÒÆ£¨ move Backware £©
-    ¡²»òÊÇÍù¡¸»Ø¡¹ÒÆ¡³£»
-    Íù¡¸ÉÏ¡¹ÒÆ£¨ Previous line £©£»Íù¡¸Ï¡¹ÒÆ£¨ Next line £©¡£
-(1) ÔÚ±¾ÎÄÖУ¬¡¸ÐС¹Ö¸µÄÊÇ row£¬ÕâÊDzÉÓÃÒ»°ãµÄÏ°¹ßÓ÷¨¡£
-    ΪÁ˱ÜÃâÎóµ¼ÖÐÎĶÁÕߣ¬ÌرðÔÚ´Ë˵Ã÷¡£ÔÚÕýʽµÄÓ÷¨ÖУº
-    ¡¸column¡¹·­ÒëΪ¡¸ÐС¹£¬ÒÔ¡¸×Ý¡¹ÎªÐУ¨Ö±ÐУ©£¬Ò²ÒëΪ¡¸À¸¡¹£»
-    ¡¸row¡¹·­ÒëΪ¡¸ÁС¹£¬ÒÔ¡¸ºá¡¹ÎªÁУ¨ºáÁУ©¡£
-    ¶ÁÕß˼Ë÷һϡ¸ºÏ×ÝÁ¬ºá¡¹Ó¦¸Ã¿ÉÒÔÀí½â¡£
-    ´óÔ¼ÊÇÒòΪÖÐÎÄÔ­±¾ÊÇÖ±ÊéµÄ£¬ÎÒÃÇ˵¡¸Ò»ÐÐ×Ö¡¹ÊÇûÎÊÌ⣻
-    µ«ÏÖÔڴ󲿷ݵÄÇéÐÎÖÐÎÄÊǺáÊéµÄ£¬ÓÉì¶Ï°¹ßʹȻҲ³ÆΪһÐÐ×ÖÁË¡£
-(2) ÓйØ춡¸ÎÄ×Ö¡¹¼°Æ伯ºÏµÄÏà¹ØÒëÎÄ£¬·­ÒëËù²ÉÓõÄÓУº
-    ±à¼­µÄ¡¸ÎÄ×Ö¡¹£º¡¸È»ºó¼üÈëһЩÎÄ×Ö¡¹£»
-    ÓÃÀ´×÷Ϊ˵Ã÷¹¦Äܵġ¸Îĵµ¡¹£º¡¸Õâ¸öº¯ÊýµÄ˵Ã÷Îĵµ¡¹£»
-    ÌØÖ¸ÆäËù˵Ã÷µÄÄÚÈݵġ¸Îı¾¡¹£º¡¸Êµ¼ÊЧÁ¦ÒÔÓ¢Îı¾Îª×¼¡¹¡£
-    ¼´Ê¹Ö»ÊÇ¡¸Ò»ÐÐ×Ö¡¹£¬Ö»ÒªËüÊÇÓÃÀ´×÷Ϊ˵Ã÷Ö®Óã¬
-    ·­Ò뻹Êǽ«ËüÊÓΪ¡¸Îĵµ¡¹¡£
-(3) ¡¸cut¡¹µÄ¶¯×÷ÔÚ Emacs ÖзÖΪ¡¸É±µô¡¹ºÍ¡¸É¾³ý¡¹£¬Ö®¼äµÄ²îÒìÈçÏ£º
-    Ò»°ã±à¼­Æ÷Öеġ¸cut¡¹£ºÖ»ÓÐ×î½ü±» cut µÄÎÄ×Ö°Úµ½ clipboard ÖУ»
-    ¡¸É±µô£¨ killing £©¡¹£º±»É±µôµÄÎÄ×Ö£¬È«²¿±»¼ÓÈëµ½ kill ring ÖУ»
-    ¡¸É¾³ý£¨ deleting £©¡¹£º±»É¾³ýµÄÎÄ×Ö£¬¾ÍÊDZ»É¾³ýÁË¡£
-    Òò´ËÔÚÒ»°ã±à¼­Æ÷ÖУ¬ÄúÖ»ÄÜ paste¡¸×î½ü¡¹±» cut µÄÎÄ×Ö£»
-    ¶øÔÚ Emacs ÖУ¬Äú¿ÉÒÔ¡¸À­»Ø¡¹ÈκÎÏÈÇ°±»É±µôµÄÎÄ×Ö£¬Í¬Ê±£¬
-    ËüµÄ×÷·¨ºÜÈÝÒס£ÖÁ춱»É¾³ýµÄ£¬ÒòΪÓÃÀ´×÷Ϊ¡¸É¾³ý¡¹¹¦ÄܵÄÖ¸Á
-    ËùÄÜÒÆÈ¥µÄÎÄ×ÖÊýÁ¿¶¼ºÜÉÙ£¬Òò´ËҲûʲôºÃÀ­»ØµÄ£»
-    Èç¹ûÕæµÄÏë»Ø¸´ÕâЩÎÄ×Ö£¬undo ÄúµÄ¶¯×÷¾ÍÊÇÁË¡£
-(4) ¡¸window¡¹Í¬Ê±·­ÒëΪ¡¸´°¿Ú¡¹ºÍ¡¸´°¸ñ¡¹£¬
-    Ç°Õß±íʾÏÖÔÚÒ»°ã¸ÅÄîÖеĴ°¿Úϵͳ£¬È硸X ´°¿Ú¡¹£»
-    ºóÕß±íʾ Emacs ÖеĴ°¿Ú£¬·­ÒëÔÚ´Ëͨ³ÆΪ¡¸´°¸ñ¡¹¡£
-    Emacs µÄ¡¸´°¸ñ¡¹¼´Ê¹ÔÚÃüÁîÁÐÌáʾÏÂÒ²¿ÉÒÔÕý³£¹¤×÷£¬
-    ´ËÒ»»ù±¾ÌØÐÔÏÔȻֵµÃÎÒÃÇÒÔÁíÒ»¸öרÓÃÊõÓïÀ´ÃèÊöËü¡£
-(5) ¹Ø춵µ°¸µÄÊõÓ¡¸ÕÒ¡¹Ò»¸öµµ°¸ÔÚ Emacs ÖÐÓÐÁ½ÖÖ×÷Óãº
-    ÕÒÒ»¸ö¡¸²¢²»´æÔÚ¡¹µÄµµ°¸£¬¶ÁÕßÓ¦ÈÏ֪Ϊ¡¸¿ªÐµµ°¸¡¹£»
-    ÕÒÒ»¸ö¡¸ÒѾ­´æÔÚ¡¹µÄµµ°¸£¬ÔòÊÇ¡¸¿ªÆô¾Éµµ¡¹¡£
-    Emacs Ö»ÒÔÒ»¸ö¡¸ÕÒ¡¹µÄ¶¯×÷À´½â¾ö£¬Ö÷ÒªµÄÔ­ÒòÊÇ¡¸Êµ¼ÊÉÏ¡¹
-    µÄÈí¼þ¹¤×÷Èç´Ë¡£ºÚ¿ÍÃÇÓ¦¸Ã»á·¢ÏÖÕâÑù±È½Ï×ÔÈ»£¬
-    ÒòΪËü·´Ó¦Á˵çÄԵŤ×÷·½Ê½£¬Í¬Ê±²Ù×÷ÆðÀ´Ò²½ÏÉÙ·Ï»°¡£
-(6) ÔÚ¡¾¡¿ÖеÄÎÄ×ÖΪ·­ÒëµÄ×¢½â¡£
-(7) ¹Øì¶Ê¹ÖÐÎÄÎĵµ½á¹¹»¯µÄÒéÌ⣬ÎÊÌâÒѾ­»ñµÃ½â¾ö¡£
-(8) ±¾·­ÒëÎı¾Ëù²ÉÓõļò·±ÓÃÓï²îÒìÁбíÈçÏ£º
-    zh cn
-    Îļþ Îĵµ
-    ÈíÌå Èí¼þ
-    ×÷Òµ ²Ù×÷
-    Ì×¼þ °ü
-    ÊÓ´° ´°¿Ú
-    µÝ»Ø µÝ¹é
-    º§¿Í ºÚ¿Í
-    ×ÊѶ ÐÅÏ¢
+¼Çס£¬ÒªÍ˳ö Emacs ÇëÓà C-x C-c¡£ÒªÔÝʱÇл»µ½ shell ²¢ÇÒÉÔºóÔٻص½
+Emacs ÀïÀ´£¬ÇëÓà C-z¡£¡¾Çл»µ½ shell ½ö¶Ô¿ØÖÆ̨Ï嵀 Emacs ÓÐЧ¡¿
 
-ÁíÍ⣬ÎÒÃÇҲʮ·Ö»¶Ó­¶ÁÕß¿ÉÒÔÖ±½ÓÐ޸ı¾¿ìËÙÖ¸ÄÏ£¬×ö³ö×Ô¼ºµÄ°æ±¾£¬ÒÔ×Ô¼º
-ÈÏΪ×îΪºÏÊʵķ½Ê½À´½éÉÜ Emacs ¡£Èç¹ûÄú×ö³öÁËÕâÑù¸öÈË»¯µÄ°æ±¾£¬²¢ÇÒÈÏ
-Ϊ×㹩´ó¼Ò²Î¿¼Ê¹Óã¬Çë¼Ä¸ø <chinese-coordinators@gnu.org> £¬ÎÒÃǻὫÄú
-µÄ°æ±¾¹«¿ªÔÚ GNU/CTT µÄÍøÒ³ÖÐÌṩ¸øÖÐÎÄʹÓÃÕßÏÂÔØ¡£
-
-·­Ò룺Áõ ÕѺê <chliu@gnu.org>
-ÑéÖ¤£ºÂí ѩƼ
+±¾ÎÄÍêÈ«ÊÇΪÁãÆðµãÐÂÊÖдµÄɵ¹Ï½Ì³Ì¡£Èç¹ûÄã¾õµÃÄÄÀﻹ¿´²»Ã÷°×£¬Ç§Íò²»Òª
+¾õµÃ²»ºÃÒâ˼£¬ÄÇÒ»¶¨ÊÇÎÒÃÇûÓÐдºÃ¡£ÎÒÃÇÓÀÔ¶»¶Ó­ÄãµÄ²»ÂúºÍ±§Ô¹¡£
 
 
-* ¸´ÖÆ£¨ COPYING £©
--------------------
+* ·­Ò루TRANSLATION£©
+---------------------
+
+·­Ò룺Ëï Ò»½­ <sunyijiang@gmail.com>
+У¶Ô£ºË®Ä¾ÉçÇø£¨www.newsmth.net£©Emacs °åÖÚ¶àÍøÓÑ
+
+Emacs ¿ìËÙÖ¸ÄÏ£¨Tutorial£©ÔçÓÐÁ½¸öÁõÕѺêµÄÖÐÎÄÒë±¾£¬·±¼ò¸÷Ò»¡£Æä¼òÌå°æ±¾
+£¨TUTORIAL.cn£©»ù±¾ÓÉ·±Ìå°æ±¾£¨TUTORIAL.zh£©¾­´ÊÓïÌæ»»¶øµÃ¡£È»¶ø·±¼òÖÐÎÄ
+²»½öÔÚÓôÊÏ°¹ßÉÏÓÐËù²»Í¬£¬¸üÓÐÖî¶à±í´ï·½Ê½ºÍ¾ä·¨·½ÃæµÄ²îÒì¡£Òò´ËÒ»Ö±ÒÔÀ´
+ÔĶÁ TUTORIAL.cn ¶¼ÂÔ¾õ»ÞɬºÍÉúÓ²¡£Õâ´ÎÖØз­Òë TUTORIAL.cn µÄ¶¯»úÕýÊÇÔ´
+ÓÚÕâÖÖÌåÑ飬ϣÍûÎÒÃǵŤ×÷Äܹ»Èñ¾ÎĸüºÃµÄ·¢»ÓÆäÓ¦ÓеÄ×÷Óá£TUTORIAL.zh
+µÄÒëÎÄÖÊÁ¿ºÜ¸ß£¬ÔÚ·­Òë¹ý³ÌÖиøÓè¹ýÎÒÃǺܶà½è¼øºÍ²Î¿¼£¬Ôڴ˶ÔÁõÕѺêµÄ¹¤×÷
+±íʾ¸Ðл¡£
+
+·­Òë¹ý³ÌÖÐ×î´óµÄÌôսĪ¹ýÓÚÊõÓïÒë´ÊµÄÑ¡ÔñÁË¡£¾­¹ýˮľÉçÇø Emacs °åÈÈÐÄÍø
+ÓÑС·¶Î§ÄÚµÄÌÖÂÛ£¬ÎÒÃÇÑ¡ÔñÁËÏÖÔÚµÄÒë·¨¡£Óû§µÄ¹ã·º²ÎÓëÊÇ×ÔÓÉÈí¼þÉúÃüÁ¦µÄ
+ԴȪ£¬ËùÒÔÈç¹ûÄãÓÐÈκν¨Òé¡¢¿±Îó»ò¸üºÃµÄÏë·¨£¬ÇëÓÃÄãϲ»¶µÄ·½Ê½ÏòÎÒÃÇÌá³ö
+¡£Äã¿ÉÒÔÖ±½Ó¸øÎÒ·¢µç×ÓÓʼþ£¬Ò²¿ÉÒԷŵ½ GNU Emacs µÄ¿ª·¢ÓʼþÁбí»òÕßˮľ
+ÉçÇøµÄ Emacs °åÉϽøÐÐÌÖÂÛ¡£ÏÂÃæÁгöÖ÷ÒªÊõÓïµÄÒë´Ê¶ÔÕÕ£¬²¢¸ø³ö×¢ÊÍ˵Ã÷£º
 
-±¾¿ìËÙÖ¸ÄÏÑØÏ®×Ô¾ßÓÐÓƾÃÀúÊ·µÄ Emacs ¿ìËÙÖ¸ÄÏ£¬ÓÉ Stuart Cracraft ΪÁË
-ԭʼµÄ Emacs Ëù׫дµÄ°æ±¾¿ªÊ¼¡£
+    command               ÃüÁî
+    cursor                ¹â±ê
+    scrolling             ¹ö¶¯
+    numeric argument      Êý×Ö²ÎÊý
+    window                ´°¸ñ [1]
+    insert                ²åÈë
+    delete                ɾ³ý [2]
+    kill                  ÒƳý [2]
+    yank                  ÕÙ»Ø [2]
+    undo                  ³·Ïú
+    file                  Îļþ
+    buffer                »º³åÇø
+    minibuffer            С»º³å
+    echo area             »ØÏÔÇø
+    mode line             ״̬À¸
+    search                ËÑË÷
+    incremental search    ½¥½øʽËÑË÷ [3]
+
+[1] ¡°window¡±Ò»´ÊÔÚ¼ÆËã»úÏà¹ØµÄÁìÓòÒ»°ã¶¼±»ÒëΪ¡°´°¿Ú¡±¡£µ«ÊÇÔÚ Emacs
+    ÖУ¬»¹ÓÐÒ»¸ö¡°frame¡±µÄ¸ÅÄî¡£ÔÚ±»¹ã·ºÊ¹ÓÃµÄ X ´°¿ÚϵͳºÍ΢ÈíµÄÊÓ´°
+    £¨Windows£©ÏµÁвÙ×÷ϵͳÖУ¬Emacs µÄÒ»¸ö¡°frame¡±¾ÍÊÇÒ»¸ö¡°´°¿Ú¡±£¬Òò
+    ´Ë°Ñ Emacs Öеġ°frame¡±Òë³É¡°´°¿Ú¡±¸ü¼Ó·ûºÏͨ³£µÄÏ°¹ß¡£ÕâÑù£¬Emacs
+    Öеġ°window¡±¾ÍÖ»ÄÜÒë³É¡°´°¸ñ¡±ÁË¡£ÎÒÃÇÈÏΪ Emacs ÖÐ window ºÍ
+    frame µÄ¹ØϵÓô°¸ñºÍ´°¿ÚÀ´Àà±ÈÊÇÊ®·ÖÐÎÏóµÄ¡£
 
-Õâ¸ö°æ±¾µÄ¿ìËÙÖ¸ÄÏºÍ GNU Emacs Ò»Ñù¶¼ÊÇ°æȨ»¯µÄ£¬²¢ÇÒÔÊÐíÔÚijЩÌõ¼þÏÂ
-É¢²¼Æ俽±´£º
+[2] ¶ÔÓÚ¡°delete¡±ºÍ¡°kill¡±µÄÇø±ð£¬ÕýÎÄÒѾ­¸ø³öÁËÏêϸµÄ˵Ã÷¡£¡°É¾³ý¡±ºÍ
+    ¡°ÒƳý¡±Ïà±È½ÏÆðÀ´£¬Ç°Õ߸ü¶àµØÒþº¬×Å¡°ÆÆ»µ¡±ºÍ¡°²»¿É»Ö¸´¡±µÄÒâ˼£¬¶ø
+    ºóÕ߸ü¶àµØÒþº¬×Å¡°±»×ªÒÆ¡±ºÍ¡°¿É»Ö¸´¡±µÄÒâ˼¡£Òò´Ë·Ö±ðÑ¡ÔñËüÃÇ×÷ΪÉÏ
+    ÊöÁ½´ÊµÄÒë´Ê£¬Ï£ÍûÄܹ»ÌåÏÖ³öÇø±ð¡£¡°yank¡±ÔÚÖÐÎÄÎĵµÖÐÏÊÓжÔÓ¦Òë´Ê³ö
+    ÏÖ£¬·­ÒëµÄÀ§Äѽϴ󡣾¿Æä±¾ÒâÊÇ£º¡°a strong sudden pull¡±£¨²Î¼ûΤÊÏ´Ê
+    µä£©£¬¼´¡°ÃÍÈ»À­»Ø¡±¡£ÔÚÔ­ÎĵµÖÐ yank ±»ÒýÉêΪ¡°½«ÏÈÇ°ÒƳýµÄ¶«Î÷ÔÙÒÆ
+    »ØÀ´¡±Õâ¸öÒâ˼£¬ËùÒÔÎÒÃÇÑ¡ÔñÁË¡°Õٻء±Ò»´ÊÓëÆä¶ÔÓ¦¡£
+
+[3] ¡°incremental¡±Ò»´ÊÔÚ¼ÆËã»úÖø×÷Öй㷺³öÏÖ£¬±»¹ã·º½ÓÊܵÄÖÐÎÄÒë´ÊÓÐÁ½
+    ¸ö£º¡°ÔöÁ¿µÄ¡±ºÍ¡°½¥½øµÄ¡±¡£¡°incremental search¡±·­Òë³É¡°ÔöÁ¿Ê½ËÑË÷
+    ¡±»òÕß¡°½¥½øʽËÑË÷¡±¶¼½²µÄͨ£¬ÇÒ¶¼Óи÷×ÔµÄÐÎÏóÖ®´¦¡£»¹ÊDzο¼Ô­ÎĶÔÆä
+    µÄ½âÊÍ£º¡°... means that the search happens while you type in the
+    string to search for¡±¡£Òâ˼ÊÇÖ®ËùÒÔ³ÆÆäΪ¡°incremental search¡±£¬ÊÇ
+    ÒòΪ¡°ÔÚÄãÊäÈëËÑË÷×Ö·û´®µÄ¹ý³ÌÖУ¬ËÑË÷¾ÍÒѾ­ÔÚ½øÐÐÁË¡±¡£ÎÒÃÇÈÏΪ¡°Ôö
+    Á¿µÄ¡±¸ü¼ÓÇ¿µ÷ÔÚÏÖÓлù´¡Éϵı仯£¨±ÈÈç¡°ÔöÁ¿±¸·Ý¡±£¬¡°ÔöÁ¿±àÒ롱£©£»
+    ¶ø¡°½¥½øµÄ¡±¸ü¼ÓÇ¿µ÷¹ý³ÌµÄÖð½¥·¢Õ¹£¬Ò²¸ü¼Ó·ûºÏÔ­ÎĵÄÒâ˼¡£Òò´ËÎÒÃÇÑ¡
+    Ôñ½«¡°incremental search¡±Òë×÷¡°½¥½øʽËÑË÷¡±¡£
+
+
+* °æȨÉùÃ÷£¨COPYING£©
+---------------------
+
+This tutorial descends from a long line of Emacs tutorials
+starting with the one written by Stuart Cracraft for the original Emacs.
+
+This version of the tutorial, like GNU Emacs, is copyrighted, and
+comes with permission to distribute copies on certain conditions:
 
 Copyright (C) 1985, 1996, 1998, 2001, 2002, 2003, 2004,
    2005, 2006 Free Software Foundation, Inc.
-Chinese Translation by Chao-Hong Liu (2002, 2003)
 
    Permission is granted to anyone to make or distribute verbatim copies
    of this document as received, in any medium, provided that the
@@ -1059,27 +991,37 @@
    and that the distributor grants the recipient permission
    for further redistribution as permitted by this notice.
 
-   ±¾ÎÄÔÊÐíÔÚ²»±ä¸üÎĵµÄÚÈݵÄÇ°ÌáÏ¿¯µÇÔÚÈκÎÐÎʽµÄýÌåÖУ¬
-   µ«Ðè±£Áô°æȨÉùÃ÷ÒÔ¼°Ðí¿ÉÉùÃ÷£¬
-   É¢²¼ÕßÒ²±ØÐë¸øÓè½ÓÊÜÕßÈçͬ´ËÉùÃ÷ËùÔÊÐíµÄ£¬½øÒ»²½É¢²¼µÄÐí¿É¡£
-   ¡¾±¾¶ÎÒëÎÄÌṩ¶ÁÕß×÷Ϊ²Î¿¼ÒÔ°ïÖúÀí½â£¬Êµ¼ÊЧÁ¦ÒÔÓ¢Îı¾Îª×¼¡£¡¿
-
    Permission is granted to distribute modified versions
    of this document, or of portions of it,
    under the above conditions, provided also that they
    carry prominent notices stating who last altered them.
 
-   ±¾ÎÄÔÊÐíÔÚÓëÉÏÊöÏàͬµÄÌõ¼þÏ£¬É¢²¼Ð޸ĺóµÄ°æ±¾£¬»òÊÇÆäÖеÄÒ»²¿·Ý£¬
-   µ«ËüÃÇÒ²±ØÐë´øÓÐÏÔÖøµÄ£¬ËµÃ÷ÓÉË­×îºó¸ü¶¯ÁËËüµÄÉùÃ÷¡£
-   ¡¾Copyleft °æȨ³ýÁËÌṩʹÓÃÕß×ÔÓÉÍ⣬Ҳά»¤Ô­Ê¼×÷Õߣ¬
-   ÒÔ¼°ºóÀ´µÄÐÞ¸Ä×÷ÕßµÄÃûÓþȨ£¨ credit £©¡£
-   ±¾¶ÎÒëÎÄÌṩ¶ÁÕß×÷Ϊ²Î¿¼ÒÔ°ïÖúÀí½â£¬Êµ¼ÊЧÁ¦ÒÔÓ¢Îı¾Îª×¼¡£¡¿
+The conditions for copying Emacs itself are more complex, but in the
+same spirit.  Please read the file COPYING and then do give copies of
+GNU Emacs to your friends.  Help stamp out software obstructionism
+("ownership") by using, writing, and sharing free software!
+
+¡¾ÏÂÃæΪ°æȨÉùÃ÷µÄÒëÎÄ£¬½ö¹©²Î¿¼¡£Êµ¼Ê·¨ÂÉЧÁ¦ÒÔÓ¢ÎÄÔ­ÎÄΪ׼¡£¡¿
+
+±¾¿ìËÙÖ¸ÄÏÑØÏ®×ÔÀúÊ·ÓÆ¾ÃµÄ Emacs ¿ìËÙÖ¸ÄÏ£¬¿ÉÉÏËÝÖÁ Stuart Cracraft Ϊ×î
+³õµÄ Emacs Ëù×÷µÄ°æ±¾¡£
+
+±¾ÆªÎĵµÓë GNU Emacs Ò»ÑùÓµÓаæȨ£¬²¢ÔÊÐíÔÚÏÂÁÐÌõ¼þµÄÔ¼ÊøÏ·¢ÐÐÆ俽±´£º
 
-¸´ÖÆ Emacs ±¾ÉíµÄÌõ¼þ½ÏΪ¸´ÔÓ£¬µ«ÊǾßÓÐÏàͬµÄ¾«Éñ¡£ÇëÔĶÁ COPYING Õâ¸ö
-µµ°¸£¬²¢ÇÒȷʵ¸øÓèÄúµÄÅóÓÑ GNU Emacs µÄ¿½±´¡£Çë¾­ÓÉ¡¸Ê¹Óá¢×«Ð´¡¢ÒÔ¼°
-·ÖÏí×ÔÓÉÈí¼þ¡¹À´°ïÖúÏû³ýÈí¼þÕÏ°­Ö÷Ò壨ӵÓÐȨ£©£¡
+   Copyright (C) 1985, 1996, 1998, 2001, 2002, 2003, 2004, 2005
+   Free Software Foundation, Inc.
+
+   ±¾ÎĵµÔÊÐíÔÚ²»±ä¸üÎĵµÄÚÈݵÄÇé¿öÏÂÓÉÈκÎÈË·¢²¼ÔÚÈκÎýÌåÉÏ£¬Í¬Ê±±ØÐë
+   ÍêÕû±£Áô°æȨºÍÐí¿ÉÉùÃ÷£¬ÇÒÐè¸øÓèÊÜÖÚÓë·¢ÐÐÕßÍêÈ«ÏàͬµÄ¡¢Èç±¾ÉùÃ÷ËùÔÊ
+   ÐíµÄÔٴη¢Ðб¾ÎĵµµÄȨÀû¡£
 
-;;; DO NOT PUT THIS ON ZHS OR ZHT FILE...
+   ±¾ÉùÃ÷ÔÊÐíÔÚÓëÉÏÊöÌõ¼þÏàͬµÄÇé¿öÏ·¢²¼¾­¹ýÐ޸ĵÄÈ«²¿»ò²¿·ÖÎĵµ£¬Í¬Ê±
+   ±ØÐ븽´øÏÔÒªµÄÎÄ×ÖÒÔÉêÃ÷ÎĵµµÄ×îºóÐÞ¸ÄÕß¡£
+
+Emacs ×ÔÉíµÄ°æȨÎÊÌâËä±È±¾ÎĵµÒª¸´ÔÓһЩ£¬µ«Ò²»ùÓÚÏàͬµÄ¾«Éñ¡£¾´ÇëÔĶÁÎÄ
+¼þ¡°COPYING¡±£¬È»ºóÏòÄãµÄÅóÓÑÃÇ·Ö·¢ GNU Emacs ¿½±´¡£ÈÃÎÒÃÇÒÔʹÓᢱàдºÍ
+·ÖÏí×ÔÓÉÈí¼þµÄʵ¼ÊÐж¯À´¹²Í¬ìî³ýÈí¼þÕÏ°­Ö÷Ò壨ËùνµÄ¡°ËùÓÐȨ¡±£©£¡
+
 ;;; Local Variables:
 ;;; coding: chinese-iso-8bit
 ;;; End:
--- a/etc/TUTORIAL.translators	Wed Feb 22 06:52:00 2006 +0000
+++ b/etc/TUTORIAL.translators	Wed Feb 22 06:54:10 2006 +0000
@@ -6,8 +6,8 @@
 Maintainer: Ognyan Kulev <ogi@fmi.uni-sofia.bg>
 
 * TUTORIAL.cn:
-Author:     Chao-Hong Liu <chliu@gnu.org>
-Maintainer: Chao-Hong Liu <chliu@gnu.org>
+Author:     Sun Yijiang <sunyijiang@gmail.com>
+Maintainer: Sun Yijiang <sunyijiang@gmail.com>
 
 * TUTORIAL.cs:
 Author:     Milan Zamazal <pdm@zamazal.org>
--- a/lisp/ChangeLog	Wed Feb 22 06:52:00 2006 +0000
+++ b/lisp/ChangeLog	Wed Feb 22 06:54:10 2006 +0000
@@ -1,8 +1,388 @@
+2006-02-21  Richard M. Stallman  <rms@gnu.org>
+
+	* progmodes/sh-script.el (sh-mode): Set shell type based on file name
+	if there's no other specific basis.
+
+	* emacs-lisp/unsafep.el (unsafep): Don't treat &rest or &optional
+	as variables at all.
+	(unsafep-variable): Rename arg; doc fix.
+
+	* abbrevlist.el (list-one-abbrev-table): Add autoload.
+
+	* calendar/appt.el (diary-selective-display): Add defvar.
+
+	* sort.el (sort-columns): Use Posix arg syntax for `sort'.
+
+	* isearch.el (search-whitespace-regexp): Fix custom type.
+
+	* help.el (describe-key-briefly): Compute interactive args
+	in same was as before previous change.
+
+	* files.el (enable-local-variables): Doc fix.
+
+2006-02-21  Kim F. Storm  <storm@cua.dk>
+
+	* fringe.el: Cleanup as file is now pre-loaded.
+	(fringe-bitmaps): Initialize unconditionally.
+	(fringe-mode, set-fringe-style): Remove autoload cookies.
+
+2006-02-21  Giorgos Keramidas  <keramida@ceid.upatras.gr>  (tiny change)
+
+	* fringe.el (fringe-bitmaps): Rename `horisontal-bar' to
+	`horizontal-bar'.
+	(fringe-cursor-alist): Use `horizontal-bar'.
+
+2006-02-20  Kim F. Storm  <storm@cua.dk>
+
+	* fringe.el (fringe-bitmaps): Update to new bitmap names.
+	(fringe-indicator-alist, fringe-cursor-alist): Initialize.
+
+	* loadup.el: Load "fringe" on window systems.
+
+2006-02-20  Nick Roberts  <nickrob@snap.net.nz>
+
+	* progmodes/gud.el (gud-speedbar-buttons): Use shadow face for all
+	out of scope components.
+
+	* progmodes/gdb-ui.el (gdb-speedbar-auto-raise): Don't enable by
+	default.
+
+2006-02-20  Chong Yidong  <cyd@stupidchicken.com>
+
+	* custom.el (customize-mark-to-save, customize-mark-as-set): Load
+	the symbol first.
+
+2006-02-20  Juanma Barranquero  <lekktu@gmail.com>
+
+	* buff-menu.el (list-buffers-noselect): Turn also "\n" into a
+	strech spec so it doesn't display as "^J" on the header line
+	when `Buffer-menu-use-header-line' is t.
+
+2006-02-20  Nick Roberts  <nickrob@snap.net.nz>
+
+	* speedbar.el (speedbar-make-button): Keep text properties
+	of string arguments if desired.
+
+	* progmodes/gud.el (gud-speedbar-buttons): Fontify watch
+	expessions.
+
+	* progmodes/gdb-ui.el (gdb-speedbar-expand-node): Force update
+	of speedbar.
+
+2006-02-19  Ryan Yeske  <rcyeske@gmail.com>
+
+	* ffap.el (ffap-read-file-or-url): Bind `completion-ignore-case'
+	to value of `read-file-name-completion-ignore-case'.
+
+2006-02-19  Chong Yidong  <cyd@stupidchicken.com>
+
+	* custom.el (customize-mark-as-set): Push to `user' theme.
+
+	* cus-edit.el (custom-save-variables): Allow unthemed values.
+	(customize-set-variable): Push setting to `user' theme.
+
+2006-02-19  Nick Roberts  <nickrob@snap.net.nz>
+
+	* progmodes/gud.el: Don't require font-lock as it's now
+	automatically loaded.
+	(gud-speedbar-buttons): Replace gdb-var-changed with
+	gdb-force-update.
+
+	* progmodes/gdb-ui.el (gdb-force-update): Rename from
+	gdb-var-changed.
+	(gdb-post-prompt): Use it.
+	(gdb-var-create-handler, gdb-var-evaluate-expression-handler)
+	(gdb-var-update-handler, gdb-var-delete)
+	(gdb-speedbar-expand-node, gdb-var-list-children-handler-1)
+	(gdb-var-update-handler-1): Don't set gdb-var-changed, just set
+	gdb-force-update in gdb-post-prompt.
+	(gdb-reset): Clear watch expressions from speedbar when quitting.
+
+2006-02-19  Michael Kifer  <kifer@cs.stonybrook.edu>
+
+	* viper-cmd.el (viper-insert-state-post-command-sentinel)
+	(viper-change-state-to-vi, viper-change-state-to-emacs):
+	Make aware of cursor coloring in the Emacs state.
+	(viper-special-read-and-insert-char): Use read-char-exclusive.
+	(viper-minibuffer-trim-tail): Workaround for fields in minibuffer.
+
+	* viper-init.el (viper-emacs-state-cursor-color): New variable.
+
+	* viper-util.el (viper-save-cursor-color)
+	(viper-get-saved-cursor-color-in-replace-mode)
+	(viper-get-saved-cursor-color-in-insert-mode)
+	(viper-restore-cursor-color): Make aware of the cursor color in Emacs
+	state.
+	(viper-get-saved-cursor-color-in-emacs-mode): New function.
+
+	* ediff-diff.el (ediff-ignore-case, ediff-ignore-case-option)
+	(ediff-ignore-case-option3, ediff-actual-diff-options)
+	(ediff-actual-diff3-options): New variables to control case sensitivity.
+	(ediff-make-diff2-buffer, ediff-setup-fine-diff-regions)
+	(ediff-setup-diff-regions3): Make aware of case-sensitivity.
+	(ediff-toggle-ignore-case): New function.
+	(ediff-extract-diffs, ediff-extract-diffs3): Preserve point in buffers.
+
+	* ediff-help.el (ediff-long-help-message-narrow2)
+	(ediff-long-help-message-compare2, ediff-long-help-message-compare3)
+	(ediff-long-help-message-word-mode): Add ignore-case command.
+	(ediff-help-for-quick-help): Add ignore-case command.
+
+	* ediff-merg.el: Move provide to the end.
+
+	* ediff-ptch.el: Move provide to the end.
+
+	* ediff-wind.el: Move provide to the end.
+
+	* ediff-mult.el: Move provide to the end.
+	(ediff-set-meta-overlay): Enable follow-link.
+
+	* ediff.el: Move provide to the end.
+	Break recursive load cycle in eval-when-compile.
+	(ediff-patch-buffer): Better heuristics.
+
+	* ediff-util.el: Move provide to the end.
+	Break recursive load cycle in eval-when-compile.
+	(ediff-setup-keymap): Add binding for #c.  Replace some defsubsts with
+	defuns.
+	(ediff-submit-report): Pass the values of ediff-diff3-program,
+	ediff-diff3-options.
+
+2006-02-19  Juanma Barranquero  <lekktu@gmail.com>
+
+	* help-fns.el (help-do-arg-highlight): Recognize also ARG- followed by
+	the opening bracket of the following bracketing pairs: {}, [], (), <>,
+	`' (for example, in the docstring of `windmove-default-keybindings').
+
+2006-02-19  Nick Roberts  <nickrob@snap.net.nz>
+
+	* progmodes/gud.el (gud-speedbar-buttons): Update properly for
+	shadow face.  Don't provide binding to edit variable when it is
+	out of scope.
+
+	* progmodes/gdb-ui.el (gdb-var-evaluate-expression-handler)
+	(gdb-var-update-handler): Detect out of scope variables with pre
+	GDB 6.4 too.
+	(gdb-post-prompt): Revert changet 2006-02-17 (force update).
+	Reset status of variable objects to nil in update handlers.
+	(gdb-var-update-handler-1): Detect when a variable object comes
+	in scope.  setcar on var changes gdb-var-list directly.
+
+2006-02-17  Juri Linkov  <juri@jurta.org>
+
+	* ffap.el (ffap) <defface>: Add explicit face declaration.
+	(ffap-highlight): Use face `ffap' directly instead of checking
+	for its existence.
+
+	* icomplete.el (icomplete-get-keys): Use `t' for the second arg
+	`visible-ok' of `other-buffer' to find the right original buffer.
+
+	* info.el (Info-search): Skip `Local Variables' node.
+
+2006-02-17  Juri Linkov  <juri@jurta.org>
+
+	* info.el (Info-find-file): Check for symbols `apropos', `history',
+	`toc' in the input filename, and return these symbols as is.
+	(Info-find-node-2): Set Info-current-file to symbols `apropos',
+	`history', `toc' instead of strings.
+	(Info-set-mode-line): For non-string Info-current-file use the
+	symbol's name inside **.
+	(Info-isearch-push-state): Add quote before Info-current-file and
+	Info-current-node.
+	(Info-isearch-pop-state): Use `equal' instead of `string='.
+	(Info-extract-pointer, Info-following-node-name): Use
+	`match-string-no-properties' instead of `match-string'.
+	(Info-up): Check `old-file' for `stringp'.
+	(Info-history): Use `equal' instead of `string-equal'.
+	Check `file' for `stringp'.
+	(Info-history): Use symbol `history' instead of string as first arg
+	of `Info-find-node'.
+	(Info-toc): Check `Info-current-file' for `stringp'.  Use symbol
+	`toc' instead of string.
+	(Info-extract-menu-node-name): Use `buffer-substring-no-properties'
+	instead of `buffer-substring', and `match-string-no-properties'
+	instead of `match-string'.
+	(Info-index-nodes): Check for symbols `apropos', `history', `toc'
+	instead of strings.
+	(info-apropos): Use `Info-find-node' instead of `Info-goto-node'.
+	Use symbol `apropos' instead of string.
+	(Info-copy-current-node-name): Check `Info-current-file' for
+	`stringp' and construct a command with `Info-find-node' from it.
+	(Info-fontify-node): Use `match-string-no-properties' instead of
+	`match-string' and check file names for `stringp'.
+	(Info-desktop-buffer-misc-data): Check for symbols `apropos',
+	`history', `toc' instead of strings.
+
+2006-02-17  Chong Yidong  <cyd@stupidchicken.com>
+
+	* files.el: Rearrange functions and variables in the file local
+	variables section.
+
+2006-02-17  Reiner Steib  <Reiner.Steib@gmx.de>
+
+	* files.el: Add truncate-lines, ispell-check-comments and
+	ispell-local-dictionary as safe local variables.
+
+2006-02-18  Nick Roberts  <nickrob@snap.net.nz>
+
+	* progmodes/gud.el (gud-speedbar-buttons): Use shadow face for
+	out of scope variables.
+	(gud-speedbar-buttons): Use unless.
+
+	* progmodes/gdb-ui.el (gdb-var-list): Update doc string.
+	(gdb-init-1, gdb-var-changed): Set gdb-var-changed to t initially.
+	(gdb-show-changed-values): Also use for out of scope variables.
+	(gdb-var-update-handler-1): Note if variable goes out of scope.
+
+2006-02-17  Ryan Yeske  <rcyeske@gmail.com>
+
+	* net/rcirc.el (rcirc-connect): Make all arguments optional, and
+	default to global variable values for unsupplied args.
+	(rcirc-get-buffer-create): Fix bug with setting the target.
+	(rcirc-any-buffer): Rename from rcirc-get-any-buffer, and include
+	test for rcirc-always-use-server-buffer-flag here.
+	(rcirc-response-formats): Add %N, which is a facified nick.  %n
+	uses the default face.  Change the ACTION format string.  If the
+	"nick" is the server, don't print anything for that field.
+	Comment fixes.
+	(rcirc-target-buffer): Don't test
+	rcirc-always-use-server-buffer-flag here.
+	(rcirc-print): Squeeze extra spaces out of the text before message.
+	(rcirc-put-nick-channel): Strip potential "@" char from nick
+	before adding them to nick table.
+	(rcirc-url-regexp): Improve to match address like "foo.com".
+
+2006-02-17  Eli Zaretskii  <eliz@gnu.org>
+
+	* allout.el (allout-hidden-p): Move this defsubst before
+	allout-overlay-interior-modification-handler, where it is first
+	used.
+
+2006-02-17  Ken Manheimer  <ken.manheimer@gmail.com>
+
+	* allout.el: Use allout invisible-text overlays instead of
+	selective display for concealed text.  Also, lots of general
+	cleanup, and improved compatibility code.
+
+	(allout-version) Incremented, corrected, revised, and refined
+	module commentary.
+
+	(provide 'allout): Moved to the bottom, added a require of overlay.
+
+	(allout-encrypt-unencrypted-on-saves): Defaults to t instead of
+	`except-current'.
+	(allout-write-file-hook-handler): Minimize delay.
+	(count-trailing-whitespace-region): New function so
+	auto-encryption of current topic can resituate cursor exactly.
+	PGP/GPG encryption trims trailing whitespace from lines, which
+	must be accounted for across encryption then decryption.
+
+	(allout-command-prefix): Now defaults to "\C-c<space>" rather than
+	just plain "\C-c", to avoid intruding on user's keybinding space.
+
+	(allout-toggle-current-subtree-encryption): Pass along fetch-pass
+	parameter, so user request to provide a new password is done.
+
+	(allout-outside-normal-auto-fill-function, allout-auto-fill):
+	Refined mechanism for auto-filling behavior while in allout mode.
+
+	(allout-mode): Explicitly specify the mode map in the docstring.
+	Clarify provision for various write-file hook var names.
+	Adjusted for invisible-text overlays instead of	selective-display.
+
+	(allout-depth): Really return 0 if not within any topic.  This
+	rectifies `allout-beginning-of-level' and sequence numbering
+	errors that occur when cutting and pasting numbered topics.
+	Changed from a in-line subst to a regular function, as well.
+
+	(allout-pre-next-prefix): Renamed from allout-pre-next-preface.
+
+	(allout-end-of-subtree, allout-end-of-subtree)
+	(allout-end-of-entry, allout-end-of-current-heading)
+	(allout-next-visible-heading, allout-open-topic, allout-show-entry)
+	(allout-show-children, allout-show-to-offshoot)
+	(allout-hide-current-entry, allout-show-current-entry): Rectified
+	handling of trailing blank lines between items.
+
+	(allout-line-boundary-regexp, set-allout-regexp, allout-depth)
+	(allout-current-depth, allout-unprotected, allout-hidden-p)
+	(allout-on-current-heading-p, allout-listify-exposed)
+	(allout-chart-subtree, allout-goto-prefix)
+	(allout-back-to-current-heading, allout-get-body-text)
+	(allout-snug-back, allout-flag-current-subtree, allout-show-all)
+	(allout-hide-region-body, allout-toggle-subtree-encryption)
+	(allout-encrypt-string, allout-encrypted-key-info)
+	(allout-next-topic-pending-encryption, allout-encrypt-decrypted)
+	(allout-file-vars-section-data): Adjusted for use with
+	invisible-text overlays instead of selective-display.
+
+	(allout-kill-line, allout-kill-topic, allout-yank-processing):
+	Reworked for use with invisible text overlays.
+
+	(allout-current-topic-collapsed-p): New function.
+
+	(allout-hide-current-subtree): Use allout-current-topic-collapsed-p
+	to know when to close the containing topic.
+
+	(allout-pre-command-business, allout-post-command-business):
+	Simplify undo-batching and dynamic isearch exposure.
+
+	(allout-set-overlay-category): New for invisible-text overlays.
+	Sets properties of allout-overlay-category, used by
+	allout-flag-region to set invisible-text overlay properties.
+	(allout-get-invisibility-overlay): Get the first qualifying
+	invisibility overlay, so we can find the extent of it.
+	(allout-back-to-visible-text): Get to just before the beginnining
+	of the current invisibility overlay, if any.
+
+	(allout-overlay-insert-in-front-handler)
+	(allout-overlay-interior-modification-handler)
+	(allout-before-change-handler, allout-isearch-end-handler): New
+	functions to handle extraordinary actions affecting concealed
+	text.
+
+	(allout-flag-region): Use overlays instead of selective-display
+	for invisible text - by inheritence from the properties of
+	allout-overlay-category in mainline Emacs, and applied
+	property-by-property in XEmacs, some recent versions of which
+	don't inherit the properties from the category.  Provisions to
+	respond to concealed-text edits simplified drastically.
+
+	(allout-isearch-rectification, allout-isearch-was-font-lock)
+	(allout-isearch-expose, allout-enwrap-isearch)
+	(allout-isearch-abort, allout-pre-was-isearching)
+	(allout-isearch-prior-pos, allout-isearch-did-quit)
+	(allout-isearch-dynamic-expose)
+	(allout-hide-current-entry-completely): Functions deleted.
+
+	(allout-undo-aggregation): Explicit undo aggregation no longer
+	necessary due to transition away from selective-display.
+
+	(set-allout-regexp, allout-up-current-level)
+	(allout-next-visible-heading, allout-forward-current-level)
+	(allout-open-topic, allout-reindent-body, allout-rebullet-topic)
+	(allout-kill-line, allout-yank-processing, allout-show-children)
+	(allout-expose-topic, allout-old-expose-topic)
+	(allout-listify-exposed, allout-insert-latex-header)
+	(allout-toggle-subtree-encryption, allout-encrypt-string)
+	(remove-from-invisibility-spec, allout-hide-current-subtree):
+	Ditched unused variables.
+
+2006-02-17  Agustin Martin  <agustin.martin@hispalinux.es>
+
+	* textmodes/ispell.el (ispell-change-dictionary): Call
+	ispell-buffer-local-dict instead of
+	ispell-accept-buffer-local-defs.
+	(ispell-local-dictionary-alist): Accept as valid any coding-system
+	supported by Emacs.
+	(ispell-dictionary-alist-3): Esperanto dictionary's coding system
+	changed to iso-8859-3.
+
 2006-02-17  Nick Roberts  <nickrob@snap.net.nz>
 
 	* speedbar.el (speedbar-frame-width): Make an inline function
 	instead of a macro.  Use frame-width.
-	(speedbar-try-completion, speedbar-update-contents) 
+	(speedbar-try-completion, speedbar-update-contents)
 	(speedbar-timer-fn): Use consp.
 	(speedbar-update-localized-contents): Try to preserve point.
 
--- a/lisp/abbrevlist.el	Wed Feb 22 06:52:00 2006 +0000
+++ b/lisp/abbrevlist.el	Wed Feb 22 06:54:10 2006 +0000
@@ -28,6 +28,7 @@
 
 ;;; Code:
 
+;;;###autoload
 (defun list-one-abbrev-table (abbrev-table output-buffer)
   "Display alphabetical listing of ABBREV-TABLE in buffer OUTPUT-BUFFER."
   (with-output-to-temp-buffer output-buffer
--- a/lisp/allout.el	Wed Feb 22 06:52:00 2006 +0000
+++ b/lisp/allout.el	Wed Feb 22 06:54:10 2006 +0000
@@ -1,12 +1,12 @@
 ;;; allout.el --- extensive outline mode for use alone and with other modes
 
 ;; Copyright (C) 1992, 1993, 1994, 2001, 2002, 2003, 2004,
-;;   2005, 2006 Free Software Foundation, Inc.
+;;   2005 Free Software Foundation, Inc.
 
 ;; Author: Ken Manheimer <ken dot manheimer at gmail dot com>
 ;; Maintainer: Ken Manheimer <ken dot manheimer at gmail dot com>
 ;; Created: Dec 1991 - first release to usenet
-;; Version: 2.1
+;; Version: 2.2
 ;; Keywords: outlines wp languages
 
 ;; This file is part of GNU Emacs.
@@ -28,36 +28,39 @@
 
 ;;; Commentary:
 
-;; Allout outline mode provides extensive outline formatting and
-;; and manipulation beyond standard emacs outline mode.  It provides
-;; for structured editing of outlines, as well as navigation and
-;; exposure.  It also provides for syntax-sensitive text like
-;; programming languages.  (For an example, see the allout code
-;; itself, which is organized in ;; an outline framework.)
-;;
-;; Some features:
+;; Allout outline minor mode provides extensive outline formatting and
+;; and manipulation beyond standard emacs outline mode.  Some features:
 ;;
-;;  - classic outline-mode topic-oriented navigation and exposure adjustment
-;;  - topic-oriented editing including coherent topic and subtopic
-;;    creation, promotion, demotion, cut/paste across depths, etc
-;;  - incremental search with dynamic exposure and reconcealment of text
-;;  - customizable bullet format enbles programming-language specific
-;;    outlining, for ultimate code-folding editing.  (allout code itself is
-;;    formatted as an outline - do ESC-x eval-current-buffer in allout.el
-;;    to try it out.)
-;;  - configurable per-file initial exposure settings
-;;  - symmetric-key and key-pair topic encryption, plus symmetric passphrase
+;;  - Classic outline-mode topic-oriented navigation and exposure adjustment
+;;  - Topic-oriented editing including coherent topic and subtopic
+;;    creation, promotion, demotion, cut/paste across depths, etc.
+;;  - Incremental search with dynamic exposure and reconcealment of text
+;;  - Customizable bullet format - enables programming-language specific
+;;    outlining, for code-folding editing.  (Allout code itself is to try it;
+;;    formatted as an outline - do ESC-x eval-current-buffer in allout.el; but
+;;    emacs local file variables need to be enabled when the
+;;    file was visited - see `enable-local-variables'.)
+;;  - Configurable per-file initial exposure settings
+;;  - Symmetric-key and key-pair topic encryption, plus symmetric passphrase
 ;;    mnemonic support, with verification against an established passphrase
 ;;    (using a stashed encrypted dummy string) and user-supplied hint
-;;    maintenance.  (see allout-toggle-current-subtree-encryption docstring.)
-;;  - automatic topic-number maintenance
-;;  - "hot-spot" operation, for single-keystroke maneuvering and
+;;    maintenance.  (See allout-toggle-current-subtree-encryption docstring.)
+;;  - Automatic topic-number maintenance
+;;  - "Hot-spot" operation, for single-keystroke maneuvering and
 ;;    exposure control (see the allout-mode docstring)
-;;  - easy rendering of exposed portions into numbered, latex, indented, etc
+;;  - Easy rendering of exposed portions into numbered, latex, indented, etc
 ;;    outline styles
+;;  - Careful attention to whitespace - enabling blank lines between items
+;;    and maintenance of hanging indentation (in paragraph auto-fill and
+;;    across topic promotion and demotion) of topic bodies consistent with
+;;    indentation of their topic header.
 ;;
 ;; and more.
 ;;
+;; See the `allout-mode' function's docstring for an introduction to the
+;; mode.  The development version and helpful notes are available at
+;; http://myriadicity.net/Sundry/EmacsAllout .
+;;
 ;; The outline menubar additions provide quick reference to many of
 ;; the features, and see the docstring of the variable `allout-init'
 ;; for instructions on priming your emacs session for automatic
@@ -75,20 +78,18 @@
 
 ;;; Code:
 
-;;;_* Provide
-;(provide 'outline)
-(provide 'allout)
-
 ;;;_* Dependency autoloads
+(require 'overlay)
 (eval-when-compile (progn (require 'pgg)
                           (require 'pgg-gpg)
-			  (fset 'allout-real-isearch-abort
-				(symbol-function 'isearch-abort))
+                          (require 'overlay)
 			  ))
 (autoload 'pgg-gpg-symmetric-key-p "pgg-gpg"
   "True if decoded armor MESSAGE-KEYS has symmetric encryption indicator.")
 
 ;;;_* USER CUSTOMIZATION VARIABLES:
+
+;;;_ > defgroup allout
 (defgroup allout nil
   "Extensive outline mode for use alone and with other modes."
   :prefix "allout-"
@@ -151,7 +152,7 @@
 will, modulo the above-mentioned conditions, cause the mode to be
 activated when the file is visited, followed by the equivalent of
 `\(allout-expose-topic 0 : -1 -1 0)'.  \(This is the layout used for
-the allout.el, itself.)
+the allout.el source file.)
 
 Also, allout's mode-specific provisions will make topic prefixes default
 to the comment-start string, if any, of the language of the file.  This
@@ -450,7 +451,7 @@
   :group 'allout)
 (make-variable-buffer-local 'allout-passphrase-hint-handling)
 ;;;_  = allout-encrypt-unencrypted-on-saves
-(defcustom allout-encrypt-unencrypted-on-saves 'except-current
+(defcustom allout-encrypt-unencrypted-on-saves t
   "*When saving, should topics pending encryption be encrypted?
 
 The idea is to prevent file-system exposure of any un-encrypted stuff, and
@@ -485,8 +486,11 @@
 ;;;_ + Miscellaneous customization
 
 ;;;_  = allout-command-prefix
-(defcustom allout-command-prefix "\C-c"
-  "*Key sequence to be used as prefix for outline mode command key bindings."
+(defcustom allout-command-prefix "\C-c "
+  "*Key sequence to be used as prefix for outline mode command key bindings.
+
+Default is '\C-c<space>'; just '\C-c' is more short-and-sweet, if you're
+willing to let allout use a bunch of \C-c keybindings."
   :type 'string
   :group 'allout)
 
@@ -538,23 +542,12 @@
 	("=t" allout-latexify-exposed)
 	("=p" allout-flatten-exposed-to-buffer)))
 
-;;;_  = allout-isearch-dynamic-expose
-(defcustom allout-isearch-dynamic-expose t
-  "*Non-nil enable dynamic exposure of hidden incremental-search
-targets as they're encountered."
-  :type 'boolean
-  :group 'allout)
-(make-variable-buffer-local 'allout-isearch-dynamic-expose)
-
 ;;;_  = allout-use-hanging-indents
 (defcustom allout-use-hanging-indents t
   "*If non-nil, topic body text auto-indent defaults to indent of the header.
 Ie, it is indented to be just past the header prefix.  This is
 relevant mostly for use with indented-text-mode, or other situations
-where auto-fill occurs.
-
-\[This feature no longer depends in any way on the `filladapt.el'
-lisp-archive package.\]"
+where auto-fill occurs."
   :type 'boolean
   :group 'allout)
 (make-variable-buffer-local 'allout-use-hanging-indents)
@@ -597,7 +590,7 @@
 ;;;_ #1 Internal Outline Formatting and Configuration
 ;;;_  : Version
 ;;;_   = allout-version
-(defvar allout-version "2.1"
+(defvar allout-version "2.2"
   "Version of currently loaded outline package.  \(allout.el)")
 ;;;_   > allout-version
 (defun allout-version (&optional here)
@@ -636,9 +629,9 @@
 (defvar allout-line-boundary-regexp ()
   "`allout-regexp' with outline style beginning-of-line anchor.
 
-\(Ie, C-j, *or* C-m, for prefixes of hidden topics).  This is properly
-set when `allout-regexp' is produced by `set-allout-regexp', so
-that (match-beginning 2) and (match-end 2) delimit the prefix.")
+This is properly set when `allout-regexp' is produced by
+`set-allout-regexp', so that (match-beginning 2) and (match-end
+2) delimit the prefix.")
 (make-variable-buffer-local 'allout-line-boundary-regexp)
 ;;;_   = allout-bob-regexp
 (defvar allout-bob-regexp ()
@@ -753,11 +746,9 @@
         cur-string
         cur-len
         cur-char
-        cur-char-string
-        index
-        new-string)
+        index)
     (while strings
-      (setq new-string "") (setq index 0)
+      (setq index 0)
       (setq cur-len (length (setq cur-string (symbol-value (car strings)))))
       (while (< index cur-len)
         (setq cur-char (aref cur-string index))
@@ -788,7 +779,7 @@
                                allout-primary-bullet
                                "+\\|\^l"))
   (setq allout-line-boundary-regexp
-        (concat "\\([\n\r]\\)\\(" allout-regexp "\\)"))
+        (concat "\\(\n\\)\\(" allout-regexp "\\)"))
   (setq allout-bob-regexp
         (concat "\\(\\`\\)\\(" allout-regexp "\\)"))
   )
@@ -955,42 +946,28 @@
           (setq allout-mode-prior-settings rebuild)))))
   )
 ;;;_  : Mode-specific incidentals
-;;;_   = allout-pre-was-isearching nil
-(defvar allout-pre-was-isearching nil
-  "Cue for isearch-dynamic-exposure mechanism, implemented in
-allout-pre- and -post-command-hooks.")
-(make-variable-buffer-local 'allout-pre-was-isearching)
-;;;_   = allout-isearch-prior-pos nil
-(defvar allout-isearch-prior-pos nil
-  "Cue for isearch-dynamic-exposure tracking, used by
-`allout-isearch-expose'.")
-(make-variable-buffer-local 'allout-isearch-prior-pos)
-;;;_   = allout-isearch-did-quit
-(defvar allout-isearch-did-quit nil
-  "Distinguishes isearch conclusion and cancellation.
-
-Maintained by allout-isearch-abort \(which is wrapped around the real
-isearch-abort), and monitored by allout-isearch-expose for action.")
-(make-variable-buffer-local 'allout-isearch-did-quit)
 ;;;_   > allout-unprotected (expr)
 (defmacro allout-unprotected (expr)
-  "Enable internal outline operations to alter read-only text."
-  `(let ((was-inhibit-r-o inhibit-read-only))
-     (unwind-protect
-         (progn
-           (setq inhibit-read-only t)
-           ,expr)
-       (setq inhibit-read-only was-inhibit-r-o)
-       )
-     )
-  )
-;;;_   = allout-undo-aggregation
-(defvar allout-undo-aggregation 30
-  "Amount of successive self-insert actions to bunch together per undo.
-
-This is purely a kludge variable, regulating the compensation for a bug in
-the way that `before-change-functions' and undo interact.")
-(make-variable-buffer-local 'allout-undo-aggregation)
+  "Enable internal outline operations to alter invisible text."
+  `(let ((inhibit-read-only t))
+     ,expr))
+;;;_   = allout-mode-hook
+(defvar allout-mode-hook nil
+  "*Hook that's run when allout mode starts.")
+;;;_   = allout-overlay-category
+(defvar allout-overlay-category nil
+  "Symbol for use in allout invisible-text overlays as the category.")
+;;;_   = allout-view-change-hook
+(defvar allout-view-change-hook nil
+  "*Hook that's run after allout outline visibility changes.")
+
+;;;_   = allout-outside-normal-auto-fill-function
+(defvar allout-outside-normal-auto-fill-function nil
+  "Value of normal-auto-fill-function outside of allout mode.
+
+Used by allout-auto-fill to do the mandated normal-auto-fill-function
+wrapped within allout's automatic fill-prefix setting.")
+(make-variable-buffer-local 'allout-outside-normal-auto-fill-function)
 ;;;_   = file-var-bug hack
 (defvar allout-v18/19-file-var-hack nil
   "Horrible hack used to prevent invalid multiple triggering of outline
@@ -1059,7 +1036,7 @@
                           (allout-next-topic-pending-encryption except-mark))
           (progn
             (message "auto-encrypting pending topics")
-            (sit-for 2)
+            (sit-for 0)
             (condition-case failure
                 (setq allout-after-save-decrypt
                       (allout-encrypt-decrypted except-mark))
@@ -1184,7 +1161,6 @@
 			((message
 			  "Outline mode auto-activation and -layout enabled.")
 			 'full)))))))
-
 ;;;_  > allout-setup-menubar ()
 (defun allout-setup-menubar ()
   "Populate the current buffer's menubar with `allout-mode' stuff."
@@ -1197,12 +1173,37 @@
       (setq cur (car menus)
 	    menus (cdr menus))
       (easy-menu-add cur))))
+;;;_  > allout-set-overlay-category
+(defun allout-set-overlay-category ()
+  "Set the properties of the allout invisible-text overlay."
+  (setplist 'allout-overlay-category nil)
+  (put 'allout-overlay-category 'invisible 'allout)
+  (put 'allout-overlay-category 'evaporate t)
+  ;; XXX We use isearch-open-invisible *and* isearch-mode-end-hook.  The
+  ;; latter would be sufficient, but it seems that a separate behavior -
+  ;; the _transient_ opening of invisible text during isearch - is keyed to
+  ;; presence of the isearch-open-invisible property - even though this
+  ;; property controls the isearch _arrival_ behavior.  This is the case at
+  ;; least in emacs 21, 22.0, and xemacs 21.4.
+  (put 'allout-overlay-category 'isearch-open-invisible
+       'allout-isearch-end-handler)
+  (if (featurep 'xemacs)
+      (put 'allout-overlay-category 'start-open t)
+    (put 'allout-overlay-category 'insert-in-front-hooks
+         '(allout-overlay-insert-in-front-handler)))
+  (if (featurep 'xemacs)
+      (progn (make-variable-buffer-local 'before-change-functions)
+             (add-hook 'before-change-functions
+                       'allout-before-change-handler))
+    (put 'allout-overlay-category 'modification-hooks
+         '(allout-overlay-interior-modification-handler))))
 ;;;_  > allout-mode (&optional toggle)
 ;;;_   : Defun:
 ;;;###autoload
 (defun allout-mode (&optional toggle)
 ;;;_    . Doc string:
   "Toggle minor mode for controlling exposure and editing of text outlines.
+\\<allout-mode-map>
 
 Optional arg forces mode to re-initialize iff arg is positive num or
 symbol.  Allout outline mode always runs as a minor mode.
@@ -1244,62 +1245,69 @@
 \\[allout-forward-current-level] allout-forward-current-level    | \\[allout-show-current-entry] allout-show-current-entry
 \\[allout-backward-current-level] allout-backward-current-level   | \\[allout-show-all] allout-show-all
 \\[allout-end-of-entry] allout-end-of-entry
-\\[allout-beginning-of-current-entry,] allout-beginning-of-current-entry, alternately, goes to hot-spot
+\\[allout-beginning-of-current-entry] allout-beginning-of-current-entry, alternately, goes to hot-spot
 
 	Topic Header Production:
 	-----------------------
-\\[allout-open-sibtopic]  allout-open-sibtopic	Create a new sibling after current topic.
-\\[allout-open-subtopic]  allout-open-subtopic	... an offspring of current topic.
-\\[allout-open-supertopic]  allout-open-supertopic	... a sibling of the current topic's parent.
+\\[allout-open-sibtopic]	allout-open-sibtopic	Create a new sibling after current topic.
+\\[allout-open-subtopic]	allout-open-subtopic	... an offspring of current topic.
+\\[allout-open-supertopic]	allout-open-supertopic	... a sibling of the current topic's parent.
 
 	Topic Level and Prefix Adjustment:
 	---------------------------------
-\\[allout-shift-in]  allout-shift-in	Shift current topic and all offspring deeper.
-\\[allout-shift-out]  allout-shift-out	... less deep.
-\\[allout-rebullet-current-heading]  allout-rebullet-current-heading Prompt for alternate bullet for
+\\[allout-shift-in]	allout-shift-in	Shift current topic and all offspring deeper.
+\\[allout-shift-out]	allout-shift-out	... less deep.
+\\[allout-rebullet-current-heading]	allout-rebullet-current-heading Prompt for alternate bullet for
 					 current topic.
 \\[allout-rebullet-topic]	allout-rebullet-topic	Reconcile bullets of topic and its offspring
 				- distinctive bullets are not changed, others
 				  alternated according to nesting depth.
-\\[allout-number-siblings]  allout-number-siblings	Number bullets of topic and siblings - the
+\\[allout-number-siblings]	allout-number-siblings	Number bullets of topic and siblings - the
 				offspring are not affected.  With repeat
 				count, revoke numbering.
 
 	Topic-oriented Killing and Yanking:
 	----------------------------------
-\\[allout-kill-topic]     allout-kill-topic	Kill current topic, including offspring.
-\\[allout-kill-line]     allout-kill-line	Like kill-line, but reconciles numbering, etc.
-\\[allout-yank]     allout-yank		Yank, adjusting depth of yanked topic to
+\\[allout-kill-topic]	allout-kill-topic	Kill current topic, including offspring.
+\\[allout-kill-line]	allout-kill-line	Like kill-line, but reconciles numbering, etc.
+\\[allout-yank]	allout-yank		Yank, adjusting depth of yanked topic to
 				depth of heading if yanking into bare topic
 				heading (ie, prefix sans text).
-\\[allout-yank-pop]     allout-yank-pop	Is to allout-yank as yank-pop is to yank
+\\[allout-yank-pop]	allout-yank-pop	Is to allout-yank as yank-pop is to yank
+
+	Topic-oriented Encryption:
+	-------------------------
+\\[allout-toggle-current-subtree-encryption]	allout-toggle-current-subtree-encryption Encrypt/Decrypt topic content
 
 	Misc commands:
 	-------------
 M-x outlineify-sticky		Activate outline mode for current buffer,
 				and establish a default file-var setting
 				for `allout-layout'.
-\\[allout-mark-topic]     allout-mark-topic
+\\[allout-mark-topic]   	allout-mark-topic
 \\[allout-copy-exposed-to-buffer]     allout-copy-exposed-to-buffer
 				Duplicate outline, sans concealed text, to
 				buffer with name derived from derived from that
 				of current buffer - \"*BUFFERNAME exposed*\".
-\\[allout-flatten-exposed-to-buffer]     allout-flatten-exposed-to-buffer
+\\[allout-flatten-exposed-to-buffer]	allout-flatten-exposed-to-buffer
 				Like above 'copy-exposed', but convert topic
 				prefixes to section.subsection... numeric
 				format.
-ESC ESC (allout-init t)	Setup Emacs session for outline mode
+\\[eval-expression] (allout-init t)	Setup Emacs session for outline mode
 				auto-activation.
 
-                  Encrypted Entries
-
-Outline mode supports easily togglable gpg encryption of topics, with
-niceties like support for symmetric and key-pair modes, passphrase timeout,
-passphrase consistency checking, user-provided hinting for symmetric key
-mode, and auto-encryption of topics pending encryption on save.  The aim is
-to enable reliable topic privacy while preventing accidents like neglected
-encryption, encryption with a mistaken passphrase, forgetting which
-passphrase was used, and other practical pitfalls.
+                  Topic Encryption
+
+Outline mode supports gpg encryption of topics, with support for
+symmetric and key-pair modes, passphrase timeout, passphrase
+consistency checking, user-provided hinting for symmetric key
+mode, and auto-encryption of topics pending encryption on save.
+\(Topics pending encryption are, by default, automatically
+encrypted during file saves; if you're editing the contents of
+such a topic, it is automatically decrypted for continued
+editing.)  The aim is reliable topic privacy while preventing
+accidents like neglected encryption before saves, forgetting
+which passphrase was used, and other practical pitfalls.
 
 See `allout-toggle-current-subtree-encryption' function docstring and
 `allout-encrypt-unencrypted-on-saves' customization variable for details.
@@ -1309,22 +1317,21 @@
 Hot-spot operation provides a means for easy, single-keystroke outline
 navigation and exposure control.
 
-\\<allout-mode-map>
 When the text cursor is positioned directly on the bullet character of
 a topic, regular characters (a to z) invoke the commands of the
 corresponding allout-mode keymap control chars.  For example, \"f\"
-would invoke the command typically bound to \"C-c C-f\"
+would invoke the command typically bound to \"C-c<space>C-f\"
 \(\\[allout-forward-current-level] `allout-forward-current-level').
 
-Thus, by positioning the cursor on a topic bullet, you can execute
-the outline navigation and manipulation commands with a single
-keystroke.  Non-literal chars never get this special translation, so
-you can use them to get away from the hot-spot, and back to normal
-operation.
+Thus, by positioning the cursor on a topic bullet, you can
+execute the outline navigation and manipulation commands with a
+single keystroke.  Regular navigation keys (eg, \\[forward-char], \\[next-line]) never get
+this special translation, so you can use them to get out of the
+hot-spot and back to normal operation.
 
 Note that the command `allout-beginning-of-current-entry' \(\\[allout-beginning-of-current-entry]\)
 will move to the hot-spot when the cursor is already located at the
-beginning of the current entry, so you can simply hit \\[allout-beginning-of-current-entry]
+beginning of the current entry, so you usually can hit \\[allout-beginning-of-current-entry]
 twice in a row to get to the hot-spot.
 
 			    Terminology
@@ -1332,7 +1339,7 @@
 Topic hierarchy constituents - TOPICS and SUBTOPICS:
 
 TOPIC:	A basic, coherent component of an Emacs outline.  It can
-	contain other topics, and it can be subsumed by other topics,
+	contain and be contained by other topics.
 CURRENT topic:
 	The visible topic most immediately containing the cursor.
 DEPTH:	The degree of nesting of a topic; it increases with
@@ -1376,13 +1383,13 @@
 	docstring for more detail.
 PREFIX-PADDING:
 	Spaces or asterisks which separate the prefix-lead and the
-	bullet, according to the depth of the topic.
+	bullet, determining the depth of the topic.
 BULLET: A character at the end of the topic prefix, it must be one of
 	the characters listed on `allout-plain-bullets-string' or
         `allout-distinctive-bullets-string'.  (See the documentation
         for these variables for more details.)  The default choice of
-	bullet when generating varies in a cycle with the depth of the
-	topic.
+	bullet when generating topics varies in a cycle with the depth of
+	the topic.
 ENTRY:	The text contained in a topic before any offspring.
 BODY:	Same as ENTRY.
 
@@ -1393,7 +1400,6 @@
 CONCEALED:
 	Topics and entry text whose display is inhibited.  Contiguous
 	units of concealed text is represented by `...' ellipses.
-	(Ref the `selective-display' var.)
 
 	Concealed topics are effectively collapsed within an ancestor.
 CLOSED:	A topic whose immediate offspring and body-text is concealed.
@@ -1415,9 +1421,11 @@
 	 ;; allout-mode already called once during this complex command?
 	 (same-complex-command (eq allout-v18/19-file-var-hack
 				  (car command-history)))
-         (write-file-hook-var-name (if (boundp 'write-file-functions)
-                                       'write-file-functions
-                                     'local-write-file-hooks))
+         (write-file-hook-var-name (cond ((boundp 'write-file-functions)
+                                          'write-file-functions)
+                                         ((boundp 'write-file-hooks)
+                                          'write-file-hooks)
+                                         (t 'local-write-file-hooks)))
 	 do-layout
 	 )
 
@@ -1465,9 +1473,8 @@
 	  (progn
 	   (allout-resumptions 'allout-primary-bullet)
 	   (allout-resumptions 'allout-old-style-prefixes)))
-      (allout-resumptions 'selective-display)
-      (if (and (boundp 'before-change-functions) before-change-functions)
-	  (allout-resumptions 'before-change-functions))
+      ;;(allout-resumptions 'selective-display)
+      (remove-from-invisibility-spec '(allout . t))
       (set write-file-hook-var-name
 	   (delq 'allout-write-file-hook-handler
                  (symbol-value write-file-hook-var-name)))
@@ -1476,9 +1483,8 @@
 		 auto-save-hook))
       (allout-resumptions 'paragraph-start)
       (allout-resumptions 'paragraph-separate)
-      (allout-resumptions (if (string-match "^18" emacs-version)
-			      'auto-fill-hook
-			    'auto-fill-function))
+      (allout-resumptions 'auto-fill-function)
+      (allout-resumptions 'normal-auto-fill-function)
       (allout-resumptions 'allout-former-auto-filler)
       (setq allout-mode nil))
 
@@ -1490,6 +1496,8 @@
 	   (allout-resumptions 'allout-primary-bullet '("*"))
 	   (allout-resumptions 'allout-old-style-prefixes '(()))))
 
+      (allout-set-overlay-category)     ; Doesn't hurt to redo this.
+
       (allout-infer-header-lead)
       (allout-infer-body-reindent)
 
@@ -1525,25 +1533,24 @@
 						(current-local-map)))
 	)
 
-				       ; selective-display is the
-				       ; emacs conditional exposure
-				       ; mechanism:
-      (allout-resumptions 'selective-display '(t))
+      (add-to-invisibility-spec '(allout . t))
+      (make-local-variable 'line-move-ignore-invisible)
+      (setq line-move-ignore-invisible t)
       (add-hook 'pre-command-hook 'allout-pre-command-business)
       (add-hook 'post-command-hook 'allout-post-command-business)
+      (add-hook 'isearch-mode-end-hook 'allout-isearch-end-handler)
       (add-hook write-file-hook-var-name 'allout-write-file-hook-handler)
       (add-hook 'auto-save-hook 'allout-auto-save-hook-handler)
 				       ; Custom auto-fill func, to support
 				       ; respect for topic headline,
 				       ; hanging-indents, etc:
-      (let* ((fill-func-var (if (string-match "^18" emacs-version)
-			       'auto-fill-hook
-			     'auto-fill-function))
-	    (fill-func (symbol-value fill-func-var)))
-	;; Register prevailing fill func for use by allout-auto-fill:
-	(allout-resumptions 'allout-former-auto-filler (list fill-func))
-	;; Register allout-auto-fill to be used if filling is active:
-	(allout-resumptions fill-func-var '(allout-auto-fill)))
+      ;; Register prevailing fill func for use by allout-auto-fill:
+      (allout-resumptions 'allout-former-auto-filler (list auto-fill-function))
+      ;; Register allout-auto-fill to be used if filling is active:
+      (allout-resumptions 'auto-fill-function '(allout-auto-fill))
+      (allout-resumptions 'allout-outside-normal-auto-fill-function
+                          (list normal-auto-fill-function))
+      (allout-resumptions 'normal-auto-fill-function '(allout-auto-fill))
       ;; Paragraphs are broken by topic headlines.
       (make-local-variable 'paragraph-start)
       (allout-resumptions 'paragraph-start
@@ -1563,10 +1570,6 @@
       (if allout-layout
 	  (setq do-layout t))
 
-      (if (and allout-isearch-dynamic-expose
-	       (not (fboundp 'allout-real-isearch-abort)))
-	  (allout-enwrap-isearch))
-
       (run-hooks 'allout-mode-hook)
       (setq allout-mode t))
 
@@ -1602,9 +1605,92 @@
     allout-mode
     )					; let*
   )  					; defun
+
+;;;_  - Position Assessment
+;;;_   > allout-hidden-p (&optional pos)
+(defsubst allout-hidden-p (&optional pos)
+  "Non-nil if the character after point is invisible."
+  (get-char-property (or pos (point)) 'invisible))
+
 ;;;_  > allout-minor-mode
 (defalias 'allout-minor-mode 'allout-mode)
 
+;;;_  > allout-overlay-insert-in-front-handler (ol after beg end
+;;;                                                &optional prelen)
+(defun allout-overlay-insert-in-front-handler (ol after beg end
+                                                  &optional prelen)
+  "Shift the overlay so stuff inserted in front of it are excluded."
+  (if after
+      (move-overlay ol (1+ beg) (overlay-end ol))))
+;;;_  > allout-overlay-interior-modification-handler (ol after beg end
+;;;                                                      &optional prelen)
+(defun allout-overlay-interior-modification-handler (ol after beg end
+                                                        &optional prelen)
+  "Get confirmation before making arbitrary changes to invisible text.
+
+We expose the invisible text and ask for confirmation.  Refusal or
+keyboard-quit abandons the changes, with keyboard-quit additionally
+reclosing the opened text.
+
+No confirmation is necessary when inhibit-read-only is set - eg, allout
+internal functions use this feature cohesively bunch changes."
+
+  (when (and (not inhibit-read-only) (not after))
+    (let ((start (point))
+          (ol-start (overlay-start ol))
+          (ol-end (overlay-end ol))
+          (msg "Change within concealed text disallowed.")
+          opened
+          first)
+      (goto-char beg)
+      (while (< (point) end)
+        (when (allout-hidden-p)
+          (allout-show-to-offshoot)
+          (if (allout-hidden-p)
+              (save-excursion (forward-char 1)
+                              (allout-show-to-offshoot)))
+          (when (not first)
+            (setq opened t)
+            (setq first (point))))
+        (goto-char (if (featurep 'xemacs)
+                       (next-property-change (1+ (point)) nil end)
+                     (next-char-property-change (1+ (point)) end))))
+      (when first
+        (goto-char first)
+        (condition-case nil
+            (if (not
+                 (yes-or-no-p
+                  (substitute-command-keys
+                   (concat "Modify this concealed text?  (\"no\" aborts,"
+                           " \\[keyboard-quit] also reconceals) "))))
+                (progn (goto-char start)
+                       (error "Concealed-text change refused.")))
+          (quit (allout-flag-region ol-start ol-end nil)
+                (allout-flag-region ol-start ol-end t)
+                (error "Concealed-text change abandoned, text reconcealed."))))
+      (goto-char start))))
+;;;_  > allout-before-change-handler (beg end)
+(defun allout-before-change-handler (beg end)
+  "Protect against changes to invisible text.
+
+See allout-overlay-interior-modification-handler for details.
+
+This before-change handler is used only where modification-hooks
+overlay property is not supported."
+  (if (not allout-mode)
+      nil
+    (allout-overlay-interior-modification-handler nil nil beg end nil)))
+;;;_  > allout-isearch-end-handler (&optional overlay)
+(defun allout-isearch-end-handler (&optional overlay)
+  "Reconcile allout outline exposure on arriving in hidden text after isearch.
+
+Optional OVERLAY parameter is for when this function is used by
+`isearch-open-invisible' overlay property.  It is otherwise unused, so this
+function can also be used as an `isearch-mode-end-hook'."
+
+  (if (and (allout-mode-p) (allout-hidden-p))
+      (allout-show-to-offshoot)))
+
 ;;;_ #3 Internal Position State-Tracking - "allout-recent-*" funcs
 ;;; All the basic outline functions that directly do string matches to
 ;;; evaluate heading prefix location set the variables
@@ -1667,7 +1753,6 @@
 
 ;;;_ #4 Navigation
 
-;;;_  - Position Assessment
 ;;;_   : Location Predicates
 ;;;_    > allout-on-current-heading-p ()
 (defun allout-on-current-heading-p ()
@@ -1675,7 +1760,7 @@
 
 Actually, returns prefix beginning point."
   (save-excursion
-    (beginning-of-line)
+    (allout-beginning-of-current-line)
     (and (looking-at allout-regexp)
 	 (allout-prefix-data (match-beginning 0) (match-end 0)))))
 ;;;_    > allout-on-heading-p ()
@@ -1686,39 +1771,36 @@
   (and (save-excursion (beginning-of-line)
 		       (looking-at allout-regexp))
        (= (point)(save-excursion (allout-end-of-prefix)(point)))))
-;;;_    > allout-hidden-p ()
-(defmacro allout-hidden-p ()
-  "True if point is in hidden text."
-  '(save-excursion
-     (and (re-search-backward "[\n\r]" () t)
-	  (= ?\r (following-char)))))
-;;;_    > allout-visible-p ()
-(defmacro allout-visible-p ()
-  "True if point is not in hidden text."
-  (interactive)
-  '(not (allout-hidden-p)))
 ;;;_   : Location attributes
 ;;;_    > allout-depth ()
-(defsubst allout-depth ()
-  "Like `allout-current-depth', but respects hidden as well as visible topics."
+(defun allout-depth ()
+  "Return depth of topic most immediately containing point.
+
+Return zero if point is not within any topic.
+
+Like `allout-current-depth', but respects hidden as well as visible topics."
   (save-excursion
-    (if (allout-goto-prefix)
-	(allout-recent-depth)
-      (progn
-	;; Oops, no prefix, zero prefix data:
-	(allout-prefix-data (point)(point))
-	;; ... and return 0:
-	0))))
+    (let ((start-point (point)))
+      (if (and (allout-goto-prefix)
+               (not (< start-point (point))))
+          (allout-recent-depth)
+        (progn
+          ;; Oops, no prefix, zero prefix data:
+          (allout-prefix-data (point)(point))
+          ;; ... and return 0:
+          0)))))
 ;;;_    > allout-current-depth ()
-(defmacro allout-current-depth ()
-  "Return nesting depth of visible topic most immediately containing point."
-  '(save-excursion
-     (if (allout-back-to-current-heading)
-	 (max 1
-	      (- allout-recent-prefix-end
-		 allout-recent-prefix-beginning
-		 allout-header-subtraction))
-       0)))
+(defun allout-current-depth ()
+  "Return depth of visible topic most immediately containing point.
+
+Return zero if point is not within any topic."
+  (save-excursion
+    (if (allout-back-to-current-heading)
+        (max 1
+             (- allout-recent-prefix-end
+                allout-recent-prefix-beginning
+                allout-header-subtraction))
+      0)))
 ;;;_    > allout-get-current-prefix ()
 (defun allout-get-current-prefix ()
   "Topic prefix of the current topic."
@@ -1734,7 +1816,7 @@
 ;;;_    > allout-current-bullet ()
 (defun allout-current-bullet ()
   "Return bullet of current (visible) topic heading, or none if none found."
-  (condition-case err
+  (condition-case nil
       (save-excursion
 	(allout-back-to-current-heading)
 	(buffer-substring (- allout-recent-prefix-end 1)
@@ -1783,7 +1865,31 @@
     rev-sibls)
   )
 
-;;;_  - Navigation macros
+;;;_  - Navigation routines
+;;;_   > allout-beginning-of-current-line ()
+(defun allout-beginning-of-current-line ()
+  "Like beginning of line, but to visible text."
+
+  ;; XXX We would use `(move-beginning-of-line 1)', but it gets
+  ;; stuck on some hidden newlines, eg at column 80, as of GNU Emacs 22.0.50.
+  ;; Conversely, `beginning-of-line' can make no progress in other
+  ;; situations.  Both are necessary, in the order used below.
+  (move-beginning-of-line 1)
+  (beginning-of-line)
+  (while (or (not (bolp)) (allout-hidden-p))
+    (beginning-of-line)
+    (if (or (allout-hidden-p) (not (bolp)))
+        (forward-char -1))))
+;;;_   > allout-end-of-current-line ()
+(defun allout-end-of-current-line ()
+  "Move to the end of line, past concealed text if any."
+  ;; XXX This is for symmetry with `allout-beginning-of-current-line' -
+  ;; `move-end-of-line' doesn't suffer the same problem as
+  ;; `move-beginning-of-line'.
+  (end-of-line)
+  (while (allout-hidden-p)
+    (end-of-line)
+    (if (allout-hidden-p) (forward-char 1))))
 ;;;_   > allout-next-heading ()
 (defsubst allout-next-heading ()
   "Move to the heading for the topic \(possibly invisible) before this one.
@@ -1798,7 +1904,7 @@
        (goto-char (or (match-beginning 2)
 		      allout-recent-prefix-beginning))
        (or (match-end 2) allout-recent-prefix-end))))
-;;;_   : allout-this-or-next-heading
+;;;_   > allout-this-or-next-heading
 (defun allout-this-or-next-heading ()
   "Position cursor on current or next heading."
   ;; A throwaway non-macro that is defined after allout-next-heading
@@ -1822,6 +1928,21 @@
 	    (goto-char (or (match-beginning 2)
 			   allout-recent-prefix-beginning))
 	    (or (match-end 2) allout-recent-prefix-end))))))
+;;;_   > allout-get-invisibility-overlay ()
+(defun allout-get-invisibility-overlay ()
+  "Return the overlay at point that dictates allout invisibility."
+  (let ((overlays (overlays-at (point)))
+        got)
+    (while (and overlays (not got))
+      (if (equal (overlay-get (car overlays) 'invisible) 'allout)
+          (setq got (car overlays))))
+    got))
+;;;_   > allout-back-to-visible-text ()
+(defun allout-back-to-visible-text ()
+  "Move to most recent prior character that is visible, and return point."
+    (if (allout-hidden-p)
+      (goto-char (overlay-start (allout-get-invisibility-overlay))))
+    (point))
 
 ;;;_  - Subtree Charting
 ;;;_   " These routines either produce or assess charts, which are
@@ -1912,11 +2033,11 @@
 					; the original level.  Position
 					; to the end of it:
 	(progn (and (not (eobp)) (forward-char -1))
-	       (and (memq (preceding-char) '(?\n ?\r))
-		    (memq (aref (buffer-substring (max 1 (- (point) 3))
-						  (point))
-				1)
-			  '(?\n ?\r))
+	       (and (= (preceding-char) ?\n)
+		    (= (aref (buffer-substring (max 1 (- (point) 3))
+                                               (point))
+                             1)
+                       ?\n)
 		    (forward-char -1))
 	       (setq allout-recent-end-of-subtree (point))))
 
@@ -1954,7 +2075,7 @@
 	    (if further (setq result (append further result)))
 	    (setq chart (cdr chart)))
 	(goto-char here)
-	(if (= (preceding-char) ?\r)
+        (if (allout-hidden-p)
 	    (setq result (cons here result)))
 	(setq chart (cdr chart))))
     result))
@@ -2003,7 +2124,7 @@
 
   (let (done)
     (while (and (not done)
-		(re-search-backward "[\n\r]" nil 1))
+		(search-backward "\n" nil 1))
       (forward-char 1)
       (if (looking-at allout-regexp)
 	  (setq done (allout-prefix-data (match-beginning 0)
@@ -2042,19 +2163,30 @@
    (1- (match-end 0))))
 ;;;_   > allout-back-to-current-heading ()
 (defun allout-back-to-current-heading ()
-  "Move to heading line of current topic, or beginning if already on the line."
-
-  (beginning-of-line)
-  (prog1 (or (allout-on-current-heading-p)
-             (and (re-search-backward (concat "^\\(" allout-regexp "\\)")
-                                      nil
-                                      'move)
-                  (allout-prefix-data (match-beginning 1)(match-end 1))))
-    (if (interactive-p) (allout-end-of-prefix))))
+  "Move to heading line of current topic, or beginning if already on the line.
+
+Return value of point, unless we started outside of (before any) topics,
+in which case we return nil."
+
+  (allout-beginning-of-current-line)
+  (if (or (allout-on-current-heading-p)
+          (and (re-search-backward (concat "^\\(" allout-regexp "\\)")
+                                   nil 'move)
+               (progn (while (allout-hidden-p)
+                        (allout-beginning-of-current-line)
+                        (if (not (looking-at allout-regexp))
+                            (re-search-backward (concat
+                                                 "^\\(" allout-regexp "\\)")
+                                                nil 'move)))
+                      (allout-prefix-data (match-beginning 1)
+                                          (match-end 1)))))
+      (if (interactive-p)
+          (allout-end-of-prefix)
+        (point))))
 ;;;_   > allout-back-to-heading ()
 (defalias 'allout-back-to-heading 'allout-back-to-current-heading)
-;;;_   > allout-pre-next-preface ()
-(defun allout-pre-next-preface ()
+;;;_   > allout-pre-next-prefix ()
+(defun allout-pre-next-prefix ()
   "Skip forward to just before the next heading line.
 
 Returns that character position."
@@ -2062,12 +2194,16 @@
   (if (re-search-forward allout-line-boundary-regexp nil 'move)
       (prog1 (goto-char (match-beginning 0))
              (allout-prefix-data (match-beginning 2)(match-end 2)))))
-;;;_   > allout-end-of-subtree (&optional current)
-(defun allout-end-of-subtree (&optional current)
+;;;_   > allout-end-of-subtree (&optional current include-trailing-blank)
+(defun allout-end-of-subtree (&optional current include-trailing-blank)
   "Put point at the end of the last leaf in the containing topic.
 
-If optional CURRENT is true (default false), then put point at the end of
-the containing visible topic.
+Optional CURRENT means put point at the end of the containing
+visible topic.
+
+Optional INCLUDE-TRAILING-BLANK means include a trailing blank line, if
+any, as part of the subtree.  Otherwise, that trailing blank will be
+excluded as delimiting whitespace between topics.
 
 Returns the value of point."
   (interactive "P")
@@ -2080,18 +2216,21 @@
                 (> (allout-recent-depth) level))
       (allout-next-heading))
     (and (not (eobp)) (forward-char -1))
-    (and (memq (preceding-char) '(?\n ?\r))
-         (memq (aref (buffer-substring (max 1 (- (point) 3)) (point)) 1)
-               '(?\n ?\r))
+    (if (and (not include-trailing-blank) (= ?\n (preceding-char)))
          (forward-char -1))
     (setq allout-recent-end-of-subtree (point))))
-;;;_   > allout-end-of-current-subtree ()
-(defun allout-end-of-current-subtree ()
+;;;_   > allout-end-of-current-subtree (&optional include-trailing-blank)
+(defun allout-end-of-current-subtree (&optional include-trailing-blank)
+
   "Put point at end of last leaf in currently visible containing topic.
 
+Optional INCLUDE-TRAILING-BLANK means include a trailing blank line, if
+any, as part of the subtree.  Otherwise, that trailing blank will be
+excluded as delimiting whitespace between topics.
+
 Returns the value of point."
   (interactive)
-  (allout-end-of-subtree t))
+  (allout-end-of-subtree t include-trailing-blank))
 ;;;_   > allout-beginning-of-current-entry ()
 (defun allout-beginning-of-current-entry ()
   "When not already there, position point at beginning of current topic header.
@@ -2104,18 +2243,23 @@
     (if (and (interactive-p)
 	     (= (point) start-point))
 	(goto-char (allout-current-bullet-pos)))))
-;;;_   > allout-end-of-entry ()
-(defun allout-end-of-entry ()
-  "Position the point at the end of the current topics' entry."
+;;;_   > allout-end-of-entry (&optional inclusive)
+(defun allout-end-of-entry (&optional inclusive)
+  "Position the point at the end of the current topics' entry.
+
+Optional INCLUSIVE means also include trailing empty line, if any.  When
+unset, whitespace between items separates them even when the items are
+collapsed."
   (interactive)
-  (prog1 (allout-pre-next-preface)
-    (if (and (not (bobp))(looking-at "^$"))
-        (forward-char -1))))
+  (allout-pre-next-prefix)
+  (if (and (not inclusive) (not (bobp)) (= ?\n (preceding-char)))
+      (forward-char -1))
+  (point))
 ;;;_   > allout-end-of-current-heading ()
 (defun allout-end-of-current-heading ()
   (interactive)
   (allout-beginning-of-current-entry)
-  (re-search-forward "[\n\r]" nil t)
+  (search-forward "\n" nil t)
   (forward-char -1))
 (defalias 'allout-end-of-heading 'allout-end-of-current-heading)
 ;;;_   > allout-get-body-text ()
@@ -2123,13 +2267,13 @@
   "Return the unmangled body text of the topic immediately containing point."
   (save-excursion
     (allout-end-of-prefix)
-    (if (not (re-search-forward "[\n\r]" nil t))
+    (if (not (search-forward "\n" nil t))
         nil
       (backward-char 1)
       (let ((pre-body (point)))
         (if (not pre-body)
             nil
-          (allout-end-of-entry)
+          (allout-end-of-entry t)
           (if (not (= pre-body (point)))
               (buffer-substring-no-properties (1+ pre-body) (point))))
         )
@@ -2189,8 +2333,7 @@
   (allout-back-to-current-heading)
   (let ((present-level (allout-recent-depth))
 	(last-good (point))
-	failed
-	return)
+	failed)
     ;; Loop for iterating arg:
     (while (and (> (allout-recent-depth) 1)
                 (> arg 0)
@@ -2260,11 +2403,9 @@
  (if (or (bobp) (eobp))
      nil
    (forward-char -1))
- (if (or (bobp) (not (memq (preceding-char) '(?\n ?\r))))
+ (if (or (bobp) (not (= ?\n (preceding-char))))
      nil
-   (forward-char -1)
-   (if (or (bobp) (not (memq (preceding-char) '(?\n ?\r))))
-       (forward-char -1)))
+   (forward-char -1))
  (point))
 ;;;_   > allout-beginning-of-level ()
 (defun allout-beginning-of-level ()
@@ -2282,19 +2423,19 @@
 (defun allout-next-visible-heading (arg)
   "Move to the next ARG'th visible heading line, backward if arg is negative.
 
-Move as far as possible in indicated direction \(beginning or end of
-buffer) if headings are exhausted."
+Move to buffer limit in indicated direction if headings are exhausted."
 
   (interactive "p")
   (let* ((backward (if (< arg 0) (setq arg (* -1 arg))))
 	 (step (if backward -1 1))
-	 (start-point (point))
 	 prev got)
 
     (while (> arg 0)			; limit condition
       (while (and (not (if backward (bobp)(eobp))) ; boundary condition
 		  ;; Move, skipping over all those concealed lines:
-		  (< -1 (forward-line step))
+		  (prog1 (condition-case nil (or (line-move step) t)
+                           (error nil))
+                    (allout-beginning-of-current-line))
 		  (not (setq got (looking-at allout-regexp)))))
       ;; Register this got, it may be the last:
       (if got (setq prev got))
@@ -2323,7 +2464,6 @@
 Returns resulting position, else nil if none found."
   (interactive "p")
   (let ((start-depth (allout-current-depth))
-	(start-point (point))
 	(start-arg arg)
 	(backward (> 0 arg))
 	last-depth
@@ -2386,51 +2526,17 @@
 - Implement (and clear) `allout-post-goto-bullet', for hot-spot
   outline commands.
 
-- Decrypt topic currently being edited if it was encrypted for a save.
-
-- Massage buffer-undo-list so successive, standard character self-inserts are
-  aggregated.  This kludge compensates for lack of undo bunching when
-  before-change-functions is used."
+- Decrypt topic currently being edited if it was encrypted for a save."
 
 					; Apply any external change func:
   (if (not (allout-mode-p))		; In allout-mode.
       nil
-    (if allout-isearch-dynamic-expose
-	(allout-isearch-rectification))
-    ;; Undo bunching business:
-    (if (and (listp buffer-undo-list)	; Undo history being kept.
-	     (equal this-command 'self-insert-command)
-	     (equal last-command 'self-insert-command))
-	(let* ((prev-stuff (cdr buffer-undo-list))
-	       (before-prev-stuff (cdr (cdr prev-stuff)))
-	       cur-cell cur-from cur-to
-	       prev-cell prev-from prev-to)
-	  (if (and before-prev-stuff	; Goes back far enough to bother,
-		   (not (car prev-stuff)) ; and break before current,
-		   (not (car before-prev-stuff)) ; !and break before prev!
-		   (setq prev-cell (car (cdr prev-stuff))) ; contents now,
-		   (setq cur-cell (car buffer-undo-list)) ; contents prev.
-
-		   ;; cur contents denote a single char insertion:
-		   (numberp (setq cur-from (car cur-cell)))
-		   (numberp (setq cur-to (cdr cur-cell)))
-		   (= 1 (- cur-to cur-from))
-
-		   ;; prev contents denote fewer than aggregate-limit
-		   ;; insertions:
-		   (numberp (setq prev-from (car prev-cell)))
-		   (numberp (setq prev-to (cdr prev-cell)))
-					; Below threshold:
-		   (> allout-undo-aggregation (- prev-to prev-from)))
-	      (setq buffer-undo-list
-		    (cons (cons prev-from cur-to)
-			  (cdr (cdr (cdr buffer-undo-list))))))))
 
     (if (and (boundp 'allout-after-save-decrypt)
              allout-after-save-decrypt)
         (allout-after-saves-handler))
 
-    ;; Implement -post-goto-bullet, if set: (must be after undo business)
+    ;; Implement -post-goto-bullet, if set:
     (if (and allout-post-goto-bullet
 	     (allout-current-bullet-pos))
 	(progn (goto-char (allout-current-bullet-pos))
@@ -2456,10 +2562,6 @@
   (if (not (allout-mode-p))
       ;; Shouldn't be invoked if not in allout-mode, but just in case:
       nil
-    ;; Register isearch status:
-    (if (and (boundp  'isearch-mode) isearch-mode)
-	(setq allout-pre-was-isearching t)
-      (setq allout-pre-was-isearching nil))
     ;; Hot-spot navigation provisions:
     (if (and (eq this-command 'self-insert-command)
 	     (eq (point)(allout-current-bullet-pos)))
@@ -2499,110 +2601,6 @@
 	   (not (allout-mode-p))
 	   allout-layout)
       (allout-mode t)))
-;;;_   > allout-isearch-rectification
-(defun allout-isearch-rectification ()
-  "Rectify outline exposure before, during, or after isearch.
-
-Called as part of `allout-post-command-business'."
-
-  (let ((isearching (and (boundp 'isearch-mode) isearch-mode)))
-    (cond ((and isearching (not allout-pre-was-isearching))
-	   (allout-isearch-expose 'start))
-	  ((and isearching allout-pre-was-isearching)
-	   (allout-isearch-expose 'continue))
-	  ((and (not isearching) allout-pre-was-isearching)
-	   (allout-isearch-expose 'final))
-	  ;; Not and wasn't isearching:
-	  (t (setq allout-isearch-prior-pos nil)
-	     (setq allout-isearch-did-quit nil)))))
-;;;_   = allout-isearch-was-font-lock
-(defvar allout-isearch-was-font-lock
-  (and (boundp 'font-lock-mode) font-lock-mode))
-;;;_   > allout-isearch-expose (mode)
-(defun allout-isearch-expose (mode)
-  "MODE is either 'clear, 'start, 'continue, or 'final."
-  ;; allout-isearch-prior-pos encodes exposure status of prior pos:
-  ;; (pos was-vis header-pos end-pos)
-  ;; pos	- point of concern
-  ;; was-vis	- t, else 'topic if entire topic was exposed, 'entry otherwise
-  ;; Do reclosure or prior pos, as necessary:
-  (if (eq mode 'start)
-      (setq allout-isearch-was-font-lock (and (boundp 'font-lock-mode)
-                                               font-lock-mode)
-	    font-lock-mode nil)
-    (if (eq mode 'final)
-	(setq font-lock-mode allout-isearch-was-font-lock))
-    (if (and allout-isearch-prior-pos
-	     (listp allout-isearch-prior-pos))
-	;; Conceal prior peek:
-	(allout-flag-region (car (cdr allout-isearch-prior-pos))
-			     (car (cdr (cdr allout-isearch-prior-pos)))
-			     ?\r)))
-  (if (allout-visible-p)
-      (setq allout-isearch-prior-pos nil)
-    (if (not (eq mode 'final))
-	(setq allout-isearch-prior-pos (cons (point) (allout-show-entry)))
-      (if allout-isearch-did-quit
-	  nil
-	(setq allout-isearch-prior-pos nil)
-	(allout-show-children))))
-  (setq allout-isearch-did-quit nil))
-;;;_   > allout-enwrap-isearch ()
-(defun allout-enwrap-isearch ()
-  "Impose `allout-mode' isearch-abort wrapper for dynamic exposure in isearch.
-
-The function checks to ensure that the rebinding is done only once."
-
-  (add-hook 'isearch-mode-end-hook 'allout-isearch-rectification)
-  (if (fboundp 'allout-real-isearch-abort)
-      ;;
-      nil
-                                        ; Ensure load of isearch-mode:
-    (if (or (and (fboundp 'isearch-mode)
-                 (fboundp 'isearch-abort))
-            (condition-case error
-                (load-library "isearch-mode")
-              ('file-error (message
-			    "Skipping isearch-mode provisions - %s '%s'"
-			    (car (cdr error))
-			    (car (cdr (cdr error))))
-			   (sit-for 1)
-			   ;; Inhibit subsequent tries and return nil:
-			   (setq allout-isearch-dynamic-expose nil))))
-        ;; Isearch-mode loaded, encapsulate specific entry points for
-        ;; outline dynamic-exposure business:
-        (progn
-	  ;; stash crucial isearch-mode funcs under known, private
-	  ;; names, then register wrapper functions under the old
-	  ;; names, in their stead:
-          (fset 'allout-real-isearch-abort (symbol-function 'isearch-abort))
-          (fset 'isearch-abort 'allout-isearch-abort)))))
-;;;_   > allout-isearch-abort ()
-(defun allout-isearch-abort ()
-  "Wrapper for allout-real-isearch-abort \(which see), to register
-actual quits."
-  (interactive)
-  (setq allout-isearch-did-quit nil)
-  (condition-case what
-      (allout-real-isearch-abort)
-    ('quit (setq allout-isearch-did-quit t)
-	  (signal 'quit nil))))
-
-;;; Prevent unnecessary font-lock while isearching!
-(defvar isearch-was-font-locking nil)
-(defun isearch-inhibit-font-lock ()
-  "Inhibit `font-lock' while isearching - for use on `isearch-mode-hook'."
-  (if (and (allout-mode-p) (boundp 'font-lock-mode) font-lock-mode)
-      (setq isearch-was-font-locking t
-	    font-lock-mode nil)))
-(add-hook 'isearch-mode-hook 'isearch-inhibit-font-lock)
-(defun isearch-reenable-font-lock ()
-  "Reenable font-lock after isearching - for use on `isearch-mode-end-hook'."
-  (if (and (boundp 'font-lock-mode) font-lock-mode)
-      (if (and (allout-mode-p) isearch-was-font-locking)
-	  (setq isearch-was-font-locking nil
-		font-lock-mode t))))
-(add-hook 'isearch-mode-end-hook 'isearch-reenable-font-lock)
 
 ;;;_  - Topic Format Assessment
 ;;;_   > allout-solicit-alternate-bullet (depth &optional current-bullet)
@@ -2807,15 +2805,20 @@
                                    ((allout-sibling-index))))))
     )
   )
-;;;_   > allout-open-topic (relative-depth &optional before use_recent_bullet)
-(defun allout-open-topic (relative-depth &optional before use_recent_bullet)
+;;;_   > allout-open-topic (relative-depth &optional before offer-recent-bullet)
+(defun allout-open-topic (relative-depth &optional before offer-recent-bullet)
   "Open a new topic at depth DEPTH.
 
 New topic is situated after current one, unless optional flag BEFORE
-is non-nil, or unless current line is complete empty (not even
-whitespace), in which case open is done on current line.
-
-If USE_RECENT_BULLET is true, offer to use the bullet of the prior sibling.
+is non-nil, or unless current line is completely empty - lacking even
+whitespace - in which case open is done on the current line.
+
+When adding an offspring, it will be added immediately after the parent if
+the other offspring are exposed, or after the last child if the offspring
+are hidden.  \(The intervening offspring will be exposed in the latter
+case.)
+
+If OFFER-RECENT-BULLET is true, offer to use the bullet of the prior sibling.
 
 Nuances:
 
@@ -2839,12 +2842,12 @@
   having to go to its preceding sibling, and then open forward
   from there."
 
+  (allout-beginning-of-current-line)
   (let* ((depth (+ (allout-current-depth) relative-depth))
          (opening-on-blank (if (looking-at "^\$")
                                (not (setq before nil))))
          ;; bunch o vars set while computing ref-topic
          opening-numbered
-         opening-encrypted
          ref-depth
          ref-bullet
          (ref-topic (save-excursion
@@ -2864,13 +2867,6 @@
                                        (allout-descend-to-depth depth))
                                    (if (allout-numbered-type-prefix)
                                        allout-numbered-bullet))))
-                      (setq opening-encrypted
-                            (save-excursion
-                              (and allout-topic-encryption-bullet
-                                   (or (<= relative-depth 0)
-                                       (allout-descend-to-depth depth))
-                                   (if (allout-numbered-type-prefix)
-                                       allout-numbered-bullet))))
                       (point)))
          dbl-space
          doing-beginning)
@@ -2891,122 +2887,98 @@
                          (save-excursion
                            ;; succeeded by a blank line?
                            (allout-end-of-current-subtree)
-                           (bolp)))
+                           (looking-at "\n\n")))
                     (and (= ref-depth 1)
                          (or before
                              (= depth 1)
                              (save-excursion
                                ;; Don't already have following
                                ;; vertical padding:
-                               (not (allout-pre-next-preface)))))))
-
-                                        ; Position to prior heading,
-                                        ; if inserting backwards, and
-					; not going outwards:
+                               (not (allout-pre-next-prefix)))))))
+
+          ;; Position to prior heading, if inserting backwards, and not
+          ;; going outwards:
           (if (and before (>= relative-depth 0))
 	      (progn (allout-back-to-current-heading)
                             (setq doing-beginning (bobp))
                             (if (not (bobp))
                                 (allout-previous-heading)))
 	    (if (and before (bobp))
-		(allout-unprotected (allout-open-line-not-read-only))))
+		(open-line 1)))
 
           (if (<= relative-depth 0)
               ;; Not going inwards, don't snug up:
               (if doing-beginning
-                  (allout-unprotected
-                   (if (not dbl-space)
-                       (allout-open-line-not-read-only)
-                     (allout-open-line-not-read-only)
-                     (allout-open-line-not-read-only)))
+                  (if (not dbl-space)
+                      (open-line 1)
+                    (open-line 2))
 		(if before
 		    (progn (end-of-line)
-			   (allout-pre-next-preface)
-			   (while (= ?\r (following-char))
+			   (allout-pre-next-prefix)
+                           (while (and (= ?\n (following-char))
+                                       (save-excursion
+                                         (forward-char 1)
+                                         (allout-hidden-p)))
                              (forward-char 1))
 			   (if (not (looking-at "^$"))
-			       (allout-unprotected
-                                (allout-open-line-not-read-only))))
-		  (allout-end-of-current-subtree)))
-            ;; Going inwards - double-space if first offspring is,
-            ;; otherwise snug up.
-            (end-of-line)		; So we skip any concealed progeny.
-            (allout-pre-next-preface)
+                               (open-line 1)))
+		  (allout-end-of-current-subtree)
+                  (if (looking-at "\n\n") (forward-char 1))))
+            ;; Going inwards - double-space if first offspring is
+            ;; double-spaced, otherwise snug up.
+            (allout-end-of-entry)
+            (line-move 1)
+            (allout-beginning-of-current-line)
+            (backward-char 1)
             (if (bolp)
                 ;; Blank lines between current header body and next
                 ;; header - get to last substantive (non-white-space)
                 ;; line in body:
-                (re-search-backward "[^ \t\n]" nil t))
+                (progn (setq dbl-space t)
+                       (re-search-backward "[^ \t\n]" nil t)))
+            (if (looking-at "\n\n")
+                (setq dbl-space t))
             (if (save-excursion
                   (allout-next-heading)
-                  (if (> (allout-recent-depth) ref-depth)
-                      ;; This is an offspring.
-                      (progn (forward-line -1)
-                             (looking-at "^\\s-*$"))))
+                  (when (> (allout-recent-depth) ref-depth)
+                    ;; This is an offspring.
+                    (forward-line -1)
+                    (looking-at "^\\s-*$")))
                 (progn (forward-line 1)
-                       (allout-unprotected
-                        (allout-open-line-not-read-only))
+                       (open-line 1)
                        (forward-line 1)))
-            (end-of-line))
+            (allout-end-of-current-line))
+
           ;;(if doing-beginning (goto-char doing-beginning))
           (if (not (bobp))
               ;; We insert a newline char rather than using open-line to
               ;; avoid rear-stickiness inheritence of read-only property.
               (progn (if (and (not (> depth ref-depth))
                               (not before))
-                         (allout-unprotected
-                          (allout-open-line-not-read-only))
-		       (if (> depth ref-depth)
-                         (allout-unprotected
-                          (allout-open-line-not-read-only))
+                         (open-line 1)
+		       (if (and (not dbl-space) (> depth ref-depth))
+                           (newline 1)
 			 (if dbl-space
-                             (allout-unprotected
-                              (allout-open-line-not-read-only))
+                             (open-line 1)
 			   (if (not before)
-			       (allout-unprotected (newline 1))))))
-                     (if dbl-space
-			 (allout-unprotected (newline 1)))
+                               (newline 1)))))
+                     (if (and dbl-space (not (> relative-depth 0)))
+			 (newline 1))
                      (if (and (not (eobp))
                               (not (bolp)))
                          (forward-char 1))))
           ))
-    (insert (concat (allout-make-topic-prefix opening-numbered
-                                              t
-                                              depth)
-                           " "))
-
-    ;;(if doing-beginning (save-excursion (newline (if dbl-space 2 1))))
-
-
-    (allout-rebullet-heading (and use_recent_bullet         ;;; solicit
-                                   ref-bullet)
-                              depth			     ;;; depth
-                              nil 			     ;;; number-control
-                              nil			     ;;; index
-                              t)
+    (insert (concat (allout-make-topic-prefix opening-numbered t depth)
+                    " "))
+
+    (allout-rebullet-heading (and offer-recent-bullet ref-bullet)
+                              depth nil nil t)
+    (if (> relative-depth 0)
+        (save-excursion (goto-char ref-topic)
+                        (allout-show-children)))
     (end-of-line)
     )
   )
-;;;_    . open-topic contingencies
-;;;_     ; base topic - one from which open was issued
-;;;_      , beginning char
-;;;_      , amount of space before will be used, unless opening in place
-;;;_      , end char will be used, unless opening before (and it still may)
-;;;_     ; absolute depth of new topic
-;;;_     ! insert in place - overrides most stuff
-;;;_     ; relative depth of new re base
-;;;_     ; before or after base topic
-;;;_     ; spacing around topic, if any, prior to new topic and at same depth
-;;;_     ; buffer boundaries - special provisions for beginning and end ob
-;;;_     ; level 1 topics have special provisions also - double space.
-;;;_     ; location of new topic
-;;;_   > allout-open-line-not-read-only ()
-(defun allout-open-line-not-read-only ()
-  "Open line and remove inherited read-only text prop from new char, if any."
-  (open-line 1)
-  (if (plist-get (text-properties-at (point)) 'read-only)
-      (allout-unprotected
-       (remove-text-properties (point) (+ 1 (point)) '(read-only nil)))))
 ;;;_   > allout-open-subtopic (arg)
 (defun allout-open-subtopic (arg)
   "Open new topic header at deeper level than the current one.
@@ -3055,9 +3027,12 @@
                                ;; length of topic prefix:
                                (make-string (progn (allout-end-of-prefix)
                                                    (current-column))
-                                            ?\ ))))))
+                                            ?\ )))))
+        (use-auto-fill-function (or allout-outside-normal-auto-fill-function
+                                    auto-fill-function
+                                    'do-auto-fill)))
     (if (or allout-former-auto-filler allout-use-hanging-indents)
-        (do-auto-fill))))
+        (funcall use-auto-fill-function))))
 ;;;_    > allout-reindent-body (old-depth new-depth &optional number)
 (defun allout-reindent-body (old-depth new-depth &optional number)
   "Reindent body lines which were indented at OLD-DEPTH to NEW-DEPTH.
@@ -3071,7 +3046,6 @@
     (allout-end-of-prefix)
     (let* ((new-margin (current-column))
 	   excess old-indent-begin old-indent-end
-	   curr-ind
 	   ;; We want the column where the header-prefix text started
 	   ;; *before* the prefix was changed, so we infer it relative
 	   ;; to the new margin and the shift in depth:
@@ -3081,7 +3055,7 @@
       (allout-unprotected
        (save-match-data
          (while
-	     (and (re-search-forward "[\n\r]\\(\\s-*\\)"
+	     (and (re-search-forward "\n\\(\\s-*\\)"
 				     nil
 				     t)
 		  ;; Register the indent data, before we reset the
@@ -3231,8 +3205,7 @@
 
 With repeat count, shift topic depth by that amount."
   (interactive "P")
-  (let ((start-col (current-column))
-        (was-eol (eolp)))
+  (let ((start-col (current-column)))
     (save-excursion
       ;; Normalize arg:
       (cond ((null arg) (setq arg 0))
@@ -3414,8 +3387,8 @@
               (if (and (> predecessor-depth 0)
                        (> (+ current-depth arg)
                           (1+ predecessor-depth)))
-                  (error (concat "May not shift deeper than offspring depth"
-                                 " of previous topic")))))))
+                  (error (concat "Disallowed shift deeper than"
+                                 " containing topic's children.")))))))
   (allout-rebullet-topic arg))
 ;;;_    > allout-shift-out (arg)
 (defun allout-shift-out (arg)
@@ -3436,84 +3409,72 @@
 
   (interactive "*P")
 
-  (let ((start-point (point))
-        (leading-kill-ring-entry (car kill-ring))
-        binding)
-
-    (condition-case err
-
-        (if (not (and (allout-mode-p)        ; active outline mode,
-                      allout-numbered-bullet ; numbers may need adjustment,
-                      (bolp)                  ; may be clipping topic head,
-                      (looking-at allout-regexp))) ; are clipping topic head.
-            ;; Above conditions do not obtain - just do a regular kill:
-            (kill-line arg)
-          ;; Ah, have to watch out for adjustments:
-          (let* ((depth (allout-depth))
-                 (start-point (point))
-                 binding)
-                                        ; Do the kill, presenting option
-                                        ; for read-only text:
-            (kill-line arg)
+  (if (or (not (allout-mode-p))
+          (not (bolp))
+          (not (looking-at allout-regexp)))
+      ;; Above conditions do not obtain - just do a regular kill:
+      (kill-line arg)
+    ;; Ah, have to watch out for adjustments:
+    (let* ((beg (point))
+           (beg-hidden (allout-hidden-p))
+           (end-hidden (save-excursion (allout-end-of-current-line)
+                                       (allout-hidden-p)))
+           (depth (allout-depth))
+           (collapsed (allout-current-topic-collapsed-p)))
+
+      (if collapsed
+          (put-text-property beg (1+ beg) 'allout-was-collapsed t)
+        (remove-text-properties beg (1+ beg) '(allout-was-collapsed t)))
+
+      (if (and (not beg-hidden) (not end-hidden))
+          (allout-unprotected (kill-line arg))
+        (kill-line arg))
                                         ; Provide some feedback:
-          (sit-for 0)
-          (save-excursion
-                                        ; Start with the topic
-                                        ; following killed line:
+      (sit-for 0)
+      (if allout-numbered-bullet
+          (save-excursion               ; Renumber subsequent topics if needed:
             (if (not (looking-at allout-regexp))
                 (allout-next-heading))
-            (allout-renumber-to-depth depth))))
-      ;; condition case handler:
-      (text-read-only
-       (goto-char start-point)
-       (setq binding (where-is-internal 'allout-kill-topic nil t))
-       (cond ((not binding) (setq binding ""))
-             ((arrayp binding)
-              (setq binding (mapconcat 'key-description (list binding) ", ")))
-             (t (setq binding (format "%s" binding))))
-       ;; ensure prior kill-ring leader is properly restored:
-       (if (eq leading-kill-ring-entry (cadr kill-ring))
-           ;; Aborted kill got pushed on front - ditch it:
-           (let ((got (car kill-ring)))
-             (setq kill-ring (cdr kill-ring))
-             got)
-         ;; Aborted kill got appended to prior - resurrect prior:
-         (setcar kill-ring leading-kill-ring-entry))
-       ;; make last-command skip this failed command, so kill-appending
-       ;; conditions track:
-       (setq this-command last-command)
-       (error (concat "read-only text hit - use %s allout-kill-topic to"
-                      " discard collapsed stuff")
-              binding)))
-    )
-  )
+            (allout-renumber-to-depth depth))))))
 ;;;_    > allout-kill-topic ()
 (defun allout-kill-topic ()
   "Kill topic together with subtopics.
 
-Leaves primary topic's trailing vertical whitespace, if any."
+Trailing whitespace is killed with a topic if that whitespace:
+
+ - would separate the topic from a subsequent sibling
+ - would separate the topic from the end of buffer
+ - would not be added to whitespace already separating the topic from the
+   previous one.
+
+Completely collapsed topics are marked as such, for re-collapse
+when yank with allout-yank into an outline as a heading."
 
   ;; Some finagling is done to make complex topic kills appear faster
   ;; than they actually are.  A redisplay is performed immediately
-  ;; after the region is disposed of, though the renumbering process
+  ;; after the region is deleted, though the renumbering process
   ;; has yet to be performed.  This means that there may appear to be
-  ;; a lag *after* the kill has been performed.
+  ;; a lag *after* a kill has been performed.
 
   (interactive)
-  (let* ((beg (prog1 (allout-back-to-current-heading)(beginning-of-line)))
+  (let* ((collapsed (allout-current-topic-collapsed-p))
+         (beg (prog1 (allout-back-to-current-heading) (beginning-of-line)))
          (depth (allout-recent-depth)))
     (allout-end-of-current-subtree)
+    (if (and (/= (current-column) 0) (not (eobp)))
+        (forward-char 1))
     (if (not (eobp))
-	(if (or (not (looking-at "^$"))
-		;; A blank line - cut it with this topic *unless* this
-		;; is the last topic at this level, in which case
-		;; we'll leave the blank line as part of the
-		;; containing topic:
-		(save-excursion
-		  (and (allout-next-heading)
-		       (>= (allout-recent-depth) depth))))
+	(if (and (looking-at "\n")
+                 (or (save-excursion
+                       (or (not (allout-next-heading))
+                           (= depth (allout-recent-depth))))
+                     (and (> (- beg (point-min)) 3)
+                          (string= (buffer-substring (- beg 2) beg) "\n\n"))))
 	    (forward-char 1)))
 
+    (if collapsed
+        (put-text-property beg (1+ beg) 'allout-was-collapsed t)
+      (remove-text-properties beg (1+ beg) '(allout-was-collapsed t)))
     (allout-unprotected (kill-region beg (point)))
     (sit-for 0)
     (save-excursion
@@ -3521,7 +3482,7 @@
 ;;;_    > allout-yank-processing ()
 (defun allout-yank-processing (&optional arg)
 
-  "Incidental outline-specific business to be done just after text yanks.
+  "Incidental allout-specific business to be done just after text yanks.
 
 Does depth adjustment of yanked topics, when:
 
@@ -3542,10 +3503,12 @@
   (interactive "*P")
 					; Get to beginning, leaving
 					; region around subject:
-  (if (< (my-mark-marker t) (point))
+  (if (< (allout-mark-marker t) (point))
       (exchange-point-and-mark))
   (let* ((subj-beg (point))
-	 (subj-end (my-mark-marker t))
+         (into-bol (bolp))
+	 (subj-end (allout-mark-marker t))
+         (was-collapsed (get-text-property subj-beg 'allout-was-collapsed))
 	 ;; 'resituate' if yanking an entire topic into topic header:
 	 (resituate (and (allout-e-o-prefix-p)
 			 (looking-at (concat "\\(" allout-regexp "\\)"))
@@ -3554,7 +3517,7 @@
 	 ;; `rectify-numbering' if resituating (where several topics may
 	 ;; be resituating) or yanking a topic into a topic slot (bol):
 	 (rectify-numbering (or resituate
-				(and (bolp) (looking-at allout-regexp)))))
+				(and into-bol (looking-at allout-regexp)))))
     (if resituate
                                         ; The yanked stuff is a topic:
 	(let* ((prefix-len (- (match-end 1) subj-beg))
@@ -3575,7 +3538,6 @@
 			    (allout-prefix-data (match-beginning 0)
 						 (match-end 0)))
 		       (allout-recent-depth))))
-	       done
 	       (more t))
 	  (setq rectify-numbering allout-numbered-bullet)
 	  (if adjust-to-depth
@@ -3616,7 +3578,7 @@
 		    (progn
 		      (beginning-of-line)
 		      (delete-region (point) subj-beg)
-		      (set-marker (my-mark-marker t) subj-end)
+		      (set-marker (allout-mark-marker t) subj-end)
 		      (goto-char subj-beg)
 		      (allout-end-of-prefix))
                                         ; Delete base subj prefix,
@@ -3643,6 +3605,9 @@
 					  nil	;;; index
 					  t))
 	    (message ""))))
+    (when (and (or into-bol resituate) was-collapsed)
+      (remove-text-properties subj-beg (1+ subj-beg) '(allout-was-collapsed))
+      (allout-hide-current-subtree))
     (if (not resituate)
       (exchange-point-and-mark))))
 ;;;_    > allout-yank (&optional arg)
@@ -3678,7 +3643,8 @@
   (setq this-command 'yank)
   (yank arg)
   (if (allout-mode-p)
-      (allout-yank-processing)))
+      (allout-yank-processing))
+)
 ;;;_    > allout-yank-pop (&optional arg)
 (defun allout-yank-pop (&optional arg)
   "Yank-pop like `allout-yank' when popping to bare outline prefixes.
@@ -3736,93 +3702,51 @@
 ;;;_  - Fundamental
 ;;;_   > allout-flag-region (from to flag)
 (defun allout-flag-region (from to flag)
-  "Hide or show lines from FROM to TO, via Emacs selective-display FLAG char.
-Ie, text following flag C-m \(carriage-return) is hidden until the
-next C-j (newline) char.
-
-Returns the endpoint of the region."
-  ;; "OFR-" prefixes to avoid collisions with vars in code calling the macro.
-  ;; ie, elisp macro vars are not 'hygenic', so distinct names are necessary.
-  (let ((was-inhibit-r-o inhibit-read-only)
-        (was-undo-list buffer-undo-list)
-        (was-modified (buffer-modified-p))
-        trans)
-    (unwind-protect
-     (save-excursion
-       (setq inhibit-read-only t)
-       (setq buffer-undo-list t)
-       (if (> from to)
-           (setq trans from from to to trans))
-       (subst-char-in-region from to
-                             (if (= flag ?\n) ?\r ?\n)
-                             flag t)
-       ;; adjust character read-protection on all the affected lines.
-       ;; we handle the region line-by-line.
-       (goto-char to)
-       (end-of-line)
-       (setq to (min (+ 2 (point)) (point-max)))
-       (goto-char from)
-       (beginning-of-line)
-       (while (< (point) to)
-         ;; handle from start of exposed to beginning of hidden, or eol:
-         (remove-text-properties (point)
-                                 (progn (if (re-search-forward "[\r\n]"
-                                                               nil t)
-                                            (forward-char -1))
-                                        (point))
-                                 '(read-only nil))
-         ;; handle from start of hidden, if any, to eol:
-         (if (and (not (eobp)) (= (char-after (point)) ?\r))
-             (put-text-property (point) (progn (end-of-line) (point))
-                                'read-only t))
-         ;; Handle the end-of-line to beginning of next line:
-         (if (not (eobp))
-             (progn (forward-char 1)
-                    (remove-text-properties (1- (point)) (point)
-                                            '(read-only nil)))))
-       )
-     (if (not was-modified)
-         (set-buffer-modified-p nil))
-     (setq inhibit-read-only was-inhibit-r-o)
-     (setq buffer-undo-list was-undo-list)
-     )
-    )
-  )
+  "Conceal text from FROM to TO if FLAG is non-nil, else reveal it.
+
+Text is shown if flag is nil and hidden otherwise."
+  ;; We use outline invisibility spec.
+  (remove-overlays from to 'category 'allout-overlay-category)
+  (when flag
+    (let ((o (make-overlay from to)))
+      (overlay-put o 'category 'allout-overlay-category)
+      (when (featurep 'xemacs)
+        (let ((props (symbol-plist 'allout-overlay-category)))
+          (while props
+            (overlay-put o (pop props) (pop props)))))))
+  (run-hooks 'allout-view-change-hook))
 ;;;_   > allout-flag-current-subtree (flag)
 (defun allout-flag-current-subtree (flag)
-  "Hide or show subtree of currently-visible topic.
-
-See `allout-flag-region' for more details."
+  "Conceal currently-visible topic's subtree if FLAG non-nil, else reveal it."
 
   (save-excursion
     (allout-back-to-current-heading)
-    (let ((from (point))
-          (to (progn (allout-end-of-current-subtree) (1- (point)))))
-      (allout-flag-region from to flag))))
+    (end-of-line)
+    (allout-flag-region (point)
+                        ;; Exposing must not leave trailing blanks hidden,
+                        ;; but can leave them exposed when hiding, so we
+                        ;; can use flag's inverse as the
+                        ;; include-trailing-blank cue:
+                        (allout-end-of-current-subtree (not flag))
+                        flag)))
 
 ;;;_  - Topic-specific
-;;;_   > allout-show-entry ()
-(defun allout-show-entry ()
+;;;_   > allout-show-entry (&optional inclusive)
+(defun allout-show-entry (&optional inclusive)
   "Like `allout-show-current-entry', reveals entries nested in hidden topics.
 
 This is a way to give restricted peek at a concealed locality without the
 expense of exposing its context, but can leave the outline with aberrant
-exposure.  `allout-hide-current-entry-completely' or `allout-show-offshoot'
-should be used after the peek to rectify the exposure."
+exposure.  `allout-show-offshoot' should be used after the peek to rectify
+the exposure."
 
   (interactive)
   (save-excursion
-    (let ((at (point))
-	  beg end)
+    (let (beg end)
       (allout-goto-prefix)
-      (setq beg (if (= (preceding-char) ?\r) (1- (point)) (point)))
-      (re-search-forward "[\n\r]" nil t)
-      (setq end (1- (if (< at (point))
-			;; We're on topic head line - show only it:
-			(point)
-		      ;; or we're in body - include it:
-		      (max beg (or (allout-pre-next-preface) (point))))))
-      (allout-flag-region beg end ?\n)
+      (setq beg (if (allout-hidden-p) (1- (point)) (point)))
+      (setq end (allout-pre-next-prefix))
+      (allout-flag-region beg end nil)
       (list beg end))))
 ;;;_   > allout-show-children (&optional level strict)
 (defun allout-show-children (&optional level strict)
@@ -3843,67 +3767,59 @@
 point of non-opened subtree?)"
 
   (interactive "p")
-  (let (max-pos)
+  (let ((start-point (point)))
     (if (and (not strict)
-	     (allout-hidden-p))
-
-	(progn (allout-show-to-offshoot) ; Point's concealed, open to
-					  ; expose it.
-	       ;; Then recurse, but with "strict" set so we don't
-	       ;; infinite regress:
-	       (setq max-pos (allout-show-children level t)))
+             (allout-hidden-p))
+
+        (progn (allout-show-to-offshoot) ; Point's concealed, open to
+                                        ; expose it.
+               ;; Then recurse, but with "strict" set so we don't
+               ;; infinite regress:
+               (allout-show-children level t))
 
       (save-excursion
-	(save-restriction
-	  (let* ((start-pt (point))
-		 (chart (allout-chart-subtree (or level 1)))
-		 (to-reveal (allout-chart-to-reveal chart (or level 1))))
-	    (goto-char start-pt)
-	    (if (and strict (= (preceding-char) ?\r))
-		;; Concealed root would already have been taken care of,
-		;; unless strict was set.
-		(progn
-		  (allout-flag-region (point) (allout-snug-back) ?\n)
-		  (if allout-show-bodies
-		      (progn (goto-char (car to-reveal))
-			     (allout-show-current-entry)))))
-	    (while to-reveal
-	      (goto-char (car to-reveal))
-	      (allout-flag-region (point) (allout-snug-back) ?\n)
-	      (if allout-show-bodies
-		  (progn (goto-char (car to-reveal))
-			 (allout-show-current-entry)))
-	      (setq to-reveal (cdr to-reveal)))))))))
-;;;_   > allout-hide-point-reconcile ()
-(defun allout-hide-reconcile ()
-  "Like `allout-hide-current-entry'; hides completely if within hidden region.
-
-Specifically intended for aberrant exposure states, like entries that were
-exposed by `allout-show-entry' but are within otherwise concealed regions."
-  (interactive)
-  (save-excursion
-    (allout-goto-prefix)
-    (allout-flag-region (if (not (bobp)) (1- (point)) (point))
-                         (progn (allout-pre-next-preface)
-                                (if (= ?\r (following-char))
-                                    (point)
-                                  (1- (point))))
-                         ?\r)))
+        (allout-beginning-of-current-line)
+        (save-restriction
+          (let* ((chart (allout-chart-subtree (or level 1)))
+                 (to-reveal (allout-chart-to-reveal chart (or level 1))))
+            (goto-char start-point)
+            (when (and strict (allout-hidden-p))
+              ;; Concealed root would already have been taken care of,
+              ;; unless strict was set.
+              (allout-flag-region (point) (allout-snug-back) nil)
+              (when allout-show-bodies
+                (goto-char (car to-reveal))
+                (allout-show-current-entry)))
+            (while to-reveal
+              (goto-char (car to-reveal))
+              (allout-flag-region (save-excursion (allout-snug-back) (point))
+                                  (progn (search-forward "\n" nil t)
+                                         (1- (point)))
+                                  nil)
+              (when allout-show-bodies
+                (goto-char (car to-reveal))
+                (allout-show-current-entry))
+              (setq to-reveal (cdr to-reveal)))))))
+    ;; Compensate for `save-excursion's maintenance of point
+    ;; within invisible text:
+    (goto-char start-point)))
 ;;;_   > allout-show-to-offshoot ()
 (defun allout-show-to-offshoot ()
   "Like `allout-show-entry', but reveals all concealed ancestors, as well.
 
-As with `allout-hide-current-entry-completely', useful for rectifying
-aberrant exposure states produced by `allout-show-entry'."
-
+Useful for coherently exposing to a random point in a hidden region."
   (interactive)
   (save-excursion
     (let ((orig-pt (point))
 	  (orig-pref (allout-goto-prefix))
 	  (last-at (point))
 	  bag-it)
-      (while (or bag-it (= (preceding-char) ?\r))
-	(beginning-of-line)
+      (while (or bag-it (allout-hidden-p))
+        (while (allout-hidden-p)
+          ;; XXX We would use `(move-beginning-of-line 1)', but it gets
+          ;; stuck on hidden newlines at column 80, as of GNU Emacs 22.0.50.
+          (beginning-of-line)
+          (if (allout-hidden-p) (forward-char -1)))
 	(if (= last-at (setq last-at (point)))
 	    ;; Oops, we're not making any progress!  Show the current
 	    ;; topic completely, and bag this try.
@@ -3926,38 +3842,24 @@
   (interactive)
   (allout-back-to-current-heading)
   (save-excursion
-   (allout-flag-region (point)
+    (end-of-line)
+    (allout-flag-region (point)
                         (progn (allout-end-of-entry) (point))
-                        ?\r)))
+                        t)))
 ;;;_   > allout-show-current-entry (&optional arg)
 (defun allout-show-current-entry (&optional arg)
 
-  "Show body following current heading, or hide the entry if repeat count."
+  "Show body following current heading, or hide entry with universal argument."
 
   (interactive "P")
   (if arg
       (allout-hide-current-entry)
+    (save-excursion (allout-show-to-offshoot))
     (save-excursion
       (allout-flag-region (point)
-			   (progn (allout-end-of-entry) (point))
-			   ?\n)
+                          (progn (allout-end-of-entry t) (point))
+                          nil)
       )))
-;;;_   > allout-hide-current-entry-completely ()
-; ... allout-hide-current-entry-completely also for isearch dynamic exposure:
-(defun allout-hide-current-entry-completely ()
-  "Like `allout-hide-current-entry', but conceal topic completely.
-
-Specifically intended for aberrant exposure states, like entries that were
-exposed by `allout-show-entry' but are within otherwise concealed regions."
-  (interactive)
-  (save-excursion
-    (allout-goto-prefix)
-    (allout-flag-region (if (not (bobp)) (1- (point)) (point))
-                         (progn (allout-pre-next-preface)
-                                (if (= ?\r (following-char))
-                                    (point)
-                                  (1- (point))))
-                         ?\r)))
 ;;;_   > allout-show-current-subtree (&optional arg)
 (defun allout-show-current-subtree (&optional arg)
   "Show everything within the current topic.  With a repeat-count,
@@ -3970,11 +3872,27 @@
 	    (error "No topics")
 	  ;; got to first, outermost topic - set to expose it and siblings:
 	  (message "Above outermost topic - exposing all.")
-	  (allout-flag-region (point-min)(point-max) ?\n))
+	  (allout-flag-region (point-min)(point-max) nil))
+      (allout-beginning-of-current-line)
       (if (not arg)
-	  (allout-flag-current-subtree ?\n)
+	  (allout-flag-current-subtree nil)
 	(allout-beginning-of-level)
 	(allout-expose-topic '(* :))))))
+;;;_   > allout-current-topic-collapsed-p (&optional include-single-liners)
+(defun allout-current-topic-collapsed-p (&optional include-single-liners)
+  "True if the currently visible containing topic is already collapsed.
+
+If optional INCLUDE-SINGLE-LINERS is true, then include single-line
+topics \(which intrinsically can be considered both collapsed and
+not\), as collapsed.  Otherwise they are considered uncollapsed."
+  (save-excursion
+      (and 
+       (= (progn (allout-back-to-current-heading)
+                 (move-end-of-line 1)
+                 (point))
+          (allout-end-of-current-subtree))
+       (or include-single-liners
+           (progn (backward-char 1) (allout-hidden-p))))))
 ;;;_   > allout-hide-current-subtree (&optional just-close)
 (defun allout-hide-current-subtree (&optional just-close)
   "Close the current topic, or containing topic if this one is already closed.
@@ -3982,35 +3900,21 @@
 If this topic is closed and it's a top level topic, close this topic
 and its siblings.
 
-If optional arg JUST-CLOSE is non-nil, do not treat the parent or
+If optional arg JUST-CLOSE is non-nil, do not close the parent or
 siblings, even if the target topic is already closed."
 
   (interactive)
-  (let ((from (point))
-	(orig-eol (progn (end-of-line)
-			 (if (not (allout-goto-prefix))
-			     (error "No topics found")
-			   (end-of-line)(point)))))
-    (allout-flag-current-subtree ?\r)
-    (goto-char from)
-    (if (and (= orig-eol (progn (goto-char orig-eol)
-				(end-of-line)
-				(point)))
-	     (not just-close)
-             ;; Structure didn't change - try hiding current level:
-	     (goto-char from)
-	     (if (allout-up-current-level 1 t)
-		 t
-	       (goto-char 0)
-	       (let ((msg
-		      "Top-level topic already closed - closing siblings..."))
-		 (message msg)
-		 (allout-expose-topic '(0 :))
-		 (message (concat msg "  Done.")))
-	       nil)
-	     (/= (allout-recent-depth) 0))
-	(allout-hide-current-subtree))
-      (goto-char from)))
+  (let* ((from (point))
+         (sibs-msg "Top-level topic already closed - closing siblings...")
+         (current-exposed (not (allout-current-topic-collapsed-p t))))
+    (cond (current-exposed (allout-flag-current-subtree t))
+          (just-close nil)
+          ((allout-up-current-level 1 t) (allout-hide-current-subtree))
+          (t (goto-char 0)
+             (message sibs-msg)
+             (allout-expose-topic '(0 :))
+             (message (concat sibs-msg "  Done."))))
+    (goto-char from)))
 ;;;_   > allout-show-current-branches ()
 (defun allout-show-current-branches ()
   "Show all subheadings of this heading, but not their bodies."
@@ -4031,7 +3935,7 @@
   "Show all of the text in the buffer."
   (interactive)
   (message "Exposing entire buffer...")
-  (allout-flag-region (point-min) (point-max) ?\n)
+  (allout-flag-region (point-min) (point-max) nil)
   (message "Exposing entire buffer...  Done."))
 ;;;_   > allout-hide-bodies ()
 (defun allout-hide-bodies ()
@@ -4046,11 +3950,11 @@
       (narrow-to-region start end)
       (goto-char (point-min))
       (while (not (eobp))
-	(allout-flag-region (point)
-                             (progn (allout-pre-next-preface) (point)) ?\r)
+        (end-of-line)
+	(allout-flag-region (point) (allout-end-of-entry) t)
 	(if (not (eobp))
 	    (forward-char
-	     (if (looking-at "[\n\r][\n\r]")
+	     (if (looking-at "\n\n")
 		 2 1)))))))
 
 ;;;_   > allout-expose-topic (spec)
@@ -4117,9 +4021,7 @@
     (let ((depth (allout-depth))
 	  (max-pos 0)
 	  prev-elem curr-elem
-	  stay done
-	  snug-back
-	  )
+	  stay)
       (while spec
 	(setq prev-elem curr-elem
 	      curr-elem (car spec)
@@ -4147,7 +4049,7 @@
 		       (setq spec (append (make-list residue prev-elem)
 					  spec)))))))
 	 ((numberp curr-elem)
-	  (if (and (>= 0 curr-elem) (allout-visible-p))
+	  (if (and (>= 0 curr-elem) (not (allout-hidden-p)))
 	      (save-excursion (allout-hide-current-subtree t)
 			      (if (> 0 curr-elem)
 				  nil
@@ -4207,7 +4109,6 @@
 
   (interactive "xExposure spec: ")
   (let ((depth (allout-current-depth))
-	done
 	max-pos)
     (cond ((null spec) nil)
 	  ((symbolp spec)
@@ -4387,7 +4288,7 @@
   (save-excursion
     (let*
 	;; state vars:
-	(strings prefix pad result depth new-depth out gone-out bullet beg
+	(strings prefix result depth new-depth out gone-out bullet beg
 		 next done)
 
       (goto-char start)
@@ -4419,16 +4320,11 @@
 		       beg
 					;To hidden text or end of line:
 		       (progn
-			 (search-forward "\r"
-					 (save-excursion (end-of-line)
-							 (point))
-					 1)
-			 (if (= (preceding-char) ?\r)
-			     (1- (point))
-			   (point))))
+                         (end-of-line)
+                         (allout-back-to-visible-text)))
 		      strings))
-	  (if (< (point) next)		; Resume from after hid text, if any.
-	      (forward-line 1))
+	  (when (< (point) next)      ; Resume from after hid text, if any.
+            (line-move 1))
 	  (setq beg (point)))
 	;; Accumulate list for this topic:
 	(setq strings (nreverse strings))
@@ -4488,7 +4384,7 @@
 ;;;_   > allout-process-exposed (&optional func from to frombuf
 ;;;					    tobuf format)
 (defun allout-process-exposed (&optional func from to frombuf tobuf
-					  format &optional start-num)
+					  format start-num)
   "Map function on exposed parts of current topic; results to another buffer.
 
 All args are options; default values itemized below.
@@ -4694,13 +4590,6 @@
 	(page-numbering (if allout-number-pages
 			    "\\pagestyle{empty}\n"
 			  ""))
-	(linesdef (concat "\\def\\beginlines{"
-			  "\\par\\begingroup\\nobreak\\medskip"
-			  "\\parindent=0pt\n"
-			  " \\kern1pt\\nobreak \\obeylines \\obeyspaces "
-			  "\\everypar{\\strut}}\n"
-			  "\\def\\endlines{"
-			  "\\kern1pt\\endgroup\\medbreak\\noindent}\n"))
 	(titlecmd (format "\\newcommand{\\titlecmd}[1]{{%s #1}}\n"
 			  allout-title-style))
 	(labelcmd (format "\\newcommand{\\labelcmd}[1]{{%s #1}}\n"
@@ -4733,7 +4622,7 @@
 	(title (format "%s%s%s%s"
 		       "\\titlecmd{"
 		       (allout-latex-verb-quote (if allout-title
-						(condition-case err
+						(condition-case nil
 						    (eval allout-title)
 						  ('error "<unnamed buffer>"))
 					      "Unnamed Outline"))
@@ -4913,7 +4802,7 @@
   (interactive "P")
   (save-excursion
     (allout-back-to-current-heading)
-    (allout-toggle-subtree-encryption)
+    (allout-toggle-subtree-encryption fetch-pass)
     )
   )
 ;;;_  > allout-toggle-subtree-encryption (&optional fetch-pass)
@@ -4948,20 +4837,23 @@
             (progn (if (= (point-max) after-bullet-pos)
                        (error "no body to encrypt"))
                    (allout-encrypted-topic-p)))
-           (was-collapsed (if (not (re-search-forward "[\n\r]" nil t))
+           (was-collapsed (if (not (search-forward "\n" nil t))
                               nil
                             (backward-char 1)
-                            (looking-at "\r")))
+                            (allout-hidden-p)))
            (subtree-beg (1+ (point)))
            (subtree-end (allout-end-of-subtree))
            (subject-text (buffer-substring-no-properties subtree-beg
                                                          subtree-end))
            (subtree-end-char (char-after (1- subtree-end)))
-           (subtree-trailling-char (char-after subtree-end))
-           (place-holder (if (or (string= "" subject-text)
-                                 (string= "\n" subject-text))
-                             (error "No topic contents to %scrypt"
-                                    (if was-encrypted "de" "en"))))
+           (subtree-trailing-char (char-after subtree-end))
+           ;; kluge - result-text needs to be nil, but we also want to
+           ;;         check for the error condition
+           (result-text (if (or (string= "" subject-text)
+                                (string= "\n" subject-text))
+                            (error "No topic contents to %scrypt"
+                                   (if was-encrypted "de" "en"))
+                          nil))
            ;; Assess key parameters:
            (key-info (or
                       ;; detect the type by which it is already encrypted
@@ -4972,8 +4864,7 @@
                       '(symmetric nil)))
            (for-key-type (car key-info))
            (for-key-identity (cadr key-info))
-           (fetch-pass (and fetch-pass (member fetch-pass '(16 (16)))))
-           result-text)
+           (fetch-pass (and fetch-pass (member fetch-pass '(16 (16))))))
 
       (setq result-text
             (allout-encrypt-string subject-text was-encrypted
@@ -4987,12 +4878,12 @@
          (delete-region subtree-beg subtree-end)
          (insert result-text)
          (if was-collapsed
-             (allout-flag-region subtree-beg (1- (point)) ?\r))
-         ;; adjust trailling-blank-lines to preserve topic spacing:
+             (allout-flag-region (1- subtree-beg) (point) t))
+         ;; adjust trailing-blank-lines to preserve topic spacing:
          (if (not was-encrypted)
-             (if (and (member subtree-end-char '(?\r ?\n))
-                      (member subtree-trailling-char '(?\r ?\n)))
-                 (insert subtree-trailling-char)))
+             (if (and (= subtree-end-char ?\n)
+                      (= subtree-trailing-char ?\n))
+                 (insert subtree-trailing-char)))
          ;; Ensure that the item has an encrypted-entry bullet:
          (if (not (string= (buffer-substring-no-properties
                             (1- after-bullet-pos) after-bullet-pos)
@@ -5060,8 +4951,7 @@
                                       target-prompt-id
                                     (or (buffer-file-name allout-buffer)
                                         target-prompt-id))))
-         (comment "Processed by allout driving pgg")
-         work-buffer result result-text status)
+         result-text status)
 
     (if (and fetch-pass (not passphrase))
         ;; Force later fetch by evicting passphrase from the cache.
@@ -5083,7 +4973,7 @@
                                                        retried fetch-pass)))
         (with-temp-buffer
 
-          (insert (subst-char-in-string ?\r ?\n text))
+          (insert text)
 
           (cond
 
@@ -5319,7 +5209,7 @@
   (require 'pgg-parse)
   (save-excursion
     (with-temp-buffer
-      (insert (subst-char-in-string ?\r ?\n text))
+      (insert text)
       (let* ((parsed-armor (pgg-parse-armor-region (point-min) (point-max)))
              (type (if (pgg-gpg-symmetric-key-p parsed-armor)
                        'symmetric
@@ -5442,21 +5332,21 @@
     (while (not done)
 
       (if (not (re-search-forward
-                (format "\\(\\`\\|[\n\r]\\)%s *%s[^*]"
+                (format "\\(\\`\\|\n\\)%s *%s[^*]"
                         (regexp-quote allout-header-prefix)
                         (regexp-quote allout-topic-encryption-bullet))
                 nil t))
           (setq got nil
                 done t)
         (goto-char (setq got (match-beginning 0)))
-        (if (looking-at "[\n\r]")
+        (if (looking-at "\n")
             (forward-char 1))
         (setq got (point)))
 
       (cond ((not got)
              (setq done t))
 
-            ((not (re-search-forward "[\n\r]"))
+            ((not (search-forward "\n"))
              (setq got nil
                    done t))
 
@@ -5498,26 +5388,28 @@
 
   (interactive "p")
   (save-excursion
-    (let ((current-mark (point-marker))
-          was-modified
-          bo-subtree
-          editing-topic editing-point)
+    (let* ((current-mark (point-marker))
+           (current-mark-position (marker-position current-mark))
+           was-modified
+           bo-subtree
+           editing-topic editing-point)
       (goto-char (point-min))
       (while (allout-next-topic-pending-encryption except-mark)
         (setq was-modified (buffer-modified-p))
-        (if (save-excursion
-              (and (boundp 'allout-encrypt-unencrypted-on-saves)
-                   allout-encrypt-unencrypted-on-saves
-                   (setq bo-subtree (re-search-forward "[\n\r]"))
-                   ;; Not collapsed:
-                   (string= (match-string 0) "\n")
-                   (>= current-mark (point))
-                   (allout-end-of-current-subtree)
-                   (<= current-mark (point))))
+        (when (save-excursion
+                (and (boundp 'allout-encrypt-unencrypted-on-saves)
+                     allout-encrypt-unencrypted-on-saves
+                     (setq bo-subtree (re-search-forward "$"))
+                     (not (allout-hidden-p))
+                     (>= current-mark (point))
+                     (allout-end-of-current-subtree)
+                     (<= current-mark (point))))
             (setq editing-topic (point)
                   ;; we had to wait for this 'til now so prior topics are
                   ;; encrypted, any relevant text shifts are in place:
-                  editing-point (marker-position current-mark)))
+                  editing-point (- current-mark-position
+                                   (count-trailing-whitespace-region
+                                    bo-subtree current-mark-position))))
         (allout-toggle-subtree-encryption)
         (if (not was-modified)
             (set-buffer-modified-p nil))
@@ -5579,11 +5471,11 @@
         (setq beg (- (point) 16))
         (setq suffix (buffer-substring-no-properties
                       (point)
-                      (progn (if (re-search-forward "[\n\r]" nil t)
+                      (progn (if (search-forward "\n" nil t)
                                  (forward-char -1))
                              (point))))
         (setq prefix (buffer-substring-no-properties
-                      (progn (if (re-search-backward "[\n\r]" nil t)
+                      (progn (if (search-backward "\n" nil t)
                                  (forward-char 1))
                              (point))
                       beg))
@@ -5639,7 +5531,7 @@
         (allout-show-to-offshoot)
         (if (search-forward (concat "\n" prefix varname ":") nil t)
             (let* ((value-beg (point))
-                   (line-end (progn (if (re-search-forward "[\n\r]" nil t)
+                   (line-end (progn (if (search-forward "\n" nil t)
                                         (forward-char -1))
                                     (point)))
                    (value-end (- line-end (length suffix))))
@@ -5710,26 +5602,29 @@
 		(regexp-sans-escapes (substring regexp 1)))
       ;; Exclude first char, but maintain count:
       (regexp-sans-escapes (substring regexp 1) successive-backslashes))))
-;;;_  - add-hook definition for divergent emacsen
-;;;_   > add-hook (hook function &optional append)
-(if (not (fboundp 'add-hook))
-    (defun add-hook (hook function &optional append)
-      "Add to the value of HOOK the function FUNCTION unless already present.
-\(It becomes the first hook on the list unless optional APPEND is non-nil, in
-which case it becomes the last).  HOOK should be a symbol, and FUNCTION may be
-any valid function.  HOOK's value should be a list of functions, not a single
-function.  If HOOK is void, it is first set to nil."
-      (or (boundp hook) (set hook nil))
-      (or (if (consp function)
-	      ;; Clever way to tell whether a given lambda-expression
-	      ;; is equal to anything in the hook.
-	      (let ((tail (assoc (cdr function) (symbol-value hook))))
-		(equal function tail))
-	    (memq function (symbol-value hook)))
-	  (set hook
-	       (if append
-		   (nconc (symbol-value hook) (list function))
-		 (cons function (symbol-value hook)))))))
+;;;_  > count-trailing-whitespace-region (beg end)
+(defun count-trailing-whitespace-region (beg end)
+  "Return number of trailing whitespace chars between BEG and END.
+
+If BEG is bigger than END we return 0."
+  (if (> beg end)
+      0
+    (save-excursion
+      (goto-char beg)
+      (let ((count 0))
+        (while (re-search-forward "[ 	][ 	]*$" end t)
+          (goto-char (1+ (match-beginning 0)))
+          (setq count (1+ count)))
+        count))))
+;;;_  > allout-mark-marker to accommodate divergent emacsen:
+(defun allout-mark-marker (&optional force buffer)
+  "Accommodate the different signature for `mark-marker' across Emacsen.
+
+XEmacs takes two optional args, while mainline GNU Emacs does not,
+so pass them along when appropriate."
+  (if (featurep 'xemacs)
+      (apply 'mark-marker force buffer)
+    (mark-marker)))
 ;;;_  > subst-char-in-string if necessary
 (if (not (fboundp 'subst-char-in-string))
     (defun subst-char-in-string (fromchar tochar string &optional inplace)
@@ -5742,17 +5637,159 @@
           (if (eq (aref newstr i) fromchar)
               (aset newstr i tochar)))
         newstr)))
-;;;_  : my-mark-marker to accommodate divergent emacsen:
-(defun my-mark-marker (&optional force buffer)
-  "Accommodate the different signature for `mark-marker' across Emacsen.
-
-XEmacs takes two optional args, while mainline GNU Emacs does not,
-so pass them along when appropriate."
-  (if (featurep 'xemacs)
-      (apply 'mark-marker force buffer)
-    (mark-marker)))
-
-;;;_ #10 Under development
+;;;_  > wholenump if necessary
+(if (not (fboundp 'wholenump))
+    (defalias 'wholenump 'natnump))
+;;;_  > remove-overlays if necessary
+(if (not (fboundp 'remove-overlays))
+    (defun remove-overlays (&optional beg end name val)
+      "Clear BEG and END of overlays whose property NAME has value VAL.
+Overlays might be moved and/or split.
+BEG and END default respectively to the beginning and end of buffer."
+      (unless beg (setq beg (point-min)))
+      (unless end (setq end (point-max)))
+      (if (< end beg)
+          (setq beg (prog1 end (setq end beg))))
+      (save-excursion
+        (dolist (o (overlays-in beg end))
+          (when (eq (overlay-get o name) val)
+            ;; Either push this overlay outside beg...end
+            ;; or split it to exclude beg...end
+            ;; or delete it entirely (if it is contained in beg...end).
+            (if (< (overlay-start o) beg)
+                (if (> (overlay-end o) end)
+                    (progn
+                      (move-overlay (copy-overlay o)
+                                    (overlay-start o) beg)
+                      (move-overlay o end (overlay-end o)))
+                  (move-overlay o (overlay-start o) beg))
+              (if (> (overlay-end o) end)
+                  (move-overlay o end (overlay-end o))
+                (delete-overlay o)))))))
+  )
+;;;_  > copy-overlay if necessary - xemacs ~ 21.4
+(if (not (fboundp 'copy-overlay))
+    (defun copy-overlay (o)
+      "Return a copy of overlay O."
+      (let ((o1 (make-overlay (overlay-start o) (overlay-end o)
+                              ;; FIXME: there's no easy way to find the
+                              ;; insertion-type of the two markers.
+                              (overlay-buffer o)))
+            (props (overlay-properties o)))
+        (while props
+          (overlay-put o1 (pop props) (pop props)))
+        o1)))
+;;;_  > add-to-invisibility-spec if necessary - xemacs ~ 21.4
+(if (not (fboundp 'add-to-invisibility-spec))
+    (defun add-to-invisibility-spec (element)
+      "Add ELEMENT to `buffer-invisibility-spec'.
+See documentation for `buffer-invisibility-spec' for the kind of elements
+that can be added."
+      (if (eq buffer-invisibility-spec t)
+          (setq buffer-invisibility-spec (list t)))
+      (setq buffer-invisibility-spec
+            (cons element buffer-invisibility-spec))))
+;;;_  > remove-from-invisibility-spec if necessary - xemacs ~ 21.4
+(if (not (fboundp 'remove-from-invisibility-spec))
+    (defun remove-from-invisibility-spec (element)
+      "Remove ELEMENT from `buffer-invisibility-spec'."
+      (if (consp buffer-invisibility-spec)
+          (setq buffer-invisibility-spec (delete element
+                                                 buffer-invisibility-spec)))))
+;;;_  > move-beginning-of-line if necessary - older emacs, xemacs
+(if (not (fboundp 'move-beginning-of-line))
+    (defun move-beginning-of-line (arg)
+      "Move point to beginning of current line as displayed.
+\(This disregards invisible newlines such as those
+which are part of the text that an image rests on.)
+
+With argument ARG not nil or 1, move forward ARG - 1 lines first.
+If point reaches the beginning or end of buffer, it stops there.
+To ignore intangibility, bind `inhibit-point-motion-hooks' to t.
+
+This function does not move point across a field boundary unless that
+would move point to a different line than the original, unconstrained
+result.  If N is nil or 1, and a front-sticky field starts at point,
+the point does not move.  To ignore field boundaries bind
+`inhibit-field-text-motion' to t."
+      (interactive "p")
+      (or arg (setq arg 1))
+      (if (/= arg 1)
+          (condition-case nil (line-move (1- arg)) (error nil)))
+
+      (let ((orig (point)))
+        ;; 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 (if (featurep 'xemacs)
+                         (previous-property-change (point))
+                       (previous-char-property-change (point))))
+          (skip-chars-backward "^\n"))
+        (vertical-motion 0)
+        (if (/= orig (point))
+            (goto-char (constrain-to-field (point) orig (/= arg 1) t nil)))))
+)
+;;;_  > move-end-of-line if necessary - older emacs, xemacs
+(if (not (fboundp 'move-end-of-line))
+    (defun move-end-of-line (arg)
+      "Move point to end of current line as displayed.
+\(This disregards invisible newlines such as those
+which are part of the text that an image rests on.)
+
+With argument ARG not nil or 1, move forward ARG - 1 lines first.
+If point reaches the beginning or end of buffer, it stops there.
+To ignore intangibility, bind `inhibit-point-motion-hooks' to t.
+
+This function does not move point across a field boundary unless that
+would move point to a different line than the original, unconstrained
+result.  If N is nil or 1, and a rear-sticky field ends at point,
+the point does not move.  To ignore field boundaries bind
+`inhibit-field-text-motion' to t."
+      (interactive "p")
+      (or arg (setq arg 1))
+      (let ((orig (point))
+            done)
+        (while (not done)
+          (let ((newpos
+                 (save-excursion
+                   (let ((goal-column 0))
+                     (and (condition-case nil
+                              (or (line-move arg) t)
+                            (error nil))
+                          (not (bobp))
+                          (progn
+                            (while (and (not (bobp)) (line-move-invisible-p (1- (point))))
+                              (goto-char (previous-char-property-change (point))))
+                            (backward-char 1)))
+                     (point)))))
+            (goto-char newpos)
+            (if (and (> (point) newpos)
+                     (eq (preceding-char) ?\n))
+                (backward-char 1)
+              (if (and (> (point) newpos) (not (eobp))
+                       (not (eq (following-char) ?\n)))
+                  ;; If we skipped something intangible
+                  ;; and now we're not really at eol,
+                  ;; keep going.
+                  (setq arg 1)
+                (setq done t)))))
+        (if (/= orig (point))
+            (goto-char (constrain-to-field (point) orig (/= arg 1) t
+                                           nil)))))
+  )
+;;;_  > line-move-invisible-p if necessary
+(if (not (fboundp 'line-move-invisible-p))
+    (defun line-move-invisible-p (pos)
+      "Return non-nil if the character after POS is currently invisible."
+      (let ((prop
+             (get-char-property pos 'invisible)))
+        (if (eq buffer-invisibility-spec t)
+            prop
+          (or (memq prop buffer-invisibility-spec)
+              (assq prop buffer-invisibility-spec))))))
+
+
+;;;_ #10 Unfinished
 ;;;_  > allout-bullet-isearch (&optional bullet)
 (defun allout-bullet-isearch (&optional bullet)
   "Isearch \(regexp) for topic with bullet BULLET."
@@ -5769,8 +5806,9 @@
 				bullet)))
     (isearch-repeat 'forward)
     (isearch-mode t)))
-;;;_  ? Re hooking up with isearch - use isearch-op-fun rather than
-;;;	wrapping the isearch functions.
+
+;;;_ #11 Provide
+(provide 'allout)
 
 ;;;_* Local emacs vars.
 ;;; The following `allout-layout' local variable setting:
--- a/lisp/buff-menu.el	Wed Feb 22 06:52:00 2006 +0000
+++ b/lisp/buff-menu.el	Wed Feb 22 06:54:10 2006 +0000
@@ -706,9 +706,9 @@
 	 list desired-point)
     (when Buffer-menu-use-header-line
       (let ((pos 0))
-	;; Turn spaces in the header into stretch specs so they work
-	;; regardless of the header-line face.
-	(while (string-match "[ \t]+" header pos)
+	;; Turn whitespace chars in the header into stretch specs so
+	;; they work regardless of the header-line face.
+	(while (string-match "[ \t\n]+" header pos)
 	  (setq pos (match-end 0))
 	  (put-text-property (match-beginning 0) pos 'display
 			     ;; Assume fixed-size chars in the buffer.
@@ -726,6 +726,7 @@
       (erase-buffer)
       (setq standard-output (current-buffer))
       (unless Buffer-menu-use-header-line
+        ;; Use U+2014 (EM DASH) to underline if possible, else U+002D (HYPHEN-MINUS)
 	(let ((underline (if (char-displayable-p ?—) ?— ?-)))
 	  (insert header
 		  (apply 'string
--- a/lisp/calendar/appt.el	Wed Feb 22 06:52:00 2006 +0000
+++ b/lisp/calendar/appt.el	Wed Feb 22 06:54:10 2006 +0000
@@ -78,6 +78,7 @@
 ;; Make sure calendar is loaded when we compile this.
 (require 'calendar)
 
+(defvar diary-selective-display)
 
 ;;;###autoload
 (defcustom appt-issue-message t
--- a/lisp/cus-edit.el	Wed Feb 22 06:52:00 2006 +0000
+++ b/lisp/cus-edit.el	Wed Feb 22 06:54:10 2006 +0000
@@ -932,6 +932,7 @@
 				       "Set customized value for %s to: "
 				       current-prefix-arg))
   (custom-load-symbol variable)
+  (custom-push-theme 'theme-value variable 'user 'set (custom-quote value))
   (funcall (or (get variable 'custom-set) 'set-default) variable value)
   (put variable 'customized-value (list (custom-quote value)))
   (cond ((string= comment "")
@@ -4166,7 +4167,9 @@
       (mapatoms
        (lambda (symbol)
 	 (if (and (get symbol 'saved-value)
-		  (eq 'user (car (car-safe (get symbol 'theme-value)))))
+		  ;; ignore theme values
+		  (or (null (get symbol 'theme-value))
+		      (eq 'user (caar (get symbol 'theme-value)))))
 	     (nconc saved-list (list symbol)))))
       (setq saved-list (sort (cdr saved-list) 'string<))
       (unless (bolp)
--- a/lisp/custom.el	Wed Feb 22 06:52:00 2006 +0000
+++ b/lisp/custom.el	Wed Feb 22 06:54:10 2006 +0000
@@ -653,6 +653,7 @@
 To actually save the value, call `custom-save-all'.
 
 Return non-nil iff the `saved-value' property actually changed."
+  (custom-load-symbol symbol)
   (let* ((get (or (get symbol 'custom-get) 'default-value))
 	 (value (funcall get symbol))
 	 (saved (get symbol 'saved-value))
@@ -681,6 +682,7 @@
 default value.  Otherwise, set it to nil.
 
 Return non-nil iff the `customized-value' property actually changed."
+  (custom-load-symbol symbol)
   (let* ((get (or (get symbol 'custom-get) 'default-value))
 	 (value (funcall get symbol))
 	 (customized (get symbol 'customized-value))
@@ -690,7 +692,9 @@
 	    (not (equal value (condition-case nil
 				  (eval (car old))
 				(error nil)))))
-	(put symbol 'customized-value (list (custom-quote value)))
+	(progn (put symbol 'customized-value (list (custom-quote value)))
+	       (custom-push-theme 'theme-value symbol 'user 'set
+				  (custom-quote value)))
       (put symbol 'customized-value nil))
     ;; Changed?
     (not (equal customized (get symbol 'customized-value)))))
--- a/lisp/ediff-diff.el	Wed Feb 22 06:52:00 2006 +0000
+++ b/lisp/ediff-diff.el	Wed Feb 22 06:54:10 2006 +0000
@@ -26,7 +26,6 @@
 
 ;;; Code:
 
-(provide 'ediff-diff)
 
 ;; compiler pacifier
 (defvar ediff-default-variant)
@@ -129,13 +128,33 @@
 
 (defcustom ediff-diff-options ""
   "*Options to pass to `ediff-diff-program'.
-If Unix diff is used as `ediff-diff-program', then the most useful options are
+If Unix diff is used as `ediff-diff-program', then a useful option is
 `-w', to ignore space, and `-i', to ignore case of letters.
-At present, the option `-c' is not allowed."
+Options `-c' and `-i' are not allowed. Case sensitivity can be toggled
+interactively using [ediff-toggle-ignore-case]"
   :set 'ediff-reset-diff-options
   :type 'string
   :group 'ediff-diff)
 
+(ediff-defvar-local ediff-ignore-case nil
+  "*If t, skip over difference regions that differ only in letter case.
+This variable can be set either in .emacs or toggled interactively.
+Use `setq-default' if setting it in .emacs")
+
+(defcustom ediff-ignore-case-option "-i"
+  "*Option that causes the diff program to ignore case of letters."
+  :type 'string
+  :group 'ediff-diff)
+
+(defcustom ediff-ignore-case-option3 ""
+  "*Option that causes the diff3 program to ignore case of letters.
+GNU diff3 doesn't have such an option."
+  :type 'string
+  :group 'ediff-diff)
+
+;; the actual options used in comparison
+(ediff-defvar-local ediff-actual-diff-options "" "")
+
 (defcustom ediff-custom-diff-program ediff-diff-program
   "*Program to use for generating custom diff output for saving it in a file.
 This output is not used by Ediff internally."
@@ -155,6 +174,10 @@
   :set 'ediff-reset-diff-options
   :type 'string
   :group 'ediff-diff)
+
+;; the actual options used in comparison
+(ediff-defvar-local ediff-actual-diff3-options "" "")
+
 (defcustom ediff-diff3-ok-lines-regexp
   "^\\([1-3]:\\|====\\|  \\|.*Warning *:\\|.*No newline\\|.*missing newline\\|^\C-m$\\)"
   "*Regexp that matches normal output lines from `ediff-diff3-program'.
@@ -182,7 +205,7 @@
 This variable can be set either in .emacs or toggled interactively.
 Use `setq-default' if setting it in .emacs")
 
-(ediff-defvar-local ediff-auto-refine-limit 1400
+(ediff-defvar-local ediff-auto-refine-limit 14000
   "*Auto-refine only the regions of this size \(in bytes\) or less.")
 
 ;;; General
@@ -227,9 +250,9 @@
 ;; ediff-setup-diff-regions-function, which can also have the value
 ;; ediff-setup-diff-regions3, which takes 4 arguments.
 (defun ediff-setup-diff-regions (file-A file-B file-C)
-  ;; looking either for '-c' or a 'c' in a set of clustered non-long options
-  (if (string-match "^-c\\| -c\\|-[^- ]+c" ediff-diff-options)
-      (error "Option `-c' is not allowed in `ediff-diff-options'"))
+  ;; looking for '-c', '-i', or a 'c', 'i' among clustered non-long options
+  (if (string-match "^-[ci]\\| -[ci]\\|-[^- ]+[ci]" ediff-diff-options)
+      (error "Options `-c' and `-i' are not allowed in `ediff-diff-options'"))
 
   ;; create, if it doesn't exist
   (or (ediff-buffer-live-p ediff-diff-buffer)
@@ -266,7 +289,7 @@
 	     (ediff-exec-process ediff-diff-program
 				 diff-buffer
 				 'synchronize
-				 ediff-diff-options file1 file2)
+				 ediff-actual-diff-options file1 file2)
 	     (message "")
 	     (ediff-with-current-buffer diff-buffer
 	       (buffer-size))))))
@@ -284,7 +307,9 @@
   (let (diff3-job diff-program diff-options ok-regexp diff-list)
     (setq diff3-job ediff-3way-job
 	  diff-program (if diff3-job ediff-diff3-program ediff-diff-program)
-	  diff-options (if diff3-job ediff-diff3-options ediff-diff-options)
+	  diff-options (if diff3-job
+			   ediff-actual-diff3-options
+			 ediff-actual-diff-options)
 	  ok-regexp (if diff3-job
 			ediff-diff3-ok-lines-regexp
 			ediff-diff-ok-lines-regexp))
@@ -366,11 +391,14 @@
 	(B-buffer ediff-buffer-B)
 	(C-buffer ediff-buffer-C)
 	(a-prev 1) ; this is needed to set the first diff line correctly
+	(a-prev-pt nil)
 	(b-prev 1)
+	(b-prev-pt nil)
 	(c-prev 1)
+	(c-prev-pt nil)
 	diff-list shift-A shift-B
 	)
-
+    
     ;; diff list contains word numbers, unless changed later
     (setq diff-list (cons (if word-mode 'words 'points)
 			  diff-list))
@@ -382,7 +410,7 @@
 	      shift-B
 	      (ediff-overlay-start
 	       (ediff-get-value-according-to-buffer-type 'B bounds))))
-
+    
     ;; reset point in buffers A/B/C
     (ediff-with-current-buffer A-buffer
       (goto-char (if shift-A shift-A (point-min))))
@@ -466,11 +494,13 @@
 	       ;; we must disable and then restore longlines-mode
 	       (if (eq longlines-mode-val 1)
 		   (longlines-mode 0))
+	       (goto-char (or a-prev-pt shift-A (point-min)))
 	       (forward-line (- a-begin a-prev))
 	       (setq a-begin-pt (point))
 	       (forward-line (- a-end a-begin))
 	       (setq a-end-pt (point)
-		     a-prev a-end)
+		     a-prev a-end
+		     a-prev-pt a-end-pt)
 	       (if (eq longlines-mode-val 1)
 		   (longlines-mode longlines-mode-val))
 	       ))
@@ -479,11 +509,13 @@
 		    (if (and (boundp 'longlines-mode) longlines-mode) 1 0)))
 	       (if (eq longlines-mode-val 1)
 		   (longlines-mode 0))
+	       (goto-char (or b-prev-pt shift-B (point-min)))
 	       (forward-line (- b-begin b-prev))
 	       (setq b-begin-pt (point))
 	       (forward-line (- b-end b-begin))
 	       (setq b-end-pt (point)
-		     b-prev b-end)
+		     b-prev b-end
+		     b-prev-pt b-end-pt)
 	       (if (eq longlines-mode-val 1)
 		   (longlines-mode longlines-mode-val))
 	       ))
@@ -493,11 +525,13 @@
 			(if (and (boundp 'longlines-mode) longlines-mode) 1 0)))
 		   (if (eq longlines-mode-val 1)
 		       (longlines-mode 0))
+		   (goto-char (or c-prev-pt (point-min)))
 		   (forward-line (- c-begin c-prev))
 		   (setq c-begin-pt (point))
 		   (forward-line (- c-end c-begin))
 		   (setq c-end-pt (point)
-			 c-prev c-end)
+			 c-prev c-end
+			 c-prev-pt c-end-pt)
 		   (if (eq longlines-mode-val 1)
 		       (longlines-mode longlines-mode-val))
 		 )))
@@ -987,8 +1021,11 @@
 	(C-buffer ediff-buffer-C)
 	(anc-buffer ediff-ancestor-buffer)
 	(a-prev 1) ; needed to set the first diff line correctly
+	(a-prev-pt nil)
 	(b-prev 1)
+	(b-prev-pt nil)
 	(c-prev 1)
+	(c-prev-pt nil)
 	(anc-prev 1)
 	diff-list shift-A shift-B shift-C
 	)
@@ -1089,11 +1126,13 @@
 		     ;; we must disable and then restore longlines-mode
 		     (if (eq longlines-mode-val 1)
 			 (longlines-mode 0))
+		     (goto-char (or a-prev-pt shift-A (point-min)))
 		     (forward-line (- a-begin a-prev))
 		     (setq a-begin-pt (point))
 		     (forward-line (- a-end a-begin))
 		     (setq a-end-pt (point)
-			   a-prev a-end)
+			   a-prev a-end
+			   a-prev-pt a-end-pt)
 		     (if (eq longlines-mode-val 1)
 			 (longlines-mode longlines-mode-val))
 		     ))
@@ -1102,11 +1141,13 @@
 			  (if (and (boundp 'longlines-mode) longlines-mode) 1 0)))
 		     (if (eq longlines-mode-val 1)
 			 (longlines-mode 0))
+		     (goto-char (or b-prev-pt shift-B (point-min)))
 		     (forward-line (- b-begin b-prev))
 		     (setq b-begin-pt (point))
 		     (forward-line (- b-end b-begin))
 		     (setq b-end-pt (point)
-			   b-prev b-end)
+			   b-prev b-end
+			   b-prev-pt b-end-pt)
 		     (if (eq longlines-mode-val 1)
 			 (longlines-mode longlines-mode-val))
 		     ))
@@ -1115,11 +1156,13 @@
 			  (if (and (boundp 'longlines-mode) longlines-mode) 1 0)))
 		     (if (eq longlines-mode-val 1)
 			 (longlines-mode 0))
+		     (goto-char (or c-prev-pt shift-C (point-min)))
 		     (forward-line (- c-begin c-prev))
 		     (setq c-begin-pt (point))
 		     (forward-line (- c-end c-begin))
 		     (setq c-end-pt (point)
-			   c-prev c-end)
+			   c-prev c-end
+			   c-prev-pt c-end-pt)
 		     (if (eq longlines-mode-val 1)
 			 (longlines-mode longlines-mode-val))
 		     ))
@@ -1171,13 +1214,17 @@
 ;; File-C is either the third file to compare (in case of 3-way comparison)
 ;; or it is the ancestor file.
 (defun ediff-setup-diff-regions3 (file-A file-B file-C)
+  ;; looking for '-i' or a 'i' among clustered non-long options
+  (if (string-match "^-i\\| -i\\|-[^- ]+i" ediff-diff-options)
+      (error "Option `-i' is not allowed in `ediff-diff3-options'"))
+
   (or (ediff-buffer-live-p ediff-diff-buffer)
       (setq ediff-diff-buffer
 	    (get-buffer-create (ediff-unique-buffer-name "*ediff-diff" "*"))))
 
   (message "Computing differences ...")
   (ediff-exec-process ediff-diff3-program ediff-diff-buffer 'synchronize
-		      ediff-diff3-options file-A file-B file-C)
+		      ediff-actual-diff3-options file-A file-B file-C)
 
   (ediff-prepare-error-list ediff-diff3-ok-lines-regexp ediff-diff-buffer)
   ;;(message "Computing differences ... done")
@@ -1471,6 +1518,35 @@
       (setq file-list-list (cdr file-list-list)))
     (reverse result)))
 
+;; Ignore case handling - some ideas from drew.adams@@oracle.com
+(defun ediff-toggle-ignore-case ()
+  (interactive)
+  (ediff-barf-if-not-control-buffer)
+  (setq ediff-ignore-case (not ediff-ignore-case))
+  (cond (ediff-ignore-case
+	 (setq ediff-actual-diff-options 
+	       (concat ediff-diff-options " " ediff-ignore-case-option)
+	       ediff-actual-diff3-options
+	       (concat ediff-diff3-options " " ediff-ignore-case-option3))
+	 (message "Ignoring regions that differ only in case"))
+	(t
+	 (setq ediff-actual-diff-options ediff-diff-options
+	       ediff-actual-diff3-options ediff-diff3-options)
+	 (message "Ignoring case differences turned OFF")))
+  (cond (ediff-merge-job
+	 (message "Ignoring letter case is too dangerous in merge jobs"))
+	((and ediff-diff3-job (string= ediff-ignore-case-option3 ""))
+	 (message "Ignoring letter case is not supported by this diff3 program"))
+	((and (not ediff-3way-job) (string= ediff-ignore-case-option ""))
+	 (message "Ignoring letter case is not supported by this diff program"))
+	(t
+	 (sit-for 1)
+	 (ediff-update-diffs)))
+  )
+
+
+(provide 'ediff-diff)
+
 
 ;;; Local Variables:
 ;;; eval: (put 'ediff-defvar-local 'lisp-indent-hook 'defun)
--- a/lisp/ediff-help.el	Wed Feb 22 06:52:00 2006 +0000
+++ b/lisp/ediff-help.el	Wed Feb 22 06:54:10 2006 +0000
@@ -26,7 +26,6 @@
 
 ;;; Code:
 
-(provide 'ediff-help)
 
 ;; Compiler pacifier start
 (defvar ediff-multiframe)
@@ -61,8 +60,8 @@
 p,DEL -previous diff |     | -vert/horiz split   | xy -copy buf X's region to Y
 n,SPC -next diff     |     h -hilighting         | rx -restore buf X's old diff
     j -jump to diff  |     @ -auto-refinement    |  * -refine current region
-   gx -goto X's point|                           |  ! -update diff regions
-  C-l -recenter      |    ## -ignore whitespace  |
+   gx -goto X's point|    ## -ignore whitespace  |  ! -update diff regions
+  C-l -recenter      |    #c -ignore case        |
   v/V -scroll up/dn  | #f/#h -focus/hide regions | wx -save buf X
   </> -scroll lt/rt  |     X -read-only in buf X | wd -save diff output
     ~ -rotate buffers|     m -wide display       |
@@ -75,8 +74,8 @@
 p,DEL -previous diff |     | -vert/horiz split   |a/b -copy A/B's region to B/A
 n,SPC -next diff     |     h -hilighting         | rx -restore buf X's old diff
     j -jump to diff  |     @ -auto-refinement    |  * -refine current region
-   gx -goto X's point|                           |  ! -update diff regions
-  C-l -recenter      |    ## -ignore whitespace  |
+   gx -goto X's point|    ## -ignore whitespace  |  ! -update diff regions
+  C-l -recenter      |    #c -ignore case        |
   v/V -scroll up/dn  | #f/#h -focus/hide regions | wx -save buf X
   </> -scroll lt/rt  |     X -read-only in buf X | wd -save diff output
     ~ -swap variants |     m -wide display       |
@@ -89,8 +88,8 @@
 p,DEL -previous diff |     | -vert/horiz split   |a/b -copy A/B's region to B/A
 n,SPC -next diff     |     h -hilighting         | rx -restore buf X's old diff
     j -jump to diff  |     @ -auto-refinement    |  * -refine current region
-   gx -goto X's point|     % -narrow/widen buffs |  ! -update diff regions
-  C-l -recenter      |    ## -ignore whitespace  |
+   gx -goto X's point|    ## -ignore whitespace  |  ! -update diff regions
+  C-l -recenter      |    #c -ignore case        |  % -narrow/widen buffs 
   v/V -scroll up/dn  | #f/#h -focus/hide regions | wx -save buf X
   </> -scroll lt/rt  |     X -read-only in buf X | wd -save diff output
     ~ -swap variants |     m -wide display       |
@@ -103,8 +102,8 @@
 p,DEL -previous diff |     | -vert/horiz split   | xy -copy buf X's region to Y
 n,SPC -next diff     |     h -hilighting         | rx -restore buf X's old diff
     j -jump to diff  |                           |
-   gx -goto X's point|     % -narrow/widen buffs |  ! -recompute diffs
-  C-l -recenter      |                           |
+   gx -goto X's point|    % -narrow/widen buffs  |  ! -recompute diffs
+  C-l -recenter      |    #c -ignore case        |
   v/V -scroll up/dn  | #f/#h -focus/hide regions | wx -save buf X
   </> -scroll lt/rt  |     X -read-only in buf X | wd -save diff output
     ~ -swap variants |     m -wide display       |
@@ -228,6 +227,7 @@
 	    ((string= cmd "r") (re-search-forward "^`r'"))
 	    ((string= cmd "rx") (re-search-forward "^`ra'"))
 	    ((string= cmd "##") (re-search-forward "^`##'"))
+	    ((string= cmd "#c") (re-search-forward "^`#c'"))
 	    ((string= cmd "#f/#h") (re-search-forward "^`#f'"))
 	    ((string= cmd "X") (re-search-forward "^`A'"))
 	    ((string= cmd "v/V") (re-search-forward "^`v'"))
@@ -325,5 +325,8 @@
   (customize-group "ediff"))
 
 
+(provide 'ediff-help)
+
+
 ;;; arch-tag: 05659813-7fcf-4274-964f-d2f577431a9d
 ;;; ediff-help.el ends here
--- a/lisp/ediff-hook.el	Wed Feb 22 06:52:00 2006 +0000
+++ b/lisp/ediff-hook.el	Wed Feb 22 06:54:10 2006 +0000
@@ -371,5 +371,6 @@
 
 (provide 'ediff-hook)
 
+
 ;;; arch-tag: 512f8656-8a4b-4789-af5d-5c6144498df3
 ;;; ediff-hook.el ends here
--- a/lisp/ediff-init.el	Wed Feb 22 06:52:00 2006 +0000
+++ b/lisp/ediff-init.el	Wed Feb 22 06:54:10 2006 +0000
@@ -1867,6 +1867,7 @@
 	     (set-buffer ,old-buffer)
 	     (set-syntax-table ,old-table)))))))
 
+
 (provide 'ediff-init)
 
 
--- a/lisp/ediff-merg.el	Wed Feb 22 06:52:00 2006 +0000
+++ b/lisp/ediff-merg.el	Wed Feb 22 06:54:10 2006 +0000
@@ -26,7 +26,6 @@
 
 ;;; Code:
 
-(provide 'ediff-merg)
 
 ;; compiler pacifier
 (defvar ediff-window-A)
@@ -390,6 +389,9 @@
 	)))
 
 
+(provide 'ediff-merg)
+
+
 ;;; Local Variables:
 ;;; eval: (put 'ediff-defvar-local 'lisp-indent-hook 'defun)
 ;;; eval: (put 'ediff-with-current-buffer 'lisp-indent-hook 1)
--- a/lisp/ediff-mult.el	Wed Feb 22 06:52:00 2006 +0000
+++ b/lisp/ediff-mult.el	Wed Feb 22 06:54:10 2006 +0000
@@ -104,7 +104,6 @@
 
 ;;; Code:
 
-(provide 'ediff-mult)
 
 (defgroup ediff-mult nil
   "Multi-file and multi-buffer processing in Ediff."
@@ -123,7 +122,6 @@
 ;; end pacifier
 
 (require 'ediff-init)
-(require 'ediff-util)
 
 ;; meta-buffer
 (ediff-defvar-local ediff-meta-buffer nil "")
@@ -1473,6 +1471,7 @@
       (ediff-overlay-put overl 'highlight t))
     (ediff-overlay-put overl 'ediff-meta-info prop)
     (ediff-overlay-put overl 'invisible hidden)
+    (ediff-overlay-put overl 'follow-link t)
     (if (numberp session-number)
 	(ediff-overlay-put overl 'ediff-meta-session-number session-number))))
 
@@ -2384,6 +2383,8 @@
     ))
 
 
+(provide 'ediff-mult)
+
 
 ;;; Local Variables:
 ;;; eval: (put 'ediff-defvar-local 'lisp-indent-hook 'defun)
--- a/lisp/ediff-ptch.el	Wed Feb 22 06:52:00 2006 +0000
+++ b/lisp/ediff-ptch.el	Wed Feb 22 06:54:10 2006 +0000
@@ -26,7 +26,6 @@
 
 ;;; Code:
 
-(provide 'ediff-ptch)
 
 (defgroup ediff-ptch nil
   "Ediff patch support."
@@ -844,6 +843,8 @@
 
 
 
+(provide 'ediff-ptch)
+
 
 ;;; Local Variables:
 ;;; eval: (put 'ediff-defvar-local 'lisp-indent-hook 'defun)
--- a/lisp/ediff-util.el	Wed Feb 22 06:52:00 2006 +0000
+++ b/lisp/ediff-util.el	Wed Feb 22 06:54:10 2006 +0000
@@ -26,7 +26,6 @@
 
 ;;; Code:
 
-(provide 'ediff-util)
 
 ;; Compiler pacifier
 (defvar ediff-patch-diagnostics)
@@ -49,6 +48,7 @@
 
 (eval-when-compile
   (let ((load-path (cons (expand-file-name ".") load-path)))
+    (provide 'ediff-util) ; to break recursive load cycle
     (or (featurep 'ediff-init)
 	(load "ediff-init.el" nil nil 'nosuffix))
     (or (featurep 'ediff-help)
@@ -234,6 +234,7 @@
   (define-key ediff-mode-map "#"  nil)
   (define-key ediff-mode-map "#h"  'ediff-toggle-regexp-match)
   (define-key ediff-mode-map "#f"  'ediff-toggle-regexp-match)
+  (define-key ediff-mode-map "#c"  'ediff-toggle-ignore-case)
   (or ediff-word-mode
       (define-key ediff-mode-map "##"  'ediff-toggle-skip-similar))
   (define-key ediff-mode-map "o"   nil)
@@ -1133,7 +1134,7 @@
 ;;       ))
 
 
-(defsubst ediff-file-checked-out-p (file)
+(defun ediff-file-checked-out-p (file)
   (or (not (featurep 'vc-hooks))
       (and (vc-backend file)
 	   (if (fboundp 'vc-state)
@@ -1143,7 +1144,7 @@
 	     (vc-locking-user file))
 	   )))
 
-(defsubst ediff-file-checked-in-p (file)
+(defun ediff-file-checked-in-p (file)
   (and (featurep 'vc-hooks)
        ;; CVS files are considered not checked in
        (not (memq (vc-backend file) '(nil CVS)))
@@ -3079,7 +3080,7 @@
 	)))
 
 
-(defsubst ediff-highlight-diff (n)
+(defun ediff-highlight-diff (n)
   "Put face on diff N.  Invoked for X displays only."
   (ediff-highlight-diff-in-one-buffer n 'A)
   (ediff-highlight-diff-in-one-buffer n 'B)
@@ -3088,7 +3089,7 @@
   )
 
 
-(defsubst ediff-unhighlight-diff ()
+(defun ediff-unhighlight-diff ()
   "Remove overlays from buffers A, B, and C."
   (ediff-unhighlight-diff-in-one-buffer 'A)
   (ediff-unhighlight-diff-in-one-buffer 'B)
@@ -3097,7 +3098,7 @@
   )
 
 ;; delete highlighting overlays, restore faces to their original form
-(defsubst ediff-unhighlight-diffs-totally ()
+(defun ediff-unhighlight-diffs-totally ()
   (ediff-unhighlight-diffs-totally-in-one-buffer 'A)
   (ediff-unhighlight-diffs-totally-in-one-buffer 'B)
   (ediff-unhighlight-diffs-totally-in-one-buffer 'C)
@@ -3686,7 +3687,7 @@
 	    (>= (point) end))))))
 
 
-(defsubst ediff-get-region-contents (n buf-type ctrl-buf &optional start end)
+(defun ediff-get-region-contents (n buf-type ctrl-buf &optional start end)
   (ediff-with-current-buffer
       (ediff-with-current-buffer ctrl-buf (ediff-get-buffer buf-type))
     (buffer-substring
@@ -3945,6 +3946,7 @@
 	(ediff-device-type (ediff-device-type))
 	varlist salutation buffer-name)
     (setq varlist '(ediff-diff-program ediff-diff-options
+                    ediff-diff3-program ediff-diff3-options
 		    ediff-patch-program ediff-patch-options
 		    ediff-shell
 		    ediff-use-faces
@@ -4300,6 +4302,8 @@
 
 (run-hooks 'ediff-load-hook)
 
+(provide 'ediff-util)
+
 
 ;;; Local Variables:
 ;;; eval: (put 'ediff-defvar-local 'lisp-indent-hook 'defun)
--- a/lisp/ediff-vers.el	Wed Feb 22 06:52:00 2006 +0000
+++ b/lisp/ediff-vers.el	Wed Feb 22 06:54:10 2006 +0000
@@ -311,6 +311,7 @@
 
 (provide 'ediff-vers)
 
+
 ;;; Local Variables:
 ;;; eval: (put 'ediff-defvar-local 'lisp-indent-hook 'defun)
 ;;; eval: (put 'ediff-with-current-buffer 'lisp-indent-hook 1)
--- a/lisp/ediff-wind.el	Wed Feb 22 06:52:00 2006 +0000
+++ b/lisp/ediff-wind.el	Wed Feb 22 06:54:10 2006 +0000
@@ -26,7 +26,6 @@
 
 ;;; Code:
 
-(provide 'ediff-wind)
 
 ;; Compiler pacifier
 (defvar icon-title-format)
@@ -1314,6 +1313,9 @@
 			     ediff-wide-display-p)))))))
 
 
+(provide 'ediff-wind)
+
+
 ;;; Local Variables:
 ;;; eval: (put 'ediff-defvar-local 'lisp-indent-hook 'defun)
 ;;; eval: (put 'ediff-with-current-buffer 'lisp-indent-hook 1)
--- a/lisp/ediff.el	Wed Feb 22 06:52:00 2006 +0000
+++ b/lisp/ediff.el	Wed Feb 22 06:54:10 2006 +0000
@@ -7,8 +7,8 @@
 ;; Created: February 2, 1994
 ;; Keywords: comparing, merging, patching, tools, unix
 
-(defconst ediff-version "2.80.1" "The current version of Ediff")
-(defconst ediff-date "November 25, 2005" "Date of last update")
+(defconst ediff-version "2.81" "The current version of Ediff")
+(defconst ediff-date "February 18, 2006" "Date of last update")
 
 
 ;; This file is part of GNU Emacs.
@@ -107,7 +107,6 @@
 
 ;;; Code:
 
-(provide 'ediff)
 
 ;; Compiler pacifier
 (defvar cvs-cookie-handle)
@@ -121,6 +120,7 @@
 	 (load "pcl-cvs" 'noerror)))
 (eval-when-compile
   (let ((load-path (cons (expand-file-name ".") load-path)))
+    (provide 'ediff) ; to break recursive load cycle
     (or (featurep 'ediff-init)
 	(load "ediff-init.el" nil nil 'nosuffix))
     (or (featurep 'ediff-mult)
@@ -1374,7 +1374,7 @@
    patch-buf
    (read-buffer
     "Which buffer to patch? "
-    (current-buffer))))
+    (ediff-other-buffer patch-buf))))
 
 
 ;;;###autoload
@@ -1533,6 +1533,9 @@
 
 (run-hooks 'ediff-load-hook)
 
+(provide 'ediff)
+
+
 ;;; Local Variables:
 ;;; eval: (put 'ediff-defvar-local 'lisp-indent-hook 'defun)
 ;;; eval: (put 'ediff-with-current-buffer 'lisp-indent-hook 1)
--- a/lisp/emacs-lisp/unsafep.el	Wed Feb 22 06:52:00 2006 +0000
+++ b/lisp/emacs-lisp/unsafep.el	Wed Feb 22 06:54:10 2006 +0000
@@ -148,10 +148,10 @@
        ((eq fun 'lambda)
 	;;First arg is temporary bindings
 	(mapc #'(lambda (x)
-		  (let ((y (unsafep-variable x t)))
-		    (if y (throw 'unsafep y)))
 		  (or (memq x '(&optional &rest))
-		      (push x unsafep-vars)))
+		      (let ((y (unsafep-variable x t)))
+			(if y (throw 'unsafep y))
+			(push x unsafep-vars))))
 	      (cadr form))
 	(unsafep-progn (cddr form)))
        ((eq fun 'let)
@@ -247,17 +247,16 @@
     (if reason (throw 'unsafep reason))
     sym))
 
-(defun unsafep-variable (sym global-okay)
-  "Return nil if SYM is safe as a let-binding sym
-\(because it already has a temporary binding or is a non-risky buffer-local
-variable), otherwise a reason why it is unsafe.  Failing to be locally bound
-is okay if GLOBAL-OKAY is non-nil."
+(defun unsafep-variable (sym to-bind)
+  "Return nil if SYM is safe to set or bind, or a reason why not.
+If TO-BIND is nil, check whether SYM is safe to set.
+If TO-BIND is t, check whether SYM is safe to bind."
   (cond
    ((not (symbolp sym))
     `(variable ,sym))
    ((risky-local-variable-p sym nil)
     `(risky-local-variable ,sym))
-   ((not (or global-okay
+   ((not (or to-bind
 	     (memq sym unsafep-vars)
 	     (local-variable-p sym)))
     `(global-variable ,sym))))
--- a/lisp/emulation/viper-cmd.el	Wed Feb 22 06:52:00 2006 +0000
+++ b/lisp/emulation/viper-cmd.el	Wed Feb 22 06:54:10 2006 +0000
@@ -196,6 +196,15 @@
 	    (viper-save-cursor-color 'before-insert-mode))
 	;; set insert mode cursor color
 	(viper-change-cursor-color viper-insert-state-cursor-color)))
+  (if (eq viper-current-state 'emacs-state)
+      (let ((has-saved-cursor-color-in-emacs-mode
+	     (stringp (viper-get-saved-cursor-color-in-emacs-mode))))
+	(or has-saved-cursor-color-in-emacs-mode
+	    (string= (viper-get-cursor-color) viper-emacs-state-cursor-color)
+	    ;; save current color, if not already saved
+	    (viper-save-cursor-color 'before-emacs-mode))
+	;; set emacs mode cursor color
+	(viper-change-cursor-color viper-emacs-state-cursor-color)))
 
   (if (and (memq this-command '(dabbrev-expand hippie-expand))
 	   (integerp viper-pre-command-point)
@@ -643,10 +652,13 @@
 	(indent-to-left-margin))
     (viper-add-newline-at-eob-if-necessary)
     (viper-adjust-undo)
+
+    (if (eq viper-current-state 'emacs-state)
+	(viper-restore-cursor-color 'after-emacs-mode)
+      (viper-restore-cursor-color 'after-insert-mode))
+
     (viper-change-state 'vi-state)
 
-    (viper-restore-cursor-color 'after-insert-mode)
-
     ;; Protect against user errors in hooks
     (condition-case conds
 	(run-hooks 'viper-vi-state-hook)
@@ -709,9 +721,17 @@
   (or (viper-overlay-p viper-replace-overlay)
       (viper-set-replace-overlay (point-min) (point-min)))
   (viper-hide-replace-overlay)
+
+  (let ((has-saved-cursor-color-in-emacs-mode
+	 (stringp (viper-get-saved-cursor-color-in-emacs-mode))))
+    (or has-saved-cursor-color-in-emacs-mode
+	(string= (viper-get-cursor-color) viper-emacs-state-cursor-color)
+	(viper-save-cursor-color 'before-emacs-mode))
+    (viper-change-cursor-color viper-emacs-state-cursor-color))
+
   (viper-change-state 'emacs-state)
 
-  ;; Protect agains user errors in hooks
+  ;; Protect against user errors in hooks
   (condition-case conds
       (run-hooks 'viper-emacs-state-hook)
     (error
@@ -820,12 +840,12 @@
 		 ;; The next cmd  and viper-set-unread-command-events
 		 ;; are intended to prevent the input method
 		 ;; from swallowing ^M, ^Q and other special characters
-		 (setq ch (read-char))
+		 (setq ch (read-char-exclusive))
 		 ;; replace ^M with the newline
 		 (if (eq ch ?\C-m) (setq ch ?\n))
 		 ;; Make sure ^V and ^Q work as quotation chars
 		 (if (memq ch '(?\C-v ?\C-q))
-		     (setq ch (read-char)))
+		     (setq ch (read-char-exclusive)))
 		 (viper-set-unread-command-events ch)
 		 (quail-input-method nil)
 
@@ -842,12 +862,12 @@
 	       ;; same as above but for XEmacs, which doesn't have
 	       ;; quail-input-method
 	       (let (unread-command-events)
-		 (setq ch (read-char))
+		 (setq ch (read-char-exclusive))
 		 ;; replace ^M with the newline
 		 (if (eq ch ?\C-m) (setq ch ?\n))
 		 ;; Make sure ^V and ^Q work as quotation chars
 		 (if (memq ch '(?\C-v ?\C-q))
-		     (setq ch (read-char)))
+		     (setq ch (read-char-exclusive)))
 		 (viper-set-unread-command-events ch)
 		 (quail-start-translation nil)
 
@@ -867,12 +887,12 @@
 		   (setq ch (aref (read-key-sequence nil) 0)))
 	       (insert ch))
 	      (t
-	       (setq ch (read-char))
+	       (setq ch (read-char-exclusive))
 	       ;; replace ^M with the newline
 	       (if (eq ch ?\C-m) (setq ch ?\n))
 	       ;; Make sure ^V and ^Q work as quotation chars
 	       (if (memq ch '(?\C-v ?\C-q))
-		   (setq ch (read-char)))
+		   (setq ch (read-char-exclusive)))
 	       (insert ch))
 	      )
 	(setq last-command-event
@@ -2131,7 +2151,7 @@
 Remove this function from `viper-minibuffer-exit-hook', if this causes
 problems."
   (if (viper-is-in-minibuffer)
-      (progn
+      (let ((inhibit-field-text-motion t))
 	(goto-char (viper-minibuffer-real-start))
 	(end-of-line)
 	(delete-region (point) (point-max)))))
--- a/lisp/emulation/viper-init.el	Wed Feb 22 06:52:00 2006 +0000
+++ b/lisp/emulation/viper-init.el	Wed Feb 22 06:54:10 2006 +0000
@@ -434,6 +434,13 @@
 (if (fboundp 'make-variable-frame-local)
     (make-variable-frame-local 'viper-insert-state-cursor-color))
 
+(defcustom viper-emacs-state-cursor-color "Magenta"
+  "Cursor color when Viper is in emacs state."
+  :type 'string
+  :group 'viper)
+(if (fboundp 'make-variable-frame-local)
+    (make-variable-frame-local 'viper-emacs-state-cursor-color))
+
 ;; internal var, used to remember the default cursor color of emacs frames
 (defvar viper-vi-state-cursor-color nil)
 (if (fboundp 'make-variable-frame-local)
--- a/lisp/emulation/viper-util.el	Wed Feb 22 06:52:00 2006 +0000
+++ b/lisp/emulation/viper-util.el	Wed Feb 22 06:54:10 2006 +0000
@@ -175,9 +175,12 @@
 	     (selected-frame)
 	     (list
 	      (cons
-	       (if (eq before-which-mode 'before-replace-mode)
-		   'viper-saved-cursor-color-in-replace-mode
-		 'viper-saved-cursor-color-in-insert-mode)
+	       (cond ((eq before-which-mode 'before-replace-mode)
+		      'viper-saved-cursor-color-in-replace-mode)
+		     ((eq before-which-mode 'before-emacs-mode)
+		      'viper-saved-cursor-color-in-emacs-mode)
+		     (t
+		      'viper-saved-cursor-color-in-insert-mode))
 	       color)))
 	  ))))
 
@@ -188,7 +191,9 @@
     (if viper-emacs-p 'frame-parameter 'frame-property)
     (selected-frame)
     'viper-saved-cursor-color-in-replace-mode)
-   viper-vi-state-cursor-color))
+   (if (eq viper-current-state 'emacs-mode)
+       viper-emacs-state-cursor-color
+     viper-vi-state-cursor-color)))
 
 (defsubst viper-get-saved-cursor-color-in-insert-mode ()
   (or
@@ -196,15 +201,27 @@
     (if viper-emacs-p 'frame-parameter 'frame-property)
     (selected-frame)
     'viper-saved-cursor-color-in-insert-mode)
+   (if (eq viper-current-state 'emacs-mode)
+       viper-emacs-state-cursor-color
+     viper-vi-state-cursor-color)))
+
+(defsubst viper-get-saved-cursor-color-in-emacs-mode ()
+  (or
+   (funcall
+    (if viper-emacs-p 'frame-parameter 'frame-property)
+    (selected-frame)
+    'viper-saved-cursor-color-in-emacs-mode)
    viper-vi-state-cursor-color))
 
 ;; restore cursor color from replace overlay
 (defun viper-restore-cursor-color(after-which-mode)
   (if (viper-overlay-p viper-replace-overlay)
       (viper-change-cursor-color
-       (if (eq after-which-mode 'after-replace-mode)
-	   (viper-get-saved-cursor-color-in-replace-mode)
-	 (viper-get-saved-cursor-color-in-insert-mode))
+       (cond ((eq after-which-mode 'after-replace-mode)
+	      (viper-get-saved-cursor-color-in-replace-mode))
+	     ((eq after-which-mode 'after-emacs-mode)
+	      (viper-get-saved-cursor-color-in-emacs-mode))
+	     (t (viper-get-saved-cursor-color-in-insert-mode)))
        )))
 
 
--- a/lisp/emulation/viper.el	Wed Feb 22 06:52:00 2006 +0000
+++ b/lisp/emulation/viper.el	Wed Feb 22 06:54:10 2006 +0000
@@ -9,7 +9,7 @@
 ;; Author: Michael Kifer <kifer@cs.stonybrook.edu>
 ;; Keywords: emulations
 
-(defconst viper-version "3.11.5 of November 25, 2005"
+(defconst viper-version "3.12 of February 18, 2006"
   "The current version of Viper")
 
 ;; This file is part of GNU Emacs.
--- a/lisp/erc/ChangeLog	Wed Feb 22 06:52:00 2006 +0000
+++ b/lisp/erc/ChangeLog	Wed Feb 22 06:54:10 2006 +0000
@@ -1,5 +1,21 @@
+2006-02-19  Michael Olson  <mwolson@gnu.org>
+
+	* erc-capab.el (erc-capab-send-identify-messages): Make sure some
+	parameters are strings before using them.  Thanks to Alejandro
+	Benitez for the report.
+
+	* erc.el (erc-version-string): Release ERC 5.1.2.
+
+2006-02-19  Diane Murray  <disumu@x3y2z1.net>
+
+	* erc-button.el (erc-button-keymap): Bind `erc-button-previous' to
+	<C-tab>.
+	(erc-button-previous): New function.
+
 2006-02-15  Michael Olson  <mwolson@gnu.org>
 
+	* NEWS: Add category for ERC 5.2.
+
 	* erc.el (erc): Move to the end of the buffer when a continued
 	session is detected.  Thanks to e1f and indio for the report and
 	testing a potential fix.
@@ -150,7 +166,7 @@
 	* erc-stamp.el: Use new arch tagline, since the other one wasn't
 	being treated properly.
 
-	* erc.el (erc-version-string): Release ERC 5.1.1
+	* erc.el (erc-version-string): Release ERC 5.1.1.
 
 2006-02-03  Zhang Wei  <id.brep@gmail.com>  (tiny change)
 
--- a/lisp/erc/erc-button.el	Wed Feb 22 06:52:00 2006 +0000
+++ b/lisp/erc/erc-button.el	Wed Feb 22 06:54:10 2006 +0000
@@ -216,6 +216,7 @@
         (define-key map (kbd "<button2>") 'erc-button-click-button)
       (define-key map (kbd "<mouse-2>") 'erc-button-click-button))
     (define-key map (kbd "TAB") 'erc-button-next)
+    (define-key map (kbd "<C-tab>") 'erc-button-previous)
     (set-keymap-parent map erc-mode-map)
     map)
   "Local keymap for ERC buttons.")
@@ -427,6 +428,22 @@
         (error "No next button"))
       t)))
 
+(defun erc-button-previous ()
+  "Go to the previous button in this buffer."
+  (interactive)
+  (let ((here (point)))
+    (when (< here (erc-beg-of-input-line))
+      (while (and (get-text-property here 'erc-callback)
+                  (not (= here (point-min))))
+        (setq here (1- here)))
+      (while (and (not (get-text-property here 'erc-callback))
+                  (not (= here (point-min))))
+        (setq here (1- here)))
+      (if (> here (point-min))
+          (goto-char here)
+        (error "No previous button"))
+      t)))
+
 (defun erc-browse-emacswiki (thing)
   "Browse to thing in the emacs-wiki."
   (browse-url (concat erc-emacswiki-url thing)))
--- a/lisp/erc/erc.el	Wed Feb 22 06:52:00 2006 +0000
+++ b/lisp/erc/erc.el	Wed Feb 22 06:54:10 2006 +0000
@@ -66,7 +66,7 @@
 
 ;;; Code:
 
-(defconst erc-version-string "Version 5.1.1"
+(defconst erc-version-string "Version 5.1.2"
   "ERC version.  This is used by function `erc-version'.")
 
 (eval-when-compile (require 'cl))
--- a/lisp/ffap.el	Wed Feb 22 06:52:00 2006 +0000
+++ b/lisp/ffap.el	Wed Feb 22 06:54:10 2006 +0000
@@ -1255,7 +1255,8 @@
 		    (abbreviate-file-name (expand-file-name guess))
 		    ))
 	  (setq dir (file-name-directory guess))))
-    (let ((minibuffer-completing-file-name t))
+    (let ((minibuffer-completing-file-name t)
+	  (completion-ignore-case read-file-name-completion-ignore-case))
       (setq guess
 	    (completing-read
 	     prompt
@@ -1321,6 +1322,12 @@
 (defvar ffap-highlight t
   "If non-nil, ffap highlights the current buffer substring.")
 
+(defface ffap
+  '((t :inherit highlight))
+  "Face used to highlight the current buffer substring."
+  :group 'ffap
+  :version "22.1")
+
 (defvar ffap-highlight-overlay nil
   "Overlay used by `ffap-highlight'.")
 
@@ -1344,8 +1351,7 @@
    (t
     (setq ffap-highlight-overlay
 	  (apply 'make-overlay ffap-string-at-point-region))
-    (overlay-put ffap-highlight-overlay 'face
-		      (if (facep 'ffap) 'ffap 'highlight)))))
+    (overlay-put ffap-highlight-overlay 'face 'ffap))))
 
 
 ;;; Main Entrance (`find-file-at-point' == `ffap'):
--- a/lisp/files.el	Wed Feb 22 06:52:00 2006 +0000
+++ b/lisp/files.el	Wed Feb 22 06:54:10 2006 +0000
@@ -447,10 +447,11 @@
 The value can be t, nil or something else.
 
 A value of t means file local variables specifications are obeyed
-if all the specified variables are safe.  If any variables are
-not safe, you will be queries before setting them.
-A value of nil means file local variables are ignored.
-Any other value means to always query.
+if all the specified variable values are safe; if any values are
+not safe, Emacs queries you, once, whether to set them all.
+
+A value of nil means always ignore the file local variables.
+Any other value means always query you once whether to set them all.
 
 This variable also controls use of major modes specified in
 a -*- line.
@@ -2218,6 +2219,129 @@
        (setq end (point))
        (goto-char beg)
        end))))
+
+;;; Handling file local variables
+
+(defvar ignored-local-variables
+  '(ignored-local-variables safe-local-variable-values)
+  "Variables to be ignored in a file's local variable spec.")
+
+(defvar hack-local-variables-hook nil
+  "Normal hook run after processing a file's local variables specs.
+Major modes can use this to examine user-specified local variables
+in order to initialize other data structure based on them.")
+
+(defcustom safe-local-variable-values nil
+  "List variable-value pairs that are considered safe.
+Each element is a cons cell (VAR . VAL), where VAR is a variable
+symbol and VAL is a value that is considered safe."
+  :group 'find-file
+  :type  'alist)
+
+(defcustom safe-local-eval-forms nil
+  "*Expressions that are considered safe in an `eval:' local variable.
+Add expressions to this list if you want Emacs to evaluate them, when
+they appear in an `eval' local variable specification, without first
+asking you for confirmation."
+  :group 'find-file
+  :version "22.1"
+  :type '(repeat sexp))
+
+;; Risky local variables:
+(mapc (lambda (var) (put var 'risky-local-variable t))
+      '(after-load-alist
+	auto-mode-alist
+	buffer-auto-save-file-name
+	buffer-file-name
+	buffer-file-truename
+	buffer-undo-list
+	dabbrev-case-fold-search
+	dabbrev-case-replace
+	debugger
+	default-text-properties
+	display-time-string
+	enable-local-eval
+	eval
+	exec-directory
+	exec-path
+	file-name-handler-alist
+	font-lock-defaults
+	format-alist
+	frame-title-format
+	global-mode-string
+	header-line-format
+	icon-title-format
+	ignored-local-variables
+	imenu--index-alist
+	imenu-generic-expression
+	inhibit-quit
+	input-method-alist
+	load-path
+	max-lisp-eval-depth
+	max-specpdl-size
+	minor-mode-alist
+	minor-mode-map-alist
+	minor-mode-overriding-map-alist
+	mode-line-buffer-identification
+	mode-line-format
+	mode-line-modes
+	mode-line-modified
+	mode-line-mule-info
+	mode-line-position
+	mode-line-process
+	mode-name
+	outline-level
+	overriding-local-map
+	overriding-terminal-local-map
+	parse-time-rules
+	process-environment
+	rmail-output-file-alist
+	save-some-buffers-action-alist
+	special-display-buffer-names
+	standard-input
+	standard-output
+	unread-command-events
+	vc-mode))
+
+;; Safe local variables:
+;;
+;; For variables defined by minor modes, put the safety declarations
+;; here, not in the file defining the minor mode (when Emacs visits a
+;; file specifying that local variable, the minor mode file may not be
+;; loaded yet).  For variables defined by major modes, the safety
+;; declarations can go into the major mode's file, since that will be
+;; loaded before file variables are processed.
+
+(let ((string-or-null (lambda (a) (or (stringp a) (null a)))))
+  (eval
+   `(mapc (lambda (pair)
+	    (put (car pair) 'safe-local-variable (cdr pair)))
+	  '((byte-compile-dynamic . t)
+	    (c-basic-offset     .  integerp)
+	    (c-file-style       .  stringp)
+	    (c-indent-level     .  integerp)
+	    (comment-column     .  integerp)
+	    (compile-command    . ,string-or-null)
+	    (fill-column        .  integerp)
+	    (fill-prefix        . ,string-or-null)
+	    (indent-tabs-mode   .  t)
+	    (ispell-check-comments . (lambda (a)
+				       (memq a '(nil t exclusive))))
+	    (ispell-local-dictionary . ,string-or-null)
+	    (kept-new-versions  .  integerp)
+	    (no-byte-compile    .  t)
+	    (no-update-autoloads . t)
+	    (outline-regexp     . ,string-or-null)
+	    (page-delimiter     . ,string-or-null)
+	    (paragraph-start    . ,string-or-null)
+	    (paragraph-separate . ,string-or-null)
+	    (sentence-end       . ,string-or-null)
+	    (sentence-end-double-space . t)
+	    (tab-width          .  integerp)
+	    (truncate-lines     .  t)
+	    (version-control    .  t)))))
+
+(put 'c-set-style 'safe-local-eval-function t)
 
 (defun hack-local-variables-confirm (vars unsafe-vars risky-vars)
   (if noninteractive
@@ -2346,18 +2470,6 @@
 	  mode-specified
 	result))))
 
-(defvar hack-local-variables-hook nil
-  "Normal hook run after processing a file's local variables specs.
-Major modes can use this to examine user-specified local variables
-in order to initialize other data structure based on them.")
-
-(defcustom safe-local-variable-values nil
-  "List variable-value pairs that are considered safe.
-Each element is a cons cell (VAR . VAL), where VAR is a variable
-symbol and VAL is a value that is considered safe."
-  :group 'find-file
-  :type  'alist)
-
 (defun hack-local-variables (&optional mode-only)
   "Parse and put into effect this buffer's local variables spec.
 If MODE-ONLY is non-nil, all we do is check whether the major mode
@@ -2479,92 +2591,6 @@
 		  (hack-one-local-variable (car elt) (cdr elt)))))
 	  (run-hooks 'hack-local-variables-hook))))))
 
-(defvar ignored-local-variables
-  '(ignored-local-variables safe-local-variable-values)
-  "Variables to be ignored in a file's local variable spec.")
-
-;; Get confirmation before setting these variables as locals in a file.
-(put 'debugger 'risky-local-variable t)
-(put 'enable-local-eval 'risky-local-variable t)
-(put 'ignored-local-variables 'risky-local-variable t)
-(put 'ignored-local-variables 'safe-local-variable-values t)
-(put 'eval 'risky-local-variable t)
-(put 'file-name-handler-alist 'risky-local-variable t)
-(put 'inhibit-quit 'risky-local-variable t)
-(put 'minor-mode-alist 'risky-local-variable t)
-(put 'minor-mode-map-alist 'risky-local-variable t)
-(put 'minor-mode-overriding-map-alist 'risky-local-variable t)
-(put 'overriding-local-map 'risky-local-variable t)
-(put 'overriding-terminal-local-map 'risky-local-variable t)
-(put 'auto-mode-alist 'risky-local-variable t)
-(put 'after-load-alist 'risky-local-variable t)
-(put 'buffer-file-name 'risky-local-variable t)
-(put 'buffer-undo-list 'risky-local-variable t)
-(put 'buffer-auto-save-file-name 'risky-local-variable t)
-(put 'buffer-file-truename 'risky-local-variable t)
-(put 'default-text-properties 'risky-local-variable t)
-(put 'exec-path 'risky-local-variable t)
-(put 'load-path 'risky-local-variable t)
-(put 'exec-directory 'risky-local-variable t)
-(put 'process-environment 'risky-local-variable t)
-(put 'dabbrev-case-fold-search 'risky-local-variable t)
-(put 'dabbrev-case-replace 'risky-local-variable t)
-;; Don't wait for outline.el to be loaded, for the sake of outline-minor-mode.
-(put 'outline-level 'risky-local-variable t)
-(put 'rmail-output-file-alist 'risky-local-variable t)
-(put 'font-lock-defaults 'risky-local-variable t)
-(put 'special-display-buffer-names 'risky-local-variable t)
-(put 'frame-title-format 'risky-local-variable t)
-(put 'global-mode-string 'risky-local-variable t)
-(put 'header-line-format 'risky-local-variable t)
-(put 'icon-title-format 'risky-local-variable t)
-(put 'input-method-alist 'risky-local-variable t)
-(put 'format-alist 'risky-local-variable t)
-(put 'vc-mode 'risky-local-variable t)
-(put 'imenu-generic-expression 'risky-local-variable t)
-(put 'imenu--index-alist 'risky-local-variable t)
-(put 'standard-input 'risky-local-variable t)
-(put 'standard-output 'risky-local-variable t)
-(put 'unread-command-events 'risky-local-variable t)
-(put 'max-lisp-eval-depth 'risky-local-variable t)
-(put 'max-specpdl-size 'risky-local-variable t)
-(put 'mode-line-format 'risky-local-variable t)
-(put 'mode-line-modified 'risky-local-variable t)
-(put 'mode-line-mule-info 'risky-local-variable t)
-(put 'mode-line-buffer-identification 'risky-local-variable t)
-(put 'mode-line-modes 'risky-local-variable t)
-(put 'mode-line-position 'risky-local-variable t)
-(put 'mode-line-process 'risky-local-variable t)
-(put 'mode-name 'risky-local-variable t)
-(put 'display-time-string 'risky-local-variable t)
-(put 'parse-time-rules 'risky-local-variable t)
-
-;; Commonly-encountered local variables that are safe:
-(let ((string-or-null (lambda (a) (or (stringp a) (null a)))))
-  (eval
-   `(mapc (lambda (pair)
-	    (put (car pair) 'safe-local-variable (cdr pair)))
-	  '((byte-compile-dynamic . t)
-	    (c-basic-offset     .  integerp)
-	    (c-file-style       .  stringp)
-	    (c-indent-level     .  integerp)
-	    (comment-column     .  integerp)
-	    (compile-command    . ,string-or-null)
-	    (fill-column        .  integerp)
-	    (fill-prefix        . ,string-or-null)
-	    (indent-tabs-mode   .  t)
-	    (kept-new-versions  .  integerp)
-	    (no-byte-compile    .  t)
-	    (no-update-autoloads . t)
-	    (outline-regexp     . ,string-or-null)
-	    (page-delimiter     . ,string-or-null)
-	    (paragraph-start    . ,string-or-null)
-	    (paragraph-separate . ,string-or-null)
-	    (sentence-end       . ,string-or-null)
-	    (sentence-end-double-space . t)
-	    (tab-width          .  integerp)
-	    (version-control    .  t)))))
-
 (defun safe-local-variable-p (sym val)
   "Non-nil if SYM is safe as a file-local variable with value VAL.
 It is safe if any of these conditions are met:
@@ -2602,17 +2628,6 @@
 -[0-9]+$\\|font-lock-syntactic-keywords$\\|-frame-alist$\\|-mode-alist$\\|\
 -map$\\|-map-alist$" (symbol-name sym))))
 
-(defcustom safe-local-eval-forms nil
-  "*Expressions that are considered \"safe\" in an `eval:' local variable.
-Add expressions to this list if you want Emacs to evaluate them, when
-they appear in an `eval' local variable specification, without first
-asking you for confirmation."
-  :group 'find-file
-  :version "22.1"
-  :type '(repeat sexp))
-
-(put 'c-set-style 'safe-local-eval-function t)
-
 (defun hack-one-local-variable-quotep (exp)
   (and (consp exp) (eq (car exp) 'quote) (consp (cdr exp))))
 
@@ -3630,7 +3645,6 @@
     (?d diff-buffer-with-file
 	"view changes in file"))
   "ACTION-ALIST argument used in call to `map-y-or-n-p'.")
-(put 'save-some-buffers-action-alist 'risky-local-variable t)
 
 (defvar buffer-save-without-query nil
   "Non-nil means `save-some-buffers' should save this buffer without asking.")
--- a/lisp/fringe.el	Wed Feb 22 06:52:00 2006 +0000
+++ b/lisp/fringe.el	Wed Feb 22 06:54:10 2006 +0000
@@ -1,4 +1,4 @@
-;;; fringe.el --- change fringes appearance in various ways
+;;; fringe.el --- fringe setup and control
 
 ;; Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
 
@@ -25,8 +25,9 @@
 
 ;;; Commentary:
 
-;; This file contains helpful functions for customizing the appearance
-;; of the fringe.
+;; This file contains code to initialize the built-in fringe bitmaps
+;; as well as helpful functions for customizing the appearance of the
+;; fringe.
 
 ;; The code is influenced by scroll-bar.el and avoid.el.  The author
 ;; gratefully acknowledge comments and suggestions made by Miles
@@ -40,33 +41,53 @@
   :version "22.1"
   :group 'frames)
 
-;; Standard fringe bitmaps
+;; Define the built-in fringe bitmaps and setup default mappings
+
+(when (boundp 'fringe-bitmaps)
+  (let ((bitmaps '(question-mark
+		   left-arrow right-arrow up-arrow down-arrow
+		   left-curly-arrow right-curly-arrow
+		   left-triangle right-triangle
+		   top-left-angle top-right-angle
+		   bottom-left-angle bottom-right-angle
+		   left-bracket right-bracket
+		   filled-rectangle hollow-rectangle
+		   filled-square hollow-square
+		   vertical-bar horizontal-bar
+		   empty-line))
+	(bn 1))
+    (while bitmaps
+      (push (car bitmaps) fringe-bitmaps)
+      (put (car bitmaps) 'fringe bn)
+      (setq bitmaps (cdr bitmaps)
+	    bn (1+ bn))))
+
+  (setq-default fringe-indicator-alist
+		'((truncation . (left-arrow right-arrow))
+		  (continuation . (left-curly-arrow right-curly-arrow))
+		  (overlay-arrow . right-triangle)
+		  (up . up-arrow)
+		  (down . down-arrow)
+		  (top . (top-left-angle top-right-angle))
+		  (bottom . (bottom-left-angle bottom-right-angle
+			     top-right-angle top-left-angle))
+		  (top-bottom . (left-bracket right-bracket
+				 top-right-angle top-left-angle))
+		  (empty-line . empty-line)
+		  (unknown . question-mark)))
+
+  (setq-default fringe-cursor-alist
+		'((box . filled-rectangle)
+		  (hollow . hollow-rectangle)
+		  (bar . vertical-bar)
+		  (hbar . horizontal-bar)
+		  (hollow-small . hollow-square))))
+
 
 (defmacro fringe-bitmap-p (symbol)
   "Return non-nil if SYMBOL is a fringe bitmap."
   `(get ,symbol 'fringe))
 
-(defvar fringe-bitmaps)
-
-(unless (or (not (boundp 'fringe-bitmaps))
-	    (get 'left-truncation 'fringe))
-  (let ((bitmaps '(left-truncation right-truncation
-		   up-arrow down-arrow
-		   continued-line continuation-line
-		   overlay-arrow
-		   top-left-angle top-right-angle
-		   bottom-left-angle bottom-right-angle
-		   left-bracket right-bracket
-		   filled-box-cursor hollow-box-cursor hollow-square
-		   bar-cursor hbar-cursor
-		   empty-line))
-	(bn 2))
-    (while bitmaps
-      (push (car bitmaps) fringe-bitmaps)
-      (put (car bitmaps) 'fringe bn)
-      (setq bitmaps (cdr bitmaps)
-	    bn (1+ bn)))))
-
 
 ;; Control presence of fringes
 
@@ -137,7 +158,6 @@
       ;; Otherwise impose the user-specified value of fringe-mode.
       (custom-initialize-reset symbol value))))
 
-;;;###autoload
 (defcustom fringe-mode nil
   "*Specify appearance of fringes on all frames.
 This variable can be nil (the default) meaning the fringes should have
@@ -195,7 +215,6 @@
 	       nil
 	     0)))))
 
-;;;###autoload
 (defun fringe-mode (&optional mode)
   "Set the default appearance of fringes on all frames.
 
@@ -221,7 +240,6 @@
   (interactive (list (fringe-query-style 'all-frames)))
   (set-fringe-mode mode))
 
-;;;###autoload
 (defun set-fringe-style (&optional mode)
   "Set the default appearance of fringes on the selected frame.
 
--- a/lisp/gnus/ChangeLog	Wed Feb 22 06:52:00 2006 +0000
+++ b/lisp/gnus/ChangeLog	Wed Feb 22 06:54:10 2006 +0000
@@ -1,3 +1,9 @@
+2006-02-20  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+	* rfc2047.el (rfc2047-charset-to-coding-system): Don't check the
+	coding system which mm-charset-to-coding-system returns for a
+	given charset is valid.
+
 2006-02-16  Juanma Barranquero  <lekktu@gmail.com>
 
 	* html2text.el (html2text-remove-tag-list):
--- a/lisp/gnus/rfc2047.el	Wed Feb 22 06:52:00 2006 +0000
+++ b/lisp/gnus/rfc2047.el	Wed Feb 22 06:54:10 2006 +0000
@@ -835,7 +835,7 @@
     (cond ((eq cs 'ascii)
 	   (setq cs (or (mm-charset-to-coding-system mail-parse-charset)
 			'raw-text)))
-	  ((setq cs (mm-coding-system-p cs)))
+	  ((mm-coding-system-p cs))
 	  ((and charset
 		(listp mail-parse-ignored-charsets)
 		(memq 'gnus-unknown mail-parse-ignored-charsets))
--- a/lisp/help-fns.el	Wed Feb 22 06:52:00 2006 +0000
+++ b/lisp/help-fns.el	Wed Feb 22 06:54:10 2006 +0000
@@ -252,6 +252,7 @@
                          "\\)"
                          "\\(?:es\\|s\\|th\\)?"  ; for ARGth, ARGs
                          "\\(?:-[a-z0-9-]+\\)?"  ; for ARG-xxx, ARG-n
+                         "\\(?:-[{([<`\"].*?\\)?"; for ARG-{x}, (x), <x>, [x], `x'
                          "\\>")                  ; end of word
                  (help-default-arg-highlight arg)
                  doc t t 1)))))
--- a/lisp/help.el	Wed Feb 22 06:52:00 2006 +0000
+++ b/lisp/help.el	Wed Feb 22 06:54:10 2006 +0000
@@ -579,12 +579,8 @@
 	   (setq key (read-key-sequence "Describe key (or click or menu item): "))
 	   (list
 	    key
-	    (prefix-numeric-value current-prefix-arg)
-	    ;; If KEY is a down-event, read the corresponding up-event
-	    ;; and use it as the third argument.
-	    (if (and (consp key) (symbolp (car key))
-		     (memq 'down (cdr (get (car key) 'event-symbol-elements))))
-		(read-event))))
+	    (if current-prefix-arg (prefix-numeric-value current-prefix-arg))
+	    1))
        ;; Put yank-menu back as it was, if we changed it.
        (when saved-yank-menu
 	 (setq yank-menu (copy-sequence saved-yank-menu))
--- a/lisp/icomplete.el	Wed Feb 22 06:52:00 2006 +0000
+++ b/lisp/icomplete.el	Wed Feb 22 06:54:10 2006 +0000
@@ -146,7 +146,7 @@
   (if (commandp func-name)
     (save-excursion
       (let* ((sym (intern func-name))
-	     (buf (other-buffer))
+	     (buf (other-buffer nil t))
 	     (map (save-excursion (set-buffer buf) (current-local-map)))
 	     (keys (where-is-internal sym map)))
 	(if keys
--- a/lisp/info.el	Wed Feb 22 06:52:00 2006 +0000
+++ b/lisp/info.el	Wed Feb 22 06:54:10 2006 +0000
@@ -622,12 +622,6 @@
 	(cond
 	 ((string= (downcase filename) "dir")
 	  (setq found t))
-	 ((string= filename "apropos")
-	  (setq found 'apropos))
-	 ((string= filename "history")
-	  (setq found 'history))
-	 ((string= filename "toc")
-	  (setq found 'toc))
 	 (t
 	  (let ((dirs (if (string-match "^\\./" filename)
                           ;; If specified name starts with `./'
@@ -673,7 +667,8 @@
           (if noerror
               (setq filename nil)
             (error "Info file %s does not exist" filename)))
-        filename)))
+        filename)
+    (and (member filename '(apropos history toc)) filename)))
 
 (defun Info-find-node (filename nodename &optional no-going-back)
   "Go to an Info node specified as separate FILENAME and NODENAME.
@@ -891,9 +886,6 @@
               (setq Info-current-file
 		    (cond
 		     ((eq filename t) "dir")
-		     ((eq filename 'apropos) "apropos")
-		     ((eq filename 'history) "history")
-		     ((eq filename 'toc) "toc")
 		     (t filename)))
 	      ))
         ;; Use string-equal, not equal, to ignore text props.
@@ -1409,7 +1401,7 @@
 		 (if (stringp Info-current-file)
 		     (replace-regexp-in-string
 		      "%" "%%" (file-name-nondirectory Info-current-file))
-		   "")
+		   (format "*%S*" Info-current-file))
 		 ") "
 		 (if Info-current-node
 		     (propertize (replace-regexp-in-string
@@ -1648,7 +1640,8 @@
 			    ;; Skip Tag Table node
 			    (save-excursion
 			      (and (search-backward "\^_" nil t)
-				   (looking-at "\^_\nTag Table"))))))
+				   (looking-at
+				    "\^_\n\\(Tag Table\\|Local Variables\\)"))))))
 	    (let ((search-spaces-regexp Info-search-whitespace-regexp))
 	      (if (if backward
 		      (re-search-backward regexp bound t)
@@ -1736,7 +1729,8 @@
 				  ;; Skip Tag Table node
 				  (save-excursion
 				    (and (search-backward "\^_" nil t)
-					 (looking-at "\^_\nTag Table"))))))
+					 (looking-at
+					  "\^_\n\\(Tag Table\\|Local Variables\\)"))))))
 		  (let ((search-spaces-regexp Info-search-whitespace-regexp))
 		    (if (if backward
 			    (re-search-backward regexp nil t)
@@ -1831,11 +1825,11 @@
 
 (defun Info-isearch-push-state ()
   `(lambda (cmd)
-     (Info-isearch-pop-state cmd ,Info-current-file ,Info-current-node)))
+     (Info-isearch-pop-state cmd ',Info-current-file ',Info-current-node)))
 
 (defun Info-isearch-pop-state (cmd file node)
-  (or (and (string= Info-current-file file)
-           (string= Info-current-node node))
+  (or (and (equal Info-current-file file)
+           (equal Info-current-node node))
       (progn (Info-find-node file node) (sit-for 0))))
 
 (defun Info-isearch-start ()
@@ -1853,7 +1847,7 @@
 	(forward-line 1)
 	(cond ((re-search-backward
 		(concat name ":" (Info-following-node-name-re)) bound t)
-	       (match-string 1))
+	       (match-string-no-properties 1))
 	      ((not (eq errorname t))
 	       (error "Node has no %s"
 		      (capitalize (or errorname name)))))))))
@@ -1875,7 +1869,7 @@
 ;;; For compatibility; other files have used this name.
 (defun Info-following-node-name ()
   (and (looking-at (Info-following-node-name-re))
-       (match-string 1)))
+       (match-string-no-properties 1)))
 
 (defun Info-next ()
   "Go to the next node of this node."
@@ -1909,7 +1903,8 @@
       (Info-goto-node node)
       (setq p (point))
       (goto-char (point-min))
-      (if (and (search-forward "\n* Menu:" nil t)
+      (if (and (stringp old-file)
+	       (search-forward "\n* Menu:" nil t)
 	       (re-search-forward
 		(if (string-equal old-node "Top")
 		    (concat "\n\\*[^:]+: +(" (file-name-nondirectory old-file) ")")
@@ -1977,51 +1972,53 @@
           (while hl
             (let ((file (nth 0 (car hl)))
                   (node (nth 1 (car hl))))
-              (if (and (string-equal file curr-file)
-                       (string-equal node curr-node))
+              (if (and (equal file curr-file)
+                       (equal node curr-node))
                   (setq p (point)))
-              (insert "* " node ": ("
-		      (propertize (or (file-name-directory file) "") 'invisible t)
-		      (file-name-nondirectory file)
-                      ")" node ".\n"))
+              (if (stringp file)
+		  (insert "* " node ": ("
+			  (propertize (or (file-name-directory file) "") 'invisible t)
+			  (file-name-nondirectory file)
+			  ")" node ".\n")))
             (setq hl (cdr hl))))))
-    (Info-find-node "history" "Top")
+    (Info-find-node 'history "Top")
     (goto-char (or p (point-min)))))
 
 (defun Info-toc ()
   "Go to a node with table of contents of the current Info file.
 Table of contents is created from the tree structure of menus."
   (interactive)
-  (let ((curr-file (substring-no-properties Info-current-file))
-        (curr-node (substring-no-properties Info-current-node))
-        p)
-    (with-current-buffer (get-buffer-create " *info-toc*")
-      (let ((inhibit-read-only t)
-            (node-list (Info-build-toc curr-file)))
-        (erase-buffer)
-        (goto-char (point-min))
-        (insert "\n\^_\nFile: toc,  Node: Top,  Up: (dir)\n\n")
-        (insert "Table of Contents\n*****************\n\n")
-        (insert "*Note Top: (" curr-file ")Top.\n")
-        (Info-insert-toc
-         (nth 2 (assoc "Top" node-list)) ; get Top nodes
-         node-list 0 curr-file))
-      (if (not (bobp))
-          (let ((Info-hide-note-references 'hide)
-                (Info-fontify-visited-nodes nil))
-            (Info-mode)
-            (setq Info-current-file "toc" Info-current-node "Top")
-            (goto-char (point-min))
-            (narrow-to-region (or (re-search-forward "\n[\^_\f]\n" nil t)
-                                  (point-min))
-                              (point-max))
-            (Info-fontify-node)
-            (widen)))
-      (goto-char (point-min))
-      (if (setq p (search-forward (concat "*Note " curr-node ":") nil t))
-          (setq p (- p (length curr-node) 2))))
-    (Info-find-node "toc" "Top")
-    (goto-char (or p (point-min)))))
+  (if (stringp Info-current-file)
+      (let ((curr-file (substring-no-properties Info-current-file))
+	    (curr-node (substring-no-properties Info-current-node))
+	    p)
+	(with-current-buffer (get-buffer-create " *info-toc*")
+	  (let ((inhibit-read-only t)
+		(node-list (Info-build-toc curr-file)))
+	    (erase-buffer)
+	    (goto-char (point-min))
+	    (insert "\n\^_\nFile: toc,  Node: Top,  Up: (dir)\n\n")
+	    (insert "Table of Contents\n*****************\n\n")
+	    (insert "*Note Top: (" curr-file ")Top.\n")
+	    (Info-insert-toc
+	     (nth 2 (assoc "Top" node-list)) ; get Top nodes
+	     node-list 0 curr-file))
+	  (if (not (bobp))
+	      (let ((Info-hide-note-references 'hide)
+		    (Info-fontify-visited-nodes nil))
+		(Info-mode)
+		(setq Info-current-file 'toc Info-current-node "Top")
+		(goto-char (point-min))
+		(narrow-to-region (or (re-search-forward "\n[\^_\f]\n" nil t)
+				      (point-min))
+				  (point-max))
+		(Info-fontify-node)
+		(widen)))
+	  (goto-char (point-min))
+	  (if (setq p (search-forward (concat "*Note " curr-node ":") nil t))
+	      (setq p (- p (length curr-node) 2))))
+	(Info-find-node 'toc "Top")
+	(goto-char (or p (point-min))))))
 
 (defun Info-insert-toc (nodes node-list level curr-file)
   "Insert table of contents with references to nodes."
@@ -2221,16 +2218,18 @@
         (setq Info-point-loc
               (if (match-beginning 5)
                   (string-to-number (match-string 5))
-                (buffer-substring (match-beginning 0) (1- (match-beginning 1)))))
+                (buffer-substring-no-properties
+		 (match-beginning 0) (1- (match-beginning 1)))))
 ;;; Uncomment next line to use names of cross-references in non-index nodes:
 ;;;       (setq Info-point-loc
 ;;;             (buffer-substring (match-beginning 0) (1- (match-beginning 1))))
       )
     (replace-regexp-in-string
      "[ \n]+" " "
-     (or (match-string 2)
+     (or (match-string-no-properties 2)
 	 ;; If the node name is the menu entry name (using `entry::').
-	 (buffer-substring (match-beginning 0) (1- (match-beginning 1)))))))
+	 (buffer-substring-no-properties
+	  (match-beginning 0) (1- (match-beginning 1)))))))
 
 ;; No one calls this.
 ;;(defun Info-menu-item-sequence (list)
@@ -2684,7 +2683,7 @@
   (or file (setq file Info-current-file))
   (or (assoc file Info-index-nodes)
       ;; Skip virtual Info files
-      (and (member file '("dir" "history" "toc" "apropos"))
+      (and (member file '("dir" apropos history toc))
            (setq Info-index-nodes (cons (cons file nil) Info-index-nodes)))
       (not (stringp file))
       (if Info-file-supports-index-cookies
@@ -2926,7 +2925,7 @@
 	     (message "%s" (if (eq (car-safe err) 'error)
 			       (nth 1 err) err))
 	     (sit-for 1 t)))))
-      (Info-goto-node (concat "(" current-file ")" current-node))
+      (Info-find-node current-file current-node)
       (setq Info-history ohist
 	    Info-history-list ohist-list)
       (message "Searching indices...done")
@@ -2945,7 +2944,7 @@
 		     (if (nth 3 entry)
 			 (concat " (line " (nth 3 entry) ")")
 		       "")))))
-	(Info-find-node "apropos" "Index")
+	(Info-find-node 'apropos "Index")
 	(setq Info-complete-cache nil)))))
 
 (defun Info-undefined ()
@@ -3287,10 +3286,14 @@
   (interactive "P")
   (unless Info-current-node
     (error "No current Info node"))
-  (let ((node (concat "(" (file-name-nondirectory Info-current-file) ")"
-		      Info-current-node)))
+  (let ((node (if (stringp Info-current-file)
+		  (concat "(" (file-name-nondirectory Info-current-file) ")"
+			  Info-current-node))))
     (if (zerop (prefix-numeric-value arg))
         (setq node (concat "(info \"" node "\")")))
+    (unless (stringp Info-current-file)
+      (setq node (format "(Info-find-node '%S '%S)"
+			 Info-current-file Info-current-node)))
     (kill-new node)
     (message "%s" node)))
 
@@ -3817,29 +3820,30 @@
                                         "^[ \t]+" ""
                                         (replace-regexp-in-string
                                          "[ \t\n]+" " "
-                                         (or (match-string 5)
+                                         (or (match-string-no-properties 5)
                                              (and (not (equal (match-string 4) ""))
-                                                  (match-string 4))
-                                             (match-string 2)))))
+                                                  (match-string-no-properties 4))
+                                             (match-string-no-properties 2)))))
 				 (external-link-p
 				  (string-match "(\\([^)]+\\))\\([^)]*\\)" node))
                                  (file (if external-link-p
 					   (file-name-nondirectory
-					    (match-string 1 node))
+					    (match-string-no-properties 1 node))
 					 Info-current-file))
                                  (hl Info-history-list)
                                  res)
                             (if external-link-p
 				(setq node (if (equal (match-string 2 node) "")
                                                "Top"
-                                             (match-string 2 node))))
+                                             (match-string-no-properties 2 node))))
 			    (while hl
 			      (if (and (string-equal node (nth 1 (car hl)))
-				       (string-equal
-					file (if external-link-p
-						 (file-name-nondirectory
-						  (caar hl))
-					       (caar hl))))
+				       (equal file
+					      (if (and external-link-p
+						       (stringp (caar hl)))
+						  (file-name-nondirectory
+						   (caar hl))
+						(caar hl))))
 				  (setq res (car hl) hl nil)
 				(setq hl (cdr hl))))
                             res))) 'info-xref-visited 'info-xref))
@@ -3932,26 +3936,28 @@
                  (if (and Info-fontify-visited-nodes
                           (save-match-data
                             (let* ((node (if (equal (match-string 3) "")
-					     (match-string 1)
-					   (match-string 3)))
+					     (match-string-no-properties 1)
+					   (match-string-no-properties 3)))
 				   (external-link-p
 				    (string-match "(\\([^)]+\\))\\([^)]*\\)" node))
 				   (file (if external-link-p
 					     (file-name-nondirectory
-					      (match-string 1 node))
+					      (match-string-no-properties 1 node))
 					   Info-current-file))
 				   (hl Info-history-list)
 				   res)
                               (if external-link-p
                                   (setq node (if (equal (match-string 2 node) "")
                                                  "Top"
-                                               (match-string 2 node))))
+                                               (match-string-no-properties 2 node))))
 			      (while hl
 				(if (and (string-equal node (nth 1 (car hl)))
-					 (string-equal
-					  file (if external-link-p
-						   (file-name-nondirectory (caar hl))
-						 (caar hl))))
+					 (equal file
+						(if (and external-link-p
+							 (stringp (caar hl)))
+						    (file-name-nondirectory
+						     (caar hl))
+						  (caar hl))))
 				    (setq res (car hl) hl nil)
 				  (setq hl (cdr hl))))
                               res))) 'info-xref-visited 'info-xref)))
@@ -4210,8 +4216,8 @@
 
 (defun Info-desktop-buffer-misc-data (desktop-dirname)
   "Auxiliary information to be saved in desktop file."
-  (if (not (member Info-current-file '("apropos" "history" "toc")))
-      (list Info-current-file Info-current-node)))
+  (unless (member Info-current-file '(apropos history toc nil))
+    (list Info-current-file Info-current-node)))
 
 (defun Info-restore-desktop-buffer (desktop-buffer-file-name
                                     desktop-buffer-name
--- a/lisp/isearch.el	Wed Feb 22 06:52:00 2006 +0000
+++ b/lisp/isearch.el	Wed Feb 22 06:54:10 2006 +0000
@@ -116,8 +116,11 @@
 this, unless it is inside of a regexp construct such as [...] or *, + or ?.
 You might want to use something like \"[ \\t\\r\\n]+\" instead.
 In the Customization buffer, that is `[' followed by a space,
-a tab, a carriage return (control-M), a newline, and `]+'."
-  :type 'regexp
+a tab, a carriage return (control-M), a newline, and `]+'.
+
+When this is nil, each space you type matches literally, against one space."
+  :type '(choice (const :tag "Find Spaces Literally" nil)
+		 regexp)
   :group 'isearch)
 
 (defcustom search-invisible 'open
--- a/lisp/loadup.el	Wed Feb 22 06:52:00 2006 +0000
+++ b/lisp/loadup.el	Wed Feb 22 06:54:10 2006 +0000
@@ -163,6 +163,7 @@
 
 (if (fboundp 'x-create-frame)
     (progn
+      (load "fringe")
       (load "image")
       (load "international/fontset")
       (load "dnd")
--- a/lisp/mh-e/ChangeLog	Wed Feb 22 06:52:00 2006 +0000
+++ b/lisp/mh-e/ChangeLog	Wed Feb 22 06:54:10 2006 +0000
@@ -1,3 +1,53 @@
+2006-02-21  Eric Ding  <ericding@alum.mit.edu>
+
+	* mh-e.el (mh-invisible-header-fields-internal): Added entry
+	"X-Sasl-enc:"
+
+2006-02-20  Eric Ding  <ericding@alum.mit.edu>
+
+	* mh-e.el (mh-invisible-header-fields-internal): Added entries
+	"X-Authenticated-Sender:", "X-Barracuda-", "X-EFL-Spamscore",
+	"X-IronPort-AV:", "X-Mail-from:", "X-Mailman-Approved-At:",
+	"X-Resolved-to:", and "X-SA-Exim".  Fixed "X-Bugzilla-" and
+	"X-Roving-" by removing unnecessary "*" at end.
+
+2006-02-19  Bill Wohler  <wohler@newt.com>
+
+	* mh-alias.el (mh-address-mail-regexp)
+	(mh-goto-address-find-address-at-point): Delete copies from
+	goto-addr.el.
+	(mh-alias-suggest-alias): Use goto-address-mail-regexp instead of
+	mh-address-mail-regexp.
+	(mh-alias-add-address-under-point): Use
+	goto-address-find-address-at-point instead of
+	mh-goto-address-find-address-at-point.
+
+	* mh-e.el (mh-show-use-goto-addr-flag): Delete.
+
+	* mh-show.el (mh-show-mode): Mention goto-address-highlight-p in
+	docstring.
+	(mh-show-addr): Call goto-address unconditionally. User should use
+	goto-address-highlight-p instead of mh-show-use-goto-addr-flag.
+
+2006-02-18  Bill Wohler  <wohler@newt.com>
+
+	* mh-e.el (Version, mh-version): Add +cvs to version.
+
+2006-02-18  Bill Wohler  <wohler@newt.com>
+
+	Release MH-E version 7.92.
+
+	* mh-e.el (Version, mh-version): Update for release 7.92.
+
+2006-02-17  Bill Wohler  <wohler@newt.com>
+
+	* mh-e.el (mh-folder-msg-number): Use purple on low-color, light
+	backgrounds per Mark's suggestion.
+
+	* mh-utils.el (mh-image-load-path): Fix problem that images on
+	load-path or image-load-path would win over relative paths (newer
+	MH-E or Emacs distribution).
+
 2006-02-16  Bill Wohler  <wohler@newt.com>
 
 	* mh-e.el (mh-inherit-face-flag): New variable. Non-nil means that
--- a/lisp/mh-e/mh-alias.el	Wed Feb 22 06:52:00 2006 +0000
+++ b/lisp/mh-e/mh-alias.el	Wed Feb 22 06:54:10 2006 +0000
@@ -35,6 +35,8 @@
 
 (mh-require-cl)
 
+(require 'goto-addr)
+
 (defvar mh-alias-alist 'not-read
   "Alist of MH aliases.")
 (defvar mh-alias-blind-alist nil
@@ -62,11 +64,6 @@
 automatically included. You can update the alias list manually using
 \\[mh-alias-reload].")
 
-;; Copy of `goto-address-mail-regexp'.
-(defvar mh-address-mail-regexp
-  "[-a-zA-Z0-9._]+@\\([-a-zA-z0-9_]+\\.\\)+[a-zA-Z0-9]+"
-  "A regular expression probably matching an e-mail address.")
-
 
 
 ;;; Alias Loading
@@ -343,7 +340,7 @@
    ((string-match "^\\(.*\\) +<.*>$" string)
     ;; Some name <somename@foo.bar>  -> recurse -> Some name
     (mh-alias-suggest-alias (match-string 1 string) no-comma-swap))
-   ((string-match (concat mh-address-mail-regexp " +(\\(.*\\))$") string)
+   ((string-match (concat goto-address-mail-regexp " +(\\(.*\\))$") string)
     ;; somename@foo.bar (Some name)  -> recurse -> Some name
     (mh-alias-suggest-alias (match-string 1 string) no-comma-swap))
    ((string-match "^\\(Dr\\|Prof\\)\\.? +\\(.*\\)" string)
@@ -595,24 +592,11 @@
 (defun mh-alias-add-address-under-point ()
   "Insert an alias for address under point."
   (interactive)
-  (let ((address (mh-goto-address-find-address-at-point)))
+  (let ((address (goto-address-find-address-at-point)))
     (if address
         (mh-alias-add-alias nil address)
       (message "No email address found under point"))))
 
-;; From goto-addr.el, which we don't want to force-load on users.
-(defun mh-goto-address-find-address-at-point ()
-  "Find e-mail address around or before point.
-
-Then search backwards to beginning of line for the start of an
-e-mail address. If no e-mail address found, return nil."
-  (re-search-backward "[^-_A-z0-9.@]" (mh-line-beginning-position) 'lim)
-  (if (or (looking-at mh-address-mail-regexp) ; already at start
-          (and (re-search-forward mh-address-mail-regexp
-                                  (mh-line-end-position) 'lim)
-               (goto-char (match-beginning 0))))
-      (mh-match-string-no-properties 0)))
-
 (defun mh-alias-apropos (regexp)
   "Show all aliases or addresses that match a regular expression REGEXP."
   (interactive "sAlias regexp: ")
--- a/lisp/mh-e/mh-e.el	Wed Feb 22 06:52:00 2006 +0000
+++ b/lisp/mh-e/mh-e.el	Wed Feb 22 06:54:10 2006 +0000
@@ -6,7 +6,7 @@
 
 ;; Author: Bill Wohler <wohler@newt.com>
 ;; Maintainer: Bill Wohler <wohler@newt.com>
-;; Version: 7.91+cvs
+;; Version: 7.92+cvs
 ;; Keywords: mail
 
 ;; This file is part of GNU Emacs.
@@ -121,7 +121,7 @@
 ;; Try to keep variables local to a single file. Provide accessors if
 ;; variables are shared. Use this section as a last resort.
 
-(defconst mh-version "7.91+cvs" "Version number of MH-E.")
+(defconst mh-version "7.92+cvs" "Version number of MH-E.")
 
 ;; Variants
 
@@ -2303,17 +2303,20 @@
     "X-AntiAbuse:"                      ; cPanel
     "X-Apparently-From:"                ; MS Outlook
     "X-Apparently-To:"           ; Egroups/yahoogroups mailing list manager
+    "X-Authenticated-Sender:"           ; AT&T Message Center (webmail)
     "X-Authentication-Warning:"         ; sendmail
+    "X-Barracuda-"                      ; Barracuda spam scores
     "X-Beenthere:"                      ; Mailman mailing list manager
     "X-Bogosity:"                       ; bogofilter
     "X-BrightmailFiltered:"             ; Brightmail
     "X-Brightmail-Tracker:"             ; Brightmail
-    "X-Bugzilla-*"                      ; Bugzilla
+    "X-Bugzilla-"                       ; Bugzilla
     "X-Complaints-To:"
     "X-ContentStamp:"                   ; NetZero
     "X-Cron-Env:"
     "X-DMCA"
     "X-Delivered"
+    "X-EFL-Spamscore:"                  ; MIT alumni spam filtering
     "X-ELNK-Trace:"                     ; Earthlink mailer
     "X-Envelope-Date:"                  ; GNU mailutils
     "X-Envelope-From:"
@@ -2337,6 +2340,7 @@
     "X-Habeas-SWE-9:"                   ; Spam
     "X-Hashcash:"                       ; hashcash
     "X-Info:"                           ; NTMail
+    "X-IronPort-AV:"                    ; IronPort AV
     "X-Juno-"                           ; Juno
     "X-List-Host:"                      ; Unknown mailing list managers
     "X-List-Subscribe:"                 ; Unknown mailing list managers
@@ -2346,12 +2350,14 @@
     "X-Loop:"                           ; Unknown mailing list managers
     "X-Lumos-SenderID:"                 ; Roving ConstantContact
     "X-MAIL-INFO:"                      ; NetZero
-    "X-MHE-Checksum"                    ; Checksum added during index search
+    "X-MHE-Checksum:"                   ; Checksum added during index search
     "X-MIME-Autoconverted:"             ; sendmail
     "X-MIMETrack:"
     "X-MS-"                             ; MS Outlook
+    "X-Mail-from:"                      ; fastmail.fm
     "X-MailScanner"                     ; ListProc(tm) by CREN
     "X-Mailing-List:"                   ; Unknown mailing list managers
+    "X-Mailman-Approved-At:"            ; Mailman mailing list manager
     "X-Mailman-Version:"                ; Mailman mailing list manager
     "X-Majordomo:"                      ; Majordomo mailing list manager
     "X-Message-Id"
@@ -2380,14 +2386,17 @@
     "X-Received-Date:"
     "X-Received:"
     "X-Request-"
+    "X-Resolved-to:"                    ; fastmail.fm
     "X-Return-Path-Hint:"               ; Roving ConstantContact
-    "X-Roving-*"                        ; Roving ConstantContact
+    "X-Roving-"                         ; Roving ConstantContact
+    "X-SA-Exim-"                        ; Exim SpamAssassin
     "X-SBClass:"                        ; Spam
     "X-SBNote:"                         ; Spam
     "X-SBPass:"                         ; Spam
     "X-SBRule:"                         ; Spam
     "X-SMTP-"
-    "X-Scanned-By"
+    "X-Sasl-enc:"                       ; Apple Mail
+    "X-Scanned-By:"
     "X-Sender:"
     "X-Server-Date:"
     "X-Server-Uuid:"
@@ -2615,22 +2624,6 @@
   :type 'integer
   :group 'mh-show)
 
-(defcustom mh-show-use-goto-addr-flag (and (boundp 'goto-address-highlight-p)
-                                           goto-address-highlight-p)
-  "*Non-nil means highlight URLs and email addresses\\<goto-address-highlight-keymap>.
-
-To send a message using the highlighted email address or to view
-the web page for the highlighted URL, use the middle mouse button
-or \\[goto-address-at-point].
-
-See Info node `(mh-e)Sending Mail' to see how to configure Emacs
-to send the message using MH-E.
-
-The default value of this option comes from the value of
-`goto-address-highlight-p'."
-  :type 'boolean
-  :group 'mh-show)
-
 (defcustom mh-show-use-xface-flag (>= emacs-major-version 21)
   "*Non-nil means display face images in MH-show buffers.
 
@@ -3019,7 +3012,9 @@
        (:foreground "snow4"))
       (((class color) (min-colors 64) (background dark))
        (:foreground "snow3"))
-      (((class color))
+      (((class color) (background light))
+       (:foreground "purple"))
+      (((class color) (background dark))
        (:foreground "cyan"))))
     (mh-folder-refiled
      ((((class color) (min-colors 64) (background light))
@@ -3042,9 +3037,9 @@
       (t
        (:bold t))))
     (mh-folder-tick
-     ((((class color) (background dark))
+     ((((class color) (background light))
        (:background "#dddf7e"))
-      (((class color) (background light))
+      (((class color) (background dark))
        (:background "#dddf7e"))
       (t
        (:underline t))))
--- a/lisp/mh-e/mh-show.el	Wed Feb 22 06:52:00 2006 +0000
+++ b/lisp/mh-e/mh-show.el	Wed Feb 22 06:54:10 2006 +0000
@@ -36,13 +36,13 @@
 (require 'mh-e)
 (require 'mh-scan)
 
+(require 'font-lock)
 (require 'gnus-cite)
 (require 'gnus-util)
+(require 'goto-addr)
 
 (autoload 'mh-make-buffer-data "mh-mime") ;can't be automatically generated
 
-(require 'font-lock)
-
 
 
 ;;; MH-Folder Commands
@@ -818,6 +818,13 @@
 (define-derived-mode mh-show-mode text-mode "MH-Show"
   "Major mode for showing messages in MH-E.\\<mh-show-mode-map>
 
+Email addresses and URLs in the message are highlighted if the
+option `goto-address-highlight-p' is on, which it is by default.
+To view the web page for a highlighted URL or to send a message
+using a highlighted email address, use the middle mouse button or
+\\[goto-address-at-point]. See Info node `(mh-e)Sending Mail' to
+see how to configure Emacs to send the message using MH-E.
+
 The hook `mh-show-mode-hook' is called upon entry to this mode.
 
 See also `mh-folder-mode'.
@@ -877,10 +884,7 @@
 ;;;###mh-autoload
 (defun mh-show-addr ()
   "Use `goto-address'."
-  (when mh-show-use-goto-addr-flag
-    (mh-require 'goto-addr nil t)
-    (if (fboundp 'goto-address)
-        (goto-address))))
+  (goto-address))
 
 ;;;###mh-autoload
 (defun mh-gnus-article-highlight-citation ()
--- a/lisp/mh-e/mh-utils.el	Wed Feb 22 06:52:00 2006 +0000
+++ b/lisp/mh-e/mh-utils.el	Wed Feb 22 06:54:10 2006 +0000
@@ -111,18 +111,8 @@
 See also variable `mh-image-load-path-called-flag'."
   (unless mh-image-load-path-called-flag
     (cond
-     (mh-image-load-path)            ; user setting exists; we're done
-     ((mh-image-search-load-path "mh-logo.xpm")
-      ;; Images already in image-load-path.
-      (setq mh-image-load-path
-	    (file-name-directory (mh-image-search-load-path "mh-logo.xpm"))))
-     ((locate-library "mh-logo.xpm")
-      ;; Images already in load-path.
-      (setq mh-image-load-path
-	    (file-name-directory (locate-library "mh-logo.xpm"))))
-     (t
-      ;; Guess `mh-image-load-path' if it wasn't provided by the user.
-      (let (mh-library-name)
+     (mh-image-load-path)               ; user setting exists
+     ((let (mh-library-name)            ; try relative setting
         ;; First, find mh-e in the load-path.
         (setq mh-library-name (locate-library "mh-e"))
         (if (not mh-library-name)
@@ -131,7 +121,17 @@
         (setq mh-image-load-path
               (expand-file-name (concat
                                  (file-name-directory mh-library-name)
-                                 "../../etc/images"))))))
+                                 "../../etc/images")))
+        (file-exists-p (expand-file-name "mh-logo.xpm" mh-image-load-path))))
+     ((mh-image-search-load-path "mh-logo.xpm")
+      ;; Images in image-load-path.
+      (setq mh-image-load-path
+	    (file-name-directory (mh-image-search-load-path "mh-logo.xpm"))))
+     ((locate-library "mh-logo.xpm")
+      ;; Images in load-path.
+      (setq mh-image-load-path
+	    (file-name-directory (locate-library "mh-logo.xpm")))))
+
     (if (not (file-exists-p mh-image-load-path))
         (error "Directory %s in mh-image-load-path does not exist"
                mh-image-load-path))
--- a/lisp/net/rcirc.el	Wed Feb 22 06:52:00 2006 +0000
+++ b/lisp/net/rcirc.el	Wed Feb 22 06:54:10 2006 +0000
@@ -49,7 +49,7 @@
 (defgroup rcirc nil
   "Simple IRC client."
   :version "22.1"
-  :prefix "rcirc"
+  :prefix "rcirc-"
   :group 'applications)
 
 (defcustom rcirc-server "irc.freenode.net"
@@ -295,16 +295,23 @@
 (defvar rcirc-topic nil)
 (defvar rcirc-keepalive-timer nil)
 (defvar rcirc-last-server-message-time nil)
-(defun rcirc-connect (server port nick user-name full-name startup-channels)
+(defun rcirc-connect (&optional server port nick user-name full-name startup-channels)
   (add-hook 'window-configuration-change-hook
 	    'rcirc-window-configuration-change)
 
   (save-excursion
     (message "Connecting to %s..." server)
     (let* ((inhibit-eol-conversion)
-           (port-number (if (stringp port)
-                            (string-to-number port)
-                          port))
+           (port-number (if port
+			    (if (stringp port)
+				(string-to-number port)
+			      port)
+			  rcirc-port))
+	   (server (or server rcirc-server))
+	   (nick (or nick rcirc-nick))
+	   (user-name (or user-name rcirc-user-name))
+	   (full-name (or full-name rcirc-user-full-name))
+	   (startup-channels (or startup-channels (rcirc-startup-channels server)))
            (process (open-network-stream server nil server port-number)))
       ;; set up process
       (set-process-coding-system process 'raw-text 'raw-text)
@@ -758,9 +765,9 @@
 Create the buffer if it doesn't exist."
   (let ((buffer (rcirc-get-buffer process target)))
     (if buffer
-	(progn
+	(with-current-buffer buffer
 	  (when (not rcirc-target)
-	    (setq rcirc-target target))
+ 	    (setq rcirc-target target))
 	  buffer)
 	;; create the buffer
 	(with-rcirc-process-buffer process
@@ -896,20 +903,22 @@
   (kill-buffer (current-buffer))
   (set-window-configuration rcirc-window-configuration))
 
-(defun rcirc-get-any-buffer (process)
+(defun rcirc-any-buffer (process)
   "Return a buffer for PROCESS, either the one selected or the process buffer."
-  (let ((buffer (window-buffer (selected-window))))
-    (if (and buffer
-	     (with-current-buffer buffer
-	       (and (eq major-mode 'rcirc-mode)
-		    (eq rcirc-process process))))
-	buffer
-      (process-buffer process))))
+  (if rcirc-always-use-server-buffer-flag
+      (process-buffer process)
+    (let ((buffer (window-buffer (selected-window))))
+      (if (and buffer
+	       (with-current-buffer buffer
+		 (and (eq major-mode 'rcirc-mode)
+		      (eq rcirc-process process))))
+	  buffer
+	(process-buffer process)))))
 
 (defcustom rcirc-response-formats
-  '(("PRIVMSG" . "%T<%n> %m")
-    ("NOTICE"  . "%T-%n- %m")
-    ("ACTION"  . "%T[%n] %m")
+  '(("PRIVMSG" . "%T<%N> %m")
+    ("NOTICE"  . "%T-%N- %m")
+    ("ACTION"  . "%T[%N %m]")
     ("COMMAND" . "%T%m")
     ("ERROR"   . "%T%fw!!! %m")
     (t         . "%T%fp*** %fs%n %r %m"))
@@ -921,7 +930,8 @@
 the of the following escape sequences replaced by the described values:
 
   %m        The message text
-  %n        The sender's nick (with face `rcirc-my-nick' or `rcirc-other-nick')
+  %n        The sender's nick
+  %N        The sender's nick (with face `rcirc-my-nick' or `rcirc-other-nick')
   %r        The response-type
   %T        The timestamp (with face `rcirc-timestamp')
   %t        The target
@@ -959,13 +969,20 @@
 	    (cond ((eq key ?%)
 		   ;; %% -- literal % character
 		   "%")
-		  ((eq key ?n)
-		   ;; %n -- nick
-		   (rcirc-facify (concat (rcirc-abbrev-nick sender)
-					 (and target (concat "," target)))
-				 (if (string= sender (rcirc-nick process))
-				     'rcirc-my-nick
-				   'rcirc-other-nick)))
+		  ((or (eq key ?n) (eq key ?N))
+		   ;; %n/%N -- nick
+		   (let ((nick (concat (if (string= (with-rcirc-process-buffer
+							process rcirc-server)
+						    sender)
+					   ""
+					 (rcirc-abbrev-nick sender))
+				       (and target (concat "," target)))))
+		     (rcirc-facify nick
+				   (if (eq key ?n)
+				       face
+				     (if (string= sender (rcirc-nick process))
+					 'rcirc-my-nick
+				       'rcirc-other-nick)))))
 		  ((eq key ?T)
 		   ;; %T -- timestamp
 		   (rcirc-facify
@@ -1015,9 +1032,7 @@
   (assert (not (bufferp target)))
   (with-rcirc-process-buffer process
     (cond ((not target)
-	   (if rcirc-always-use-server-buffer-flag
-	       (process-buffer process)
-	     (rcirc-get-any-buffer process)))
+	   (rcirc-any-buffer process))
 	  ((not (rcirc-channel-p target))
 	   ;; message from another user
 	   (if (string= response "PRIVMSG")
@@ -1026,7 +1041,7 @@
 						  sender))
 	     (rcirc-get-buffer process target t)))
 	  ((or (rcirc-get-buffer process target)
-	       (rcirc-get-any-buffer process))))))
+	       (rcirc-any-buffer process))))))
 
 (defvar rcirc-activity-type nil)
 (make-variable-buffer-local 'rcirc-activity-type)
@@ -1069,22 +1084,26 @@
 	    (set-marker-insertion-type rcirc-prompt-start-marker nil)
 	    (set-marker-insertion-type rcirc-prompt-end-marker nil)
 
-	    ;; fill the text we just inserted, maybe
-	    (when (and rcirc-fill-flag
-		       (not (string= response "372"))) ;/motd
-	      (let ((fill-prefix
-		     (or rcirc-fill-prefix
-			 (make-string
-			  (or (next-single-property-change 0 'rcirc-text
-							   fmted-text)
-			      8)
-			  ?\s)))
-		    (fill-column (cond ((eq rcirc-fill-column 'frame-width)
-					(1- (frame-width)))
-				       (rcirc-fill-column
-					rcirc-fill-column)
-				       (t fill-column))))
-		(fill-region fill-start rcirc-prompt-start-marker 'left t))))
+	    (let ((text-start (make-marker)))
+	      (set-marker text-start
+			  (or (next-single-property-change fill-start 
+							   'rcirc-text)
+			      (point-max)))
+	      ;; squeeze spaces out of text before rcirc-text
+	      (fill-region fill-start (1- text-start))
+
+	      ;; fill the text we just inserted, maybe
+	      (when (and rcirc-fill-flag
+			 (not (string= response "372"))) ;/motd
+		(let ((fill-prefix
+		       (or rcirc-fill-prefix
+			   (make-string (- text-start fill-start) ?\s)))
+		      (fill-column (cond ((eq rcirc-fill-column 'frame-width)
+					  (1- (frame-width)))
+					 (rcirc-fill-column
+					  rcirc-fill-column)
+					 (t fill-column))))
+		  (fill-region fill-start rcirc-prompt-start-marker 'left t)))))
 
 	  ;; set inserted text to be read-only
 	  (when rcirc-read-only-flag
@@ -1175,14 +1194,15 @@
 
 (defun rcirc-put-nick-channel (process nick channel)
   "Add CHANNEL to list associated with NICK."
-  (with-rcirc-process-buffer process
-    (let* ((chans (gethash nick rcirc-nick-table))
-	   (record (assoc-string channel chans t)))
-      (if record
-          (setcdr record (current-time))
-        (puthash nick (cons (cons channel (current-time))
-                            chans)
-                 rcirc-nick-table)))))
+  (let ((nick (rcirc-user-nick nick)))
+    (with-rcirc-process-buffer process
+      (let* ((chans (gethash nick rcirc-nick-table))
+	     (record (assoc-string channel chans t)))
+	(if record
+	    (setcdr record (current-time))
+	  (puthash nick (cons (cons channel (current-time))
+			      chans)
+		   rcirc-nick-table))))))
 
 (defun rcirc-nick-remove (process nick)
   "Remove NICK from table."
@@ -1613,15 +1633,21 @@
   (propertize (or string "") 'face face 'rear-nonsticky t))
 
 (defvar rcirc-url-regexp
-  (rx word-boundary
-      (or "www."
-	  (and (or "http" "https" "ftp" "file" "gopher" "news" "telnet" "wais"
-		   "mailto")
-	       "://"
-	       (1+ (char "a-zA-Z0-9_."))
-	       (optional ":" (1+ (char "0-9")))))
-      (1+ (char "-a-zA-Z0-9_=!?#$\@~`%&*+|\\/:;.,{}[]"))
-      (char "-a-zA-Z0-9_=#$\@~`%&*+|\\/:;{}[]"))
+  (rx-to-string
+   `(and word-boundary
+	 (or "www."
+	     (and (or "http" "https" "ftp" "file" "gopher" "news" "telnet" 
+		      "wais" "mailto")
+		  "://"
+		  (1+ (char "-a-zA-Z0-9_."))
+		  (optional ":" (1+ (char "0-9"))))
+	     (and (1+ (char "-a-zA-Z0-9_."))
+		  (or ".com" ".net" ".org")
+		  word-boundary))
+	 (optional 
+	  (and "/"
+	       (1+ (char "-a-zA-Z0-9_=!?#$\@~`%&*+|\\/:;.,{}[]"))
+	       (char "-a-zA-Z0-9_=#$\@~`%&*+|\\/:;{}[]")))))
   "Regexp matching URLs.  Set to nil to disable URL features in rcirc.")
 
 (defun rcirc-browse-url (&optional arg)
--- a/lisp/progmodes/gdb-ui.el	Wed Feb 22 06:52:00 2006 +0000
+++ b/lisp/progmodes/gdb-ui.el	Wed Feb 22 06:54:10 2006 +0000
@@ -107,8 +107,10 @@
 (defvar gdb-current-language nil)
 (defvar gdb-var-list nil
  "List of variables in watch window.
-Each element has the form (EXPRESSION VARNUM NUMCHILD TYPE VALUE CHANGED-P).")
-(defvar gdb-var-changed nil "Non-nil means that `gdb-var-list' has changed.")
+Each element has the form (EXPRESSION VARNUM NUMCHILD TYPE VALUE STATUS) where
+STATUS is nil (unchanged), `changed' or `out-of-scope'.")
+(defvar gdb-force-update t
+ "Non-nil means that view of watch expressions will be updated in the speedbar.")
 (defvar gdb-main-file nil "Source file from which program execution begins.")
 (defvar gdb-overlay-arrow-position nil)
 (defvar gdb-server-prefix nil)
@@ -454,7 +456,7 @@
 	gdb-current-language nil
 	gdb-frame-number nil
 	gdb-var-list nil
-	gdb-var-changed nil
+	gdb-force-update t
 	gdb-first-post-prompt t
 	gdb-prompting nil
 	gdb-input-queue nil
@@ -540,7 +542,7 @@
 		  (forward-char 2)
 		  (gud-call (concat "until *%a")))))))))
 
-(defcustom gdb-speedbar-auto-raise t
+(defcustom gdb-speedbar-auto-raise nil
   "If non-nil raise speedbar every time display of watch expressions is\
  updated."
   :type 'boolean
@@ -608,8 +610,7 @@
 		      (nth 1 var) "\"\n")
 	    (concat "-var-evaluate-expression " (nth 1 var) "\n"))
 	  `(lambda () (gdb-var-evaluate-expression-handler
-		       ,(nth 1 var) nil))))
-	(setq gdb-var-changed t))
+		       ,(nth 1 var) nil)))))
     (if (search-forward "Undefined command" nil t)
 	(message-box "Watching expressions requires gdb 6.0 onwards")
       (message "No symbol \"%s\" in current context." expr))))
@@ -618,16 +619,11 @@
   (goto-char (point-min))
   (re-search-forward ".*value=\\(\".*\"\\)" nil t)
   (catch 'var-found
-    (let ((num 0))
-      (dolist (var gdb-var-list)
-	(if (string-equal varnum (cadr var))
-	    (progn
-	      (if changed (setcar (nthcdr 5 var) t))
-	      (setcar (nthcdr 4 var) (read (match-string 1)))
-	      (setcar (nthcdr num gdb-var-list) var)
-	      (throw 'var-found nil)))
-	(setq num (+ num 1)))))
-  (setq gdb-var-changed t))
+    (dolist (var gdb-var-list)
+      (when (string-equal varnum (cadr var))
+	(if changed (setcar (nthcdr 5 var) 'changed))
+	(setcar (nthcdr 4 var) (read (match-string 1)))
+	(throw 'var-found nil)))))
 
 (defun gdb-var-list-children (varnum)
   (gdb-enqueue-input
@@ -676,17 +672,22 @@
 (defconst gdb-var-update-regexp "name=\"\\(.*?\\)\",in_scope=\"\\(.*?\\)\"")
 
 (defun gdb-var-update-handler ()
+  (dolist (var gdb-var-list)
+    (setcar (nthcdr 5 var) nil))
   (goto-char (point-min))
   (while (re-search-forward gdb-var-update-regexp nil t)
-    (catch 'var-found-1
-      (let ((varnum (match-string 1)))
-	(dolist (var gdb-var-list)
-	  (gdb-enqueue-input
-	   (list
-	    (concat "server interpreter mi \"-var-evaluate-expression "
-		    varnum "\"\n")
-	    `(lambda () (gdb-var-evaluate-expression-handler ,varnum t))))
-	  (throw 'var-found-1 nil)))))
+    (let ((varnum (match-string 1)))
+      (if  (string-equal (match-string 2) "false")
+	  (catch 'var-found
+	    (dolist (var gdb-var-list)
+	      (when (string-equal varnum (cadr var))
+		(setcar (nthcdr 5 var) 'out-of-scope)
+		(throw 'var-found nil))))
+	(gdb-enqueue-input
+	 (list
+	  (concat "server interpreter mi \"-var-evaluate-expression "
+		  varnum "\"\n")
+	  `(lambda () (gdb-var-evaluate-expression-handler ,varnum t)))))))
   (setq gdb-pending-triggers
 	(delq 'gdb-var-update gdb-pending-triggers))
   (when (and (boundp 'speedbar-frame) (frame-live-p speedbar-frame))
@@ -722,8 +723,7 @@
 	    (setq gdb-var-list (delq var gdb-var-list))
 	    (dolist (varchild gdb-var-list)
 	      (if (string-match (concat (nth 1 var) "\\.") (nth 1 varchild))
-		  (setq gdb-var-list (delq varchild gdb-var-list))))
-	    (setq gdb-var-changed t))))))
+		  (setq gdb-var-list (delq varchild gdb-var-list)))))))))
 
 (defun gdb-edit-value (text token indent)
   "Assign a value to a variable displayed in the speedbar."
@@ -739,8 +739,9 @@
 	   'ignore))))
 
 (defcustom gdb-show-changed-values t
-  "If non-nil highlight values that have recently changed in the speedbar.
-The highlighting is done with `font-lock-warning-face'."
+  "If non-nil change the face of out of scope variables and changed values.
+Out of scope variables are suppressed with `shadow' face.
+Changed values are highlighted with the face `font-lock-warning-face'."
   :type 'boolean
   :group 'gud
   :version "22.1")
@@ -760,7 +761,7 @@
 	 (dolist (var gdb-var-list)
 	   (if (string-match (concat token "\\.") (nth 1 var))
 	       (setq gdb-var-list (delq var gdb-var-list))))
-	 (setq gdb-var-changed t)
+	 (setq gdb-force-update t)
 	 (with-current-buffer gud-comint-buffer
 	   (speedbar-timer-fn)))))
 
@@ -1214,8 +1215,7 @@
       ;; FIXME: with GDB-6 on Darwin, this might very well work.
       ;; Only needed/used with speedbar/watch expressions.
       (when (and (boundp 'speedbar-frame) (frame-live-p speedbar-frame))
-	(dolist (var gdb-var-list)
-	  (setcar (nthcdr 5 var) nil))
+	(setq gdb-force-update t)
 	(if (string-equal gdb-version "pre-6.4")
 	    (gdb-var-update)
 	  (gdb-var-update-1)))))
@@ -2626,6 +2626,8 @@
     (setq gdb-overlay-arrow-position nil))
   (setq overlay-arrow-variable-list
 	(delq 'gdb-overlay-arrow-position overlay-arrow-variable-list))
+  (if (and (boundp 'speedbar-frame) (frame-live-p speedbar-frame))
+      (speedbar-refresh))
   (setq gud-running nil)
   (setq gdb-active-process nil)
   (setq gdb-var-list nil)
@@ -3022,7 +3024,6 @@
 			(throw 'child-already-watched nil)))
 		  (push varchild var-list))))
 	  (push var var-list)))
-      (setq gdb-var-changed t)
       (setq gdb-var-list (nreverse var-list)))))
 
 ; Uses "-var-update --all-values".  Needs GDB 6.4 onwards.
@@ -3041,23 +3042,20 @@
   "name=\"\\(.*?\\)\",\\(?:value=\\(\".*?\"\\),\\)?in_scope=\"\\(.*?\\)\"")
 
 (defun gdb-var-update-handler-1 ()
+  (dolist (var gdb-var-list)
+    (setcar (nthcdr 5 var) nil))
   (goto-char (point-min))
   (while (re-search-forward gdb-var-update-regexp-1 nil t)
     (let ((varnum (match-string 1)))
-      (catch 'var-found1
-	(let ((num 0))
-	  (dolist (var gdb-var-list)
-	    (if (string-equal varnum (cadr var))
-		(progn
-		  (setcar (nthcdr 5 var) t)
-		  (setcar (nthcdr 4 var)
-			  (if (string-equal (match-string 3) "true")
-			      (read (match-string 2))
-			    "*changed*"))
-		  (setcar (nthcdr num gdb-var-list) var)
-		  (throw 'var-found1 nil)))
-	    (setq num (+ num 1))))))
-    (setq gdb-var-changed t))
+      (catch 'var-found
+	(dolist (var gdb-var-list)
+	  (when (string-equal varnum (cadr var))
+	    (if (string-equal (match-string 3) "false")
+		(setcar (nthcdr 5 var) 'out-of-scope)
+	      (setcar (nthcdr 5 var) 'changed)
+	      (setcar (nthcdr 4 var)
+		      (read (match-string 2))))
+	    (throw 'var-found nil))))))
   (setq gdb-pending-triggers
    (delq 'gdb-var-update gdb-pending-triggers))
   (when (and (boundp 'speedbar-frame) (frame-live-p speedbar-frame))
--- a/lisp/progmodes/gud.el	Wed Feb 22 06:52:00 2006 +0000
+++ b/lisp/progmodes/gud.el	Wed Feb 22 06:54:10 2006 +0000
@@ -43,14 +43,13 @@
 (eval-when-compile (require 'cl)) ; for case macro
 
 (require 'comint)
-(require 'font-lock)
 
 (defvar gdb-active-process)
 (defvar gdb-define-alist)
 (defvar gdb-macro-info)
 (defvar gdb-server-prefix)
 (defvar gdb-show-changed-values)
-(defvar gdb-var-changed)
+(defvar gdb-force-update)
 (defvar gdb-var-list)
 (defvar gdb-speedbar-auto-raise)
 (defvar tool-bar-map)
@@ -444,7 +443,7 @@
 	  (p (window-point window)))
       (cond
        ((memq minor-mode '(gdbmi gdba))
-	(when (or gdb-var-changed
+	(when (or gdb-force-update
 		  (not (save-excursion
 			 (goto-char (point-min))
 			 (let ((case-fold-search t))
@@ -453,51 +452,68 @@
 	  (insert "Watch Expressions:\n")
 	  (if gdb-speedbar-auto-raise
 	      (raise-frame speedbar-frame))
-	  (let ((var-list gdb-var-list))
+	  (let ((var-list gdb-var-list) parent)
 	    (while var-list
-	      (let* (char (depth 0) (start 0)
-		     (var (car var-list)) (varnum (nth 1 var)))
+	      (let* (char (depth 0) (start 0) (var (car var-list))
+			  (expr (car var)) (varnum (nth 1 var))
+			  (type (nth 3 var)) (status (nth 5 var)))
+		(put-text-property
+		 0 (length expr) 'face font-lock-variable-name-face expr)
+		(put-text-property
+		 0 (length type) 'face font-lock-type-face type)
 		(while (string-match "\\." varnum start)
 		  (setq depth (1+ depth)
 			start (1+ (match-beginning 0))))
+		(if (eq depth 0) (setq parent nil))
 		(if (or (equal (nth 2 var) "0")
 			(and (equal (nth 2 var) "1")
-			     (string-match "char \\*$" (nth 3 var))))
-		    (speedbar-make-tag-line 'bracket ?? nil nil
-					    (concat (car var) "\t" (nth 4 var))
-					    'gdb-edit-value
-					    nil
-					    (if (and (nth 5 var)
-						     gdb-show-changed-values)
-						'font-lock-warning-face
-					      nil) depth)
+			     (string-match "char \\*$" type)))
+		    (speedbar-make-tag-line
+		     'bracket ?? nil nil
+		     (concat expr "\t" (nth 4 var))
+		     (if (or parent (eq status 'out-of-scope))
+			 nil 'gdb-edit-value)
+		     nil
+		     (if gdb-show-changed-values
+			 (or parent (case status
+				      (changed 'font-lock-warning-face)
+				      (out-of-scope 'shadow)
+				      (t t)))
+		       t)
+		     depth)
+		  (if (eq status 'out-of-scope) (setq parent 'shadow))
 		  (if (and (cadr var-list)
 			   (string-match (concat varnum "\\.")
 					 (cadr (cadr var-list))))
 		      (setq char ?-)
 		    (setq char ?+))
-		  (if (string-match "\\*$" (nth 3 var))
-		      (speedbar-make-tag-line 'bracket char
-					      'gdb-speedbar-expand-node varnum
-					      (concat (car var) "\t"
-						      (nth 3 var)"\t"
-						      (nth 4 var))
-					      'gdb-edit-value nil
-					      (if (and (nth 5 var)
-						       gdb-show-changed-values)
-						  'font-lock-warning-face
-						nil) depth)
-		  (speedbar-make-tag-line 'bracket char
-					  'gdb-speedbar-expand-node varnum
-					  (concat (car var) "\t" (nth 3 var))
-					  nil nil nil depth))))
+		  (if (string-match "\\*$" type)
+		      (speedbar-make-tag-line
+		       'bracket char
+		       'gdb-speedbar-expand-node varnum
+		       (concat expr "\t"
+			       type "\t"
+			       (nth 4 var))
+		       (if (or parent status 'out-of-scope)
+			 nil 'gdb-edit-value)
+		       nil
+		       (if (and (or parent status) gdb-show-changed-values)
+			   'shadow t)
+		       depth)
+		    (speedbar-make-tag-line
+		     'bracket char
+		     'gdb-speedbar-expand-node varnum
+		     (concat expr "\t" type)
+		     nil nil
+		     (if (and (or parent status) gdb-show-changed-values)
+			 'shadow t)
+		     depth))))
 	      (setq var-list (cdr var-list))))
-	  (setq gdb-var-changed nil)))
-       (t (if (and (save-excursion
-		     (goto-char (point-min))
-		     (looking-at "Current Stack:"))
-		   (equal gud-last-last-frame gud-last-speedbar-stackframe))
-	      nil
+	  (setq gdb-force-update nil)))
+       (t (unless (and (save-excursion
+			 (goto-char (point-min))
+			 (looking-at "Current Stack:"))
+		       (equal gud-last-last-frame gud-last-speedbar-stackframe))
 	    (let ((gud-frame-list
 	    (cond ((eq minor-mode 'gdb)
 		   (gud-gdb-get-stackframe buffer))
--- a/lisp/progmodes/sh-script.el	Wed Feb 22 06:52:00 2006 +0000
+++ b/lisp/progmodes/sh-script.el	Wed Feb 22 06:54:10 2006 +0000
@@ -1438,6 +1438,16 @@
 		 ((and buffer-file-name
 		       (string-match "\\.m?spec\\'" buffer-file-name))
 		  "rpm")))))
+    (unless interpreter
+      (setq interpreter
+	    (cond ((string-match "[.]sh\\>" buffer-file-name)
+		   "sh")
+		  ((string-match "[.]bash\\>" buffer-file-name)
+		   "bash")
+		  ((string-match "[.]ksh\\>" buffer-file-name)
+		   "ksh")
+		  ((string-match "[.]csh\\>" buffer-file-name)
+		   "csh"))))
     (sh-set-shell (or interpreter sh-shell-file) nil nil))
   (run-mode-hooks 'sh-mode-hook))
 
--- a/lisp/sort.el	Wed Feb 22 06:52:00 2006 +0000
+++ b/lisp/sort.el	Wed Feb 22 06:54:10 2006 +0000
@@ -499,8 +499,9 @@
 	  ;; in the region, since the sort utility would lose the
 	  ;; properties.
 	  (let ((sort-args (list (if reverse "-rt\n" "-t\n")
-				 (concat "+0." (int-to-string col-start))
-				 (concat "-0." (int-to-string col-end)))))
+				 (format "-k1.%d,1.%d"
+					 (1+ col-start)
+					 (1+ col-end)))))
 	    (when sort-fold-case
 	      (push "-f" sort-args))
 	    (apply #'call-process-region beg1 end1 "sort" t t nil sort-args))
--- a/lisp/speedbar.el	Wed Feb 22 06:52:00 2006 +0000
+++ b/lisp/speedbar.el	Wed Feb 22 06:54:10 2006 +0000
@@ -1708,9 +1708,13 @@
 (defun speedbar-make-button (start end face mouse function &optional token)
   "Create a button from START to END, with FACE as the display face.
 MOUSE is the mouse face.  When this button is clicked on FUNCTION
-will be run with the TOKEN parameter (any Lisp object)"
+will be run with the TOKEN parameter (any Lisp object).  If FACE
+is t use the text properties of the string that is passed as an
+argument."
+  (unless (eq face t)
+    (put-text-property start end 'face face))
   (add-text-properties
-   start end `(face ,face mouse-face ,mouse invisible nil
+   start end `(mouse-face ,mouse invisible nil
                speedbar-text ,(buffer-substring-no-properties start end)))
   (if speedbar-use-tool-tips-flag
       (put-text-property start end 'help-echo #'dframe-help-echo))
--- a/lisp/textmodes/ispell.el	Wed Feb 22 06:52:00 2006 +0000
+++ b/lisp/textmodes/ispell.el	Wed Feb 22 06:54:10 2006 +0000
@@ -508,11 +508,7 @@
 			       (const "~nroff") (const "~list")
 			       (const "~latin1") (const "~latin3")
  			       (const :tag "default" nil))
-		       (choice :tag "Coding system"
-			       (const iso-8859-1)
-			       (const iso-8859-2)
-			       (const koi8-r)
-			       (const windows-1251))))
+		       (coding-system :tag "Coding System")))
   :group 'ispell)
 
 
@@ -570,10 +566,10 @@
  '(("esperanto"
     "[A-Za-z\246\254\266\274\306\330\335\336\346\370\375\376]"
     "[^A-Za-z\246\254\266\274\306\330\335\336\346\370\375\376]"
-    "[-']" t ("-C") "~latin3" iso-8859-1)
+    "[-']" t ("-C") "~latin3" iso-8859-3)
    ("esperanto-tex"
     "[A-Za-z^\\]" "[^A-Za-z^\\]"
-    "[-'`\"]" t ("-C" "-d" "esperanto") "~tex" iso-8859-1)
+    "[-'`\"]" t ("-C" "-d" "esperanto") "~tex" iso-8859-3)
    ("francais7"
     "[A-Za-z]" "[^A-Za-z]" "[`'^---]" t nil nil iso-8859-1)
    ("francais"				; Francais.aff
@@ -2574,7 +2570,7 @@
 	       (mapcar 'list (ispell-valid-dictionary-list)))
 	  nil t)
 	 current-prefix-arg))
-  (unless arg (ispell-accept-buffer-local-defs))
+  (unless arg (ispell-buffer-local-dict))
   (if (equal dict "default") (setq dict nil))
   ;; This relies on completing-read's bug of returning "" for no match
   (cond ((equal dict "")
--- a/lisp/url/ChangeLog	Wed Feb 22 06:52:00 2006 +0000
+++ b/lisp/url/ChangeLog	Wed Feb 22 06:54:10 2006 +0000
@@ -1,3 +1,13 @@
+2006-02-20  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* url.el (url-redirect-buffer): New var.
+	(url-retrieve-synchronously): Use it to follow redirections.
+
+	* url-http.el: Require `url' rather than try to autoload parts of it.
+	(url-http-find-free-connection): `url-open-stream' needs a real buffer.
+	(url-http-parse-headers): Set `url-redirect-buffer' when following
+	a redirection reply.
+
 2006-01-18  Stefan Monnier  <monnier@iro.umontreal.ca>
 
 	* url-news.el: Move defvars out of eval-when-compile.
@@ -18,7 +28,7 @@
 	(url-history-save-history): Create parent dir if necessary.
 	(url-history-save-history): Don't write the initialization of
 	url-history-hash-table into the history file.
-	(url-have-visited-url): Simplify since url-history-hash-table is non-nil.
+	(url-have-visited-url): Simplify since url-history-hash-table isn't nil.
 	(url-completion-function): Simplify.
 
 	* url-cookie.el (url-cookie-parse-file): Don't complain of missing file.
--- a/lisp/url/url-http.el	Wed Feb 22 06:52:00 2006 +0000
+++ b/lisp/url/url-http.el	Wed Feb 22 06:54:10 2006 +0000
@@ -1,6 +1,6 @@
 ;;; url-http.el --- HTTP retrieval routines
 
-;; Copyright (C) 1999, 2001, 2004, 2005, 2006 Free Software Foundation, Inc.
+;; Copyright (C) 1999, 2001, 2004, 2005, 2006  Free Software Foundation, Inc.
 
 ;; Author: Bill Perry <wmperry@gnu.org>
 ;; Keywords: comm, data, processes
@@ -35,10 +35,8 @@
 (require 'url-cookie)
 (require 'mail-parse)
 (require 'url-auth)
-(autoload 'url-retrieve-synchronously "url")
-(autoload 'url-retrieve "url")
+(require 'url)
 (autoload 'url-cache-create-filename "url-cache")
-(autoload 'url-mark-buffer-as-dead "url")
 
 (defconst url-http-default-port 80 "Default HTTP port.")
 (defconst url-http-asynchronous-p t "HTTP retrievals are asynchronous.")
@@ -57,15 +55,13 @@
 This is only useful when debugging the HTTP subsystem.
 
 Setting this to 1.0 will tell servers not to send chunked encoding,
-and other HTTP/1.1 specific features.
-")
+and other HTTP/1.1 specific features.")
 
 (defvar url-http-attempt-keepalives t
   "Whether to use a single TCP connection multiple times in HTTP.
 This is only useful when debugging the HTTP subsystem.  Setting to
-`nil' will explicitly close the connection to the server after every
-request.
-")
+nil will explicitly close the connection to the server after every
+request.")
 
 ;(eval-when-compile
 ;; These are all macros so that they are hidden from external sight
@@ -119,10 +115,14 @@
 	(url-http-debug "Reusing existing connection: %s:%d" host port)
       (url-http-debug "Contacting host: %s:%d" host port))
     (url-lazy-message "Contacting host: %s:%d" host port)
-    (url-http-mark-connection-as-busy host port
-				      (or found
-					  (url-open-stream host nil host
-							   port)))))
+    (url-http-mark-connection-as-busy
+     host port
+     (or found
+         (let ((buf (generate-new-buffer " *url-http-temp*")))
+           ;; `url-open-stream' needs a buffer in which to do things
+           ;; like authentication.  But we use another buffer afterwards.
+           (unwind-protect (url-open-stream host buf host port)
+             (kill-buffer buf)))))))
 
 ;; Building an HTTP request
 (defun url-http-user-agent-string ()
@@ -346,7 +346,7 @@
 
 (defun url-http-handle-cookies ()
   "Handle all set-cookie / set-cookie2 headers in an HTTP response.
-The buffer must already be narrowed to the headers, so mail-fetch-field will
+The buffer must already be narrowed to the headers, so `mail-fetch-field' will
 work correctly."
   (let ((cookies (mail-fetch-field "Set-Cookie" nil nil t))
 	(cookies2 (mail-fetch-field "Set-Cookie2" nil nil t))
@@ -509,10 +509,17 @@
            (let ((url-request-method url-http-method)
 		 (url-request-data url-http-data)
 		 (url-request-extra-headers url-http-extra-headers))
-	     (url-retrieve redirect-uri url-callback-function
-			   (cons :redirect
-				 (cons redirect-uri
-				       url-callback-arguments)))
+             ;; Put in the current buffer a forwarding pointer to the new
+             ;; destination buffer.
+             ;; FIXME: This is a hack to fix url-retrieve-synchronously
+             ;; without changing the API.  Instead url-retrieve should
+             ;; either simply not return the "destination" buffer, or it
+             ;; should take an optional `dest-buf' argument.
+             (set (make-local-variable 'url-redirect-buffer)
+                  (url-retrieve redirect-uri url-callback-function
+                                (cons :redirect
+                                      (cons redirect-uri
+                                            url-callback-arguments))))
 	     (url-mark-buffer-as-dead (current-buffer))))))
       (4				; Client error
        ;; 400 Bad Request
@@ -1156,7 +1163,7 @@
 
 ;;;###autoload
 (defun url-http-options (url)
-  "Returns a property list describing options available for URL.
+  "Return a property list describing options available for URL.
 This list is retrieved using the `OPTIONS' HTTP method.
 
 Property list members:
@@ -1179,8 +1186,7 @@
   The `Platform For Privacy Protection' description for the resource.
   Currently this is just the raw header contents.  This is likely to
   change once P3P is formally supported by the URL package or
-  Emacs/W3.
-"
+  Emacs/W3."
   (let* ((url-request-method "OPTIONS")
 	 (url-request-data nil)
 	 (buffer (url-retrieve-synchronously url))
--- a/lisp/url/url.el	Wed Feb 22 06:52:00 2006 +0000
+++ b/lisp/url/url.el	Wed Feb 22 06:54:10 2006 +0000
@@ -114,6 +114,13 @@
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;; Retrieval functions
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(defvar url-redirect-buffer nil
+  "New buffer into which the retrieval will take place.
+Sometimes while retrieving a URL, the URL library needs to use another buffer
+than the one returned initially by `url-retrieve'.  In this case, it sets this
+variable in the original buffer as a forwarding pointer.")
+
 ;;;###autoload
 (defun url-retrieve (url callback &optional cbargs)
   "Retrieve URL asynchronously and call CALLBACK with CBARGS when finished.
@@ -189,18 +196,22 @@
 	  (url-debug 'retrieval
 		     "Spinning in url-retrieve-synchronously: %S (%S)"
 		     retrieval-done asynch-buffer)
-	  (if (and proc (memq (process-status proc)
-                              '(closed exit signal failed))
-                   ;; Make sure another process hasn't been started, as can
-                   ;; happen with http redirections.
-		   (eq proc (or (get-buffer-process asynch-buffer) proc)))
-	      ;; FIXME: It's not clear whether url-retrieve's callback is
-	      ;; guaranteed to be called or not.  It seems that url-http
-	      ;; decides sometimes consciously not to call it, so it's not
-	      ;; clear that it's a bug, but even then we need to decide how
-	      ;; url-http can then warn us that the download has completed.
-              ;; In the mean time, we use this here workaround.
-              (setq retrieval-done t)
+          (if (buffer-local-value 'url-redirect-buffer asynch-buffer)
+              (setq proc (get-buffer-process
+                          (setq asynch-buffer
+                                (buffer-local-value 'url-redirect-buffer
+                                                    asynch-buffer))))
+            (if (and proc (memq (process-status proc)
+                                '(closed exit signal failed))
+                     ;; Make sure another process hasn't been started.
+                     (eq proc (or (get-buffer-process asynch-buffer) proc)))
+                ;; FIXME: It's not clear whether url-retrieve's callback is
+                ;; guaranteed to be called or not.  It seems that url-http
+                ;; decides sometimes consciously not to call it, so it's not
+                ;; clear that it's a bug, but even then we need to decide how
+                ;; url-http can then warn us that the download has completed.
+                ;; In the mean time, we use this here workaround.
+                (setq retrieval-done t))
             ;; We used to use `sit-for' here, but in some cases it wouldn't
             ;; work because apparently pending keyboard input would always
             ;; interrupt it before it got a chance to handle process input.
--- a/lispref/ChangeLog	Wed Feb 22 06:52:00 2006 +0000
+++ b/lispref/ChangeLog	Wed Feb 22 06:54:10 2006 +0000
@@ -1,4 +1,40 @@
-2006-02-16 Johan Bockg,AC%(Brd <bojohan+mail@dd.chalmers.se> (tiny change)
+2006-02-21  Giorgos Keramidas  <keramida@ceid.upatras.gr>  (tiny change)
+
+	* display.texi (Fringe Indicators, Fringe Cursors): Fix typos.
+
+	* windows.texi (Window Tree): Fix typo.
+
+2006-02-20  Kim F. Storm  <storm@cua.dk>
+
+	* display.texi (Fringe Indicators): New section.
+	Move indicate-empty-lines, indicate-buffer-boundaries, and
+	default-indicate-buffer-boundaries here.
+	Add fringe-indicator-alist and default-fringes-indicator-alist.
+	Add list of logical fringe indicator symbols.
+	Update list of standard bitmap names.
+	(Fringe Cursors): New section.
+	Move overflow-newline-into-fringe here.
+	Add fringe-cursor-alist and default-fringes-cursor-alist.
+	Add list of fringe cursor symbols.
+
+2006-02-20  Juanma Barranquero  <lekktu@gmail.com>
+
+	* commands.texi (Using Interactive): Fix reference to node
+	"Minibuffers".
+
+2006-02-19  Richard M. Stallman  <rms@gnu.org>
+
+	* minibuf.texi (High-Level Completion):
+	Add xref to read-input-method-name.
+
+	* files.texi (Relative File Names): Move file-relative-name here.
+	(File Name Expansion): From here.  Minor clarifications.
+
+	* commands.texi (Using Interactive): Add xrefs about reading input.
+	Clarify remarks about that moving point and mark.
+	Put string case before list case.
+
+2006-02-16  Johan Bockg,Ae(Brd  <bojohan@dd.chalmers.se>
 
 	* display.texi (Other Display Specs, Image Descriptors): Revert
 	erroneous changes.  The previous description of image-descriptors
--- a/lispref/commands.texi	Wed Feb 22 06:52:00 2006 +0000
+++ b/lispref/commands.texi	Wed Feb 22 06:54:10 2006 +0000
@@ -151,37 +151,6 @@
 or more arguments.
 
 @item
-It may be a Lisp expression that is not a string; then it should be a
-form that is evaluated to get a list of arguments to pass to the
-command.
-@cindex argument evaluation form
-
-If this expression reads keyboard input (this includes using the
-minibuffer), keep in mind that the integer value of point or the mark
-before reading input may be incorrect after reading input.  This is
-because the current buffer may be receiving subprocess output;
-if subprocess output arrives while the command is waiting for input,
-it could relocate point and the mark.
-
-Here's an example of what @emph{not} to do:
-
-@smallexample
-(interactive
- (list (region-beginning) (region-end)
-       (read-string "Foo: " nil 'my-history)))
-@end smallexample
-
-@noindent
-Here's how to avoid the problem, by examining point and the mark only
-after reading the keyboard input:
-
-@smallexample
-(interactive
- (let ((string (read-string "Foo: " nil 'my-history)))
-   (list (region-beginning) (region-end) string)))
-@end smallexample
-
-@item
 @cindex argument prompt
 It may be a string; then its contents should consist of a code character
 followed by a prompt (which some code characters use and some ignore).
@@ -231,6 +200,39 @@
 Actual reading of arguments is controlled by the rest of the prompt
 string (starting with the first character that is not @samp{*} or
 @samp{@@}).
+
+@item
+It may be a Lisp expression that is not a string; then it should be a
+form that is evaluated to get a list of arguments to pass to the
+command.  Usually this form will call various functions to read input
+from the user, most often through the minibuffer (@pxref{Minibuffers})
+or directly from the keyboard (@pxref{Reading Input}).
+@cindex argument evaluation form
+
+Providing point or the mark as an argument value is also common, but
+if you do this @emph{and} read input (whether using the minibuffer or
+not), be sure to get the integer values of point or the mark after
+reading.  The current buffer may be receiving subprocess output; if
+subprocess output arrives while the command is waiting for input, it
+could relocate point and the mark.
+
+Here's an example of what @emph{not} to do:
+
+@smallexample
+(interactive
+ (list (region-beginning) (region-end)
+       (read-string "Foo: " nil 'my-history)))
+@end smallexample
+
+@noindent
+Here's how to avoid the problem, by examining point and the mark after
+reading the keyboard input:
+
+@smallexample
+(interactive
+ (let ((string (read-string "Foo: " nil 'my-history)))
+   (list (region-beginning) (region-end) string)))
+@end smallexample
 @end itemize
 
 @cindex examining the @code{interactive} form
--- a/lispref/display.texi	Wed Feb 22 06:52:00 2006 +0000
+++ b/lispref/display.texi	Wed Feb 22 06:54:10 2006 +0000
@@ -2722,7 +2722,9 @@
 
 @menu
 * Fringe Size/Pos::     Specifying where to put the window fringes.
-* Fringe Bitmaps::      Displaying bitmaps in the window fringes.
+* Fringe Indicators::   Displaying indicator icons in the window fringes.
+* Fringe Cursors::      Displaying cursors in the right fringe.
+* Fringe Bitmaps::      Specifying bitmaps for fringe indicators.
 * Customizing Bitmaps:: Specifying your own bitmaps to use in the fringes.
 * Overlay Arrow::       Display of an arrow to indicate position.
 @end menu
@@ -2774,6 +2776,151 @@
 @var{right-width} @var{outside-margins})}.
 @end defun
 
+
+@node Fringe Indicators
+@subsection Fringe Indicators
+@cindex fringe indicators
+@cindex indicators, fringe
+
+  The @dfn{fringe indicators} are tiny icons Emacs displays in the
+window fringe (on a graphic display) to indicate truncated or
+continued lines, buffer boundaries, overlay arrow, etc.
+
+@defopt indicate-empty-lines
+@tindex indicate-empty-lines
+@cindex fringes, and empty line indication
+When this is non-@code{nil}, Emacs displays a special glyph in the
+fringe of each empty line at the end of the buffer, on graphical
+displays.  @xref{Fringes}.  This variable is automatically
+buffer-local in every buffer.
+@end defopt
+
+@defvar indicate-buffer-boundaries
+This buffer-local variable controls how the buffer boundaries and
+window scrolling are indicated in the window fringes.
+
+Emacs can indicate the buffer boundaries---that is, the first and last
+line in the buffer---with angle icons when they appear on the screen.
+In addition, Emacs can display an up-arrow in the fringe to show
+that there is text above the screen, and a down-arrow to show
+there is text below the screen.
+
+There are four kinds of basic values:
+
+@table @asis
+@item @code{nil}
+Don't display the icons.
+@item @code{left}
+Display them in the left fringe.
+@item @code{right}
+Display them in the right fringe.
+@item @var{anything-else}
+Display the icon at the top of the window top in the left fringe, and other
+in the right fringe.
+@end table
+
+If value is a cons @code{(@var{angles} . @var{arrows})}, @var{angles}
+controls the angle icons, and @var{arrows} controls the arrows.  Both
+@var{angles} and @var{arrows} work according to the table above.
+Thus, @code{(t .  right)} places the top angle icon in the left
+fringe, the bottom angle icon in the right fringe, and both arrows in
+the right fringe.
+@end defvar
+
+@defvar default-indicate-buffer-boundaries
+The value of this variable is the default value for
+@code{indicate-buffer-boundaries} in buffers that do not override it.
+@end defvar
+
+@defvar fringe-indicator-alist
+This buffer-local variable specifies the mapping from logical fringe
+indicators to the actual bitmaps displayed in the window fringes.
+
+These symbols identify the logical fringe indicators:
+
+@table @asis
+@item Truncation and continuation line indicators:
+@code{truncation}, @code{continuation}.
+
+@item Buffer position indicators:
+@code{up}, @code{down},
+@code{top}, @code{bottom},
+@code{top-bottom}.
+
+@item Empty line indicator:
+@code{empty-line}.
+
+@item Overlay arrow indicator:
+@code{overlay-arrow}.
+
+@item Unknown bitmap indicator:
+@code{unknown}.
+@end table
+
+  The value is an alist where each element @code{(@var{indicator} . @var{bitmaps})}
+specifies the fringe bitmaps used to display a specific logical
+fringe indicator.
+
+Here, @var{indicator} specifies the logical indicator type, and
+@var{bitmaps} is list of symbols @code{(@var{left} @var{right}
+[@var{left1} @var{right1}])} which specifies the actual bitmap shown
+in the left or right fringe for the logical indicator.
+
+The @var{left} and @var{right} symbols specify the bitmaps shown in
+the left and/or right fringe for the specific indicator.  The
+@var{left1} or @var{right1} bitmaps are used only for the `bottom' and
+`top-bottom indicators when the last (only) line in has no final
+newline.  Alternatively, @var{bitmaps} may be a single symbol which is
+used in both left and right fringes.
+
+When @code{fringe-indicator-alist} has a buffer-local value, and there
+is no bitmap defined for a logical indicator, or the bitmap is
+@code{t}, the corresponding value from the (non-local)
+@code{default-fringes-indicator-alist} is used.
+
+To completely hide a specific indicator, set the bitmap to @code{nil}.
+@end defvar
+
+@defvar default-fringes-indicator-alist
+The value of this variable is the default value for
+@code{fringe-indicator-alist} in buffers that do not override it.
+@end defvar
+
+@table @asis
+@item Standard fringe bitmaps for indicators:
+@code{left-arrow}, @code{right-arrow}, @code{up-arrow}, @code{down-arrow},
+@code{left-curly-arrow}, @code{right-curly-arrow},
+@code{left-triangle}, @code{right-triangle},
+@code{top-left-angle}, @code{ top-right-angle},
+@code{bottom-left-angle}, @code{bottom-right-angle},
+@code{left-bracket}, @code{right-bracket},
+@code{filled-rectangle}, @code{hollow-rectangle},
+@code{filled-square}, @code{hollow-square},
+@code{vertical-bar}, @code{horizontal-bar},
+@code{empty-line},
+@code{question-mark}.
+@end table
+
+@node Fringe Cursors
+@subsection Fringe Cursors
+@cindex fringe cursors
+@cindex cursor, fringe
+
+  When a line is exactly as wide as the window, Emacs displays the
+cursor in the right fringe instead of using two lines.  Different
+bitmaps are used to represent the cursor in the fringe depending on
+the current buffer's cursor type.
+
+@table @asis
+@item Logical cursor types:
+@code{box} , @code{hollow}, @code{bar},
+@code{hbar}, @code{hollow-small}.
+@end table
+
+The @code{hollow-small} type is used instead of @code{hollow} when the
+normal @code{hollow-rectangle} bitmap is too tall to fit on a specific
+display line.
+
 @defvar overflow-newline-into-fringe
 If this is non-@code{nil}, lines exactly as wide as the window (not
 counting the final newline character) are not continued.  Instead,
@@ -2781,16 +2928,44 @@
 fringe.
 @end defvar
 
+@defvar fringe-cursor-alist
+This variable specifies the mapping from logical cursor type to the
+actual fringe bitmaps displayed in the right fringe.  The value is an
+alist where each element @code{(@var{cursor}. @var{bitmap})} specifies
+the fringe bitmaps used to display a specific logical cursor type in
+the fringe.  Here, @var{cursor} specifies the logical cursor type and
+@var{bitmap} is a symbol specifying the fringe bitmap to be displayed
+for that logical cursor type.
+
+When @code{fringe-cursor-alist} has a buffer-local value, and there is
+no bitmap defined for a cursor type, the corresponding value from the
+(non-local) @code{default-fringes-indicator-alist} is used.
+@end defvar
+
+@defvar default-fringes-cursor-alist
+The value of this variable is the default value for
+@code{fringe-cursor-alist} in buffers that do not override it.
+@end defvar
+
+@table @asis
+@item Standard bitmaps for displaying the cursor in right fringe:
+@code{filled-rectangle}, @code{hollow-rectangle},
+@code{filled-square}, @code{hollow-square},
+@code{vertical-bar}, @code{horizontal-bar}.
+@end table
+
+
 @node Fringe Bitmaps
 @subsection Fringe Bitmaps
 @cindex fringe bitmaps
 @cindex bitmaps, fringe
 
-  The @dfn{fringe bitmaps} are tiny icons Emacs displays in the window
-fringe (on a graphic display) to indicate truncated or continued
-lines, buffer boundaries, overlay arrow, etc.  The fringe bitmaps are
-shared by all frames and windows.  You can redefine the built-in
-fringe bitmaps, and you can define new fringe bitmaps.
+  The @dfn{fringe bitmaps} are the actual bitmaps which represent the
+logical fringe indicators for truncated or continued lines, buffer
+boundaries, overlay arrow, etc.  Fringe bitmap symbols have their own
+name space.  The fringe bitmaps are shared by all frames and windows.
+You can redefine the built-in fringe bitmaps, and you can define new
+fringe bitmaps.
 
   The way to display a bitmap in the left or right fringes for a given
 line in a window is by specifying the @code{display} property for one
@@ -2804,32 +2979,6 @@
 the @code{fringe} face, so normally @var{face} need only specify the
 foreground color for the bitmap.
 
-  These symbols identify the standard fringe bitmaps.  Evaluate
-@code{(require 'fringe)} to define them.  Fringe bitmap symbols have
-their own name space.
-
-@table @asis
-@item Truncation and continuation line bitmaps:
-@code{left-truncation}, @code{right-truncation},
-@code{continued-line}, @code{continuation-line}.
-
-@item Buffer indication bitmaps:
-@code{up-arrow}, @code{down-arrow},
-@code{top-left-angle}, @code{top-right-angle},
-@code{bottom-left-angle}, @code{bottom-right-angle},
-@code{left-bracket}, @code{right-bracket}.
-
-@item Empty line indication bitmap:
-@code{empty-line}.
-
-@item Overlay arrow bitmap:
-@code{overlay-arrow}.
-
-@item Bitmaps for displaying the cursor in right fringe:
-@code{filled-box-cursor}, @code{hollow-box-cursor}, @code{hollow-square},
-@code{bar-cursor}, @code{hbar-cursor}.
-@end table
-
 @defun fringe-bitmaps-at-pos &optional pos window
 This function returns the fringe bitmaps of the display line
 containing position @var{pos} in window @var{window}.  The return
@@ -4598,52 +4747,6 @@
 command @code{tab-to-tab-stop}.  @xref{Indent Tabs}.
 @end defopt
 
-@defopt indicate-empty-lines
-@tindex indicate-empty-lines
-@cindex fringes, and empty line indication
-When this is non-@code{nil}, Emacs displays a special glyph in the
-fringe of each empty line at the end of the buffer, on graphical
-displays.  @xref{Fringes}.  This variable is automatically
-buffer-local in every buffer.
-@end defopt
-
-@defvar indicate-buffer-boundaries
-This buffer-local variable controls how the buffer boundaries and
-window scrolling are indicated in the window fringes.
-
-Emacs can indicate the buffer boundaries---that is, the first and last
-line in the buffer---with angle icons when they appear on the screen.
-In addition, Emacs can display an up-arrow in the fringe to show
-that there is text above the screen, and a down-arrow to show
-there is text below the screen.
-
-There are four kinds of basic values:
-
-@table @asis
-@item @code{nil}
-Don't display the icons.
-@item @code{left}
-Display them in the left fringe.
-@item @code{right}
-Display them in the right fringe.
-@item @var{anything-else}
-Display the icon at the top of the window top in the left fringe, and other
-in the right fringe.
-@end table
-
-If value is a cons @code{(@var{angles} . @var{arrows})}, @var{angles}
-controls the angle icons, and @var{arrows} controls the arrows.  Both
-@var{angles} and @var{arrows} work according to the table above.
-Thus, @code{(t .  right)} places the top angle icon in the left
-fringe, the bottom angle icon in the right fringe, and both arrows in
-the right fringe.
-@end defvar
-
-@defvar default-indicate-buffer-boundaries
-The value of this variable is the default value for
-@code{indicate-buffer-boundaries} in buffers that do not override it.
-@end defvar
-
 @node Display Tables
 @section Display Tables
 
--- a/lispref/files.texi	Wed Feb 22 06:52:00 2006 +0000
+++ b/lispref/files.texi	Wed Feb 22 06:54:10 2006 +0000
@@ -1770,6 +1770,32 @@
 @end example
 @end defun
 
+  Given a possibly relative file name, you can convert it to an
+absolute name using @code{expand-file-name} (@pxref{File Name
+Expansion}).  This function converts absolute file names to relative
+names:
+
+@defun file-relative-name filename &optional directory
+This function tries to return a relative name that is equivalent to
+@var{filename}, assuming the result will be interpreted relative to
+@var{directory} (an absolute directory name or directory file name).
+If @var{directory} is omitted or @code{nil}, it defaults to the
+current buffer's default directory.
+
+On some operating systems, an absolute file name begins with a device
+name.  On such systems, @var{filename} has no relative equivalent based
+on @var{directory} if they start with two different device names.  In
+this case, @code{file-relative-name} returns @var{filename} in absolute
+form.
+
+@example
+(file-relative-name "/foo/bar" "/foo/")
+     @result{} "bar"
+(file-relative-name "/foo/bar" "/hack/")
+     @result{} "../foo/bar"
+@end example
+@end defun
+
 @node Directory Names
 @comment  node-name,  next,  previous,  up
 @subsection Directory Names
@@ -1910,16 +1936,13 @@
 be expanded.  Expansion also simplifies file names by eliminating
 redundancies such as @file{./} and @file{@var{name}/../}.
 
-In the next two functions, the @var{directory} argument can be either
-a directory name or a directory file name.  @xref{Directory Names}.
-
 @defun expand-file-name filename &optional directory
 This function converts @var{filename} to an absolute file name.  If
 @var{directory} is supplied, it is the default directory to start with
 if @var{filename} is relative.  (The value of @var{directory} should
-itself be an absolute directory name; it may start with @samp{~}.)
-Otherwise, the current buffer's value of @code{default-directory} is
-used.  For example:
+itself be an absolute directory name or directory file name; it may
+start with @samp{~}.)  Otherwise, the current buffer's value of
+@code{default-directory} is used.  For example:
 
 @example
 @group
@@ -1981,27 +2004,6 @@
 indirect calls to @code{expand-file-name}.  @xref{Truenames}.
 @end defun
 
-@c Emacs 19 feature
-@defun file-relative-name filename &optional directory
-This function does the inverse of expansion---it tries to return a
-relative name that is equivalent to @var{filename} when interpreted
-relative to @var{directory}.  If @var{directory} is omitted or
-@code{nil}, it defaults to the current buffer's default directory.
-
-On some operating systems, an absolute file name begins with a device
-name.  On such systems, @var{filename} has no relative equivalent based
-on @var{directory} if they start with two different device names.  In
-this case, @code{file-relative-name} returns @var{filename} in absolute
-form.
-
-@example
-(file-relative-name "/foo/bar" "/foo/")
-     @result{} "bar"
-(file-relative-name "/foo/bar" "/hack/")
-     @result{} "../foo/bar"
-@end example
-@end defun
-
 @defvar default-directory
 The value of this buffer-local variable is the default directory for the
 current buffer.  It should be an absolute directory name; it may start
--- a/lispref/minibuf.texi	Wed Feb 22 06:52:00 2006 +0000
+++ b/lispref/minibuf.texi	Wed Feb 22 06:54:10 2006 +0000
@@ -1194,7 +1194,8 @@
 @end defun
 
   See also the functions @code{read-coding-system} and
-@code{read-non-nil-coding-system}, in @ref{User-Chosen Coding Systems}.
+@code{read-non-nil-coding-system}, in @ref{User-Chosen Coding Systems},
+and @code{read-input-method-name}, in @ref{Input Methods}.
 
 @node Reading File Names
 @subsection Reading File Names
--- a/lispref/windows.texi	Wed Feb 22 06:52:00 2006 +0000
+++ b/lispref/windows.texi	Wed Feb 22 06:54:10 2006 +0000
@@ -2196,7 +2196,7 @@
 
 If the root window is not split, @var{root} is the root window itself.
 Otherwise, @var{root} is a list @code{(@var{dir} @var{edges} @var{w1}
-@var{w2} ...)} where @var{dir} is @code{nil} for a horisontal split,
+@var{w2} ...)} where @var{dir} is @code{nil} for a horizontal split,
 and @code{t} for a vertical split, @var{edges} gives the combined size and
 position of the subwindows in the split, and the rest of the elements
 are the subwindows in the split.  Each of the subwindows may again be
--- a/man/ChangeLog	Wed Feb 22 06:52:00 2006 +0000
+++ b/man/ChangeLog	Wed Feb 22 06:54:10 2006 +0000
@@ -1,3 +1,24 @@
+2006-02-21  Nick Roberts  <nickrob@snap.net.nz>
+
+	* building.texi (Watch Expressions): Update and describe
+	gdb-speedbar-auto-raise.
+
+2006-02-19  Richard M. Stallman  <rms@gnu.org>
+
+	* emacs.texi: Use @smallbook.
+	(Top): Update ref to Emacs paper, delete ref to Cookbook.
+	Update subnode menu.
+	
+	* building.texi (Lisp Interaction): Minor addition.
+
+2006-02-18  Nick Roberts  <nickrob@snap.net.nz>
+
+	* building.texi (Watch Expressions): Update and be more precise.
+
+2006-02-17  Eli Zaretskii  <eliz@gnu.org>
+
+	* faq.texi: Remove the coding cookie, it's not needed anymore.
+
 2006-02-15  Francesco Potort,Al(B  <pot@gnu.org>
 
 	* maintaining.texi (Create Tags Table): Explain why the
--- a/man/building.texi	Wed Feb 22 06:52:00 2006 +0000
+++ b/man/building.texi	Wed Feb 22 06:54:10 2006 +0000
@@ -936,9 +936,9 @@
   Each watch expression is displayed in the speedbar.  Complex data
 types, such as arrays, structures and unions are represented in a tree
 format.  Leaves and simple data types show the name of the expression
-and its value, and display the type as a tooltip.  Higher levels show
-the name, type and address value for pointers and just the name and
-type otherwise.
+and its value and, when the speedbar frame is selected, display the
+type as a tooltip.  Higher levels show the name, type and address
+value for pointers and just the name and type otherwise.
 
   To expand or contract a complex data type, click @kbd{Mouse-2}
 on the tag to the left of the expression.
@@ -958,7 +958,9 @@
   If you set the variable @code{gdb-show-changed-values} to
 non-@code{nil} (the default value), Emacs uses
 @code{font-lock-warning-face} to highlight values that have recently
-changed.
+changed and @code{shadow} face to make variables which have gone out of
+scope less noticeable.  When a variable goes out of scope you can't
+edit its value.
 
 @vindex gdb-use-colon-colon-notation
   If the variable @code{gdb-use-colon-colon-notation} is
@@ -967,6 +969,12 @@
 for variables defined in compound statements, the default value is
 @code{nil}.
 
+@vindex gdb-speedbar-auto-raise
+To automatically raise the speedbar every time the display of watch
+expressions updates, set @code{gdb-speedbar-auto-raise} to
+non-@code{nil}.  This can be useful if you are debugging with a full
+screen Emacs frame.
+
 @node Other GDB User Interface Buffers
 @subsubsection Other Buffers
 
@@ -1277,7 +1285,8 @@
 is to use Inferior Emacs-Lisp mode, which provides an interface rather
 like Shell mode (@pxref{Shell Mode}) for evaluating Emacs Lisp
 expressions.  Type @kbd{M-x ielm} to create an @samp{*ielm*} buffer
-which uses this mode.
+which uses this mode.  For more information see that command's
+documentation.
 
 @node External Lisp
 @section Running an External Lisp
--- a/man/ediff.texi	Wed Feb 22 06:52:00 2006 +0000
+++ b/man/ediff.texi	Wed Feb 22 06:54:10 2006 +0000
@@ -686,6 +686,16 @@
 one of them by typing the region number and then `j'.  Typing @kbd{##}
 again puts Ediff back in the original state.
 
+@item #c
+@kindex #c
+@vindex ediff-ignore-case-option
+@vindex ediff-ignore-case-option3
+@vindex ediff-ignore-case
+Toggle case sensitivity in the diff program. All diffs are recomputed.
+Case sensitivity is controlled by the variables
+@code{ediff-ignore-case-option}, @code{ediff-ignore-case-option3},
+and @code{ediff-ignore-case}, which are explained elsewhere.
+
 @item #h
 @itemx #f
 @kindex #f
@@ -1584,6 +1594,28 @@
 differences of all intermediate regions.  This delay does not indicate any
 problem.
 
+@vindex ediff-ignore-case-option
+@vindex ediff-ignore-case-option3
+@vindex ediff-ignore-case
+Finally, Ediff can be told to ignore the case of the letters. This behavior
+can be toggled with @kbd{#c} and it is controlled with three variables:
+Toggle case sensitivity in the diff program. All diffs are recomputed.
+Case sensitivity is controlled by the variables
+@code{ediff-ignore-case-option}, @code{ediff-ignore-case-option3}, and
+@code{ediff-ignore-case}.
+
+The variable @code{ediff-ignore-case-option} specifies the option to pass
+to the diff program for comparing two files or buffers. For GNU
+@code{diff}, this option is @code{"-i"}. The variable
+@code{ediff-ignore-case-option3} specifies the option to pass to the
+@code{diff3} program in order to make it case-insensitive. GNU @code{diff3}
+does not have such an option, so when merging or comparing three files with
+this program, ignoring the letter case is not supported.
+
+The variable @code{ediff-ignore-case} controls whether Ediff starts out by
+ignoring letter case or not. It can be set in @file{.emacs} using
+@code{setq-default}.
+
 @node Highlighting Difference Regions, Narrowing, Selective Browsing, Customization
 @section Highlighting Difference Regions
 
@@ -2388,6 +2420,7 @@
 
 @example
 Adrian Aichner (aichner@@ecf.teradyne.com),
+Drew Adams (drew.adams@@oracle.com),
 Steve Baur (steve@@xemacs.org),
 Neal Becker (neal@@ctd.comsat.com),
 E.@: Jay Berkenbilt (ejb@@ql.org),
--- a/man/emacs.texi	Wed Feb 22 06:52:00 2006 +0000
+++ b/man/emacs.texi	Wed Feb 22 06:54:10 2006 +0000
@@ -39,7 +39,7 @@
 @c copy of this manual that will be published.  the manual should go
 @c onto the distribution in the full, 8.5 x 11" size.
 
-@c @smallbook
+@smallbook
 
 @setchapternewpage odd
 @defcodeindex op
@@ -609,7 +609,7 @@
                           implement a graphical debugging environment through
                           Emacs.
 
-Maintaining Programs
+Maintaining Large Programs
 
 * Change Log::	        Maintaining a change history for your program.
 * Format of ChangeLog:: What the change log file looks like.
@@ -950,15 +950,12 @@
 substantially the same text and are generated from the same source
 files, which are also distributed along with GNU Emacs.
 
-  GNU Emacs is a member of the Emacs editor family.  There are many Emacs
-editors, all sharing common principles of organization.  For information on
-the underlying philosophy of Emacs and the lessons learned from its
-development, write for a copy of AI memo 519a, @cite{Emacs, the Extensible,
-Customizable Self-Documenting Display Editor}, is available from
+  GNU Emacs is a member of the Emacs editor family.  There are many
+Emacs editors, all sharing common principles of organization.  For
+information on the underlying philosophy of Emacs and the lessons
+learned from its development, see @cite{Emacs, the Extensible,
+Customizable Self-Documenting Display Editor}, available from
 @url{ftp://publications.ai.mit.edu/ai-publications/pdf/AIM-519A.pdf}.
-Another useful publication is LCS TM-165, @cite{A Cookbook for an
-Emacs}, by Craig Finseth, is available from the MIT libraries in some
-fashion.
 
 This edition of the manual is intended for use with GNU Emacs
 installed on GNU and Unix systems.  GNU Emacs can also be used on VMS,
--- a/man/erc.texi	Wed Feb 22 06:52:00 2006 +0000
+++ b/man/erc.texi	Wed Feb 22 06:54:10 2006 +0000
@@ -12,7 +12,7 @@
 @syncodeindex fn cp
 
 @copying
-This manual is for ERC version 5.1.1.
+This manual is for ERC version 5.1.2.
 
 Copyright @copyright{} 2005, 2006 Free Software Foundation, Inc.
 
--- a/man/faq.texi	Wed Feb 22 06:52:00 2006 +0000
+++ b/man/faq.texi	Wed Feb 22 06:54:10 2006 +0000
@@ -1,4 +1,4 @@
-\input texinfo   @c -*- coding: latin-1; mode: texinfo; -*-
+\input texinfo   @c -*- mode: texinfo; -*-
 @c %**start of header
 @setfilename ../info/efaq
 @settitle GNU Emacs FAQ
--- a/man/viper.texi	Wed Feb 22 06:52:00 2006 +0000
+++ b/man/viper.texi	Wed Feb 22 06:54:10 2006 +0000
@@ -1870,6 +1870,10 @@
 @vindex @code{viper-insert-state-cursor-color}
 If set to a valid color, this will be the cursor color when Viper is in
 insert state.
+@item viper-emacs-state-cursor-color nil
+@vindex @code{viper-emacs-state-cursor-color}
+If set to a valid color, this will be the cursor color when Viper is in
+emacs state.
 @item viper-replace-region-end-delimiter "$"
 A string used to mark the end of replacement regions.  It is used only on
 TTYs or if @code{viper-use-replace-region-delimiters} is non-@code{nil}.
--- a/src/ChangeLog	Wed Feb 22 06:52:00 2006 +0000
+++ b/src/ChangeLog	Wed Feb 22 06:54:10 2006 +0000
@@ -1,3 +1,150 @@
+2006-02-22  Kim F. Storm  <storm@cua.dk>
+
+	* fringe.c (draw_fringe_bitmap): Fix overlay-arrow display.
+
+2006-02-21  Kim F. Storm  <storm@cua.dk>
+
+	* fringe.c (syms_of_fringe) <fringe-bitmaps>: Doc fix.
+
+2006-02-21  Zhang Wei <brep@newsmth.org>
+
+	* xfns.c (Fx_file_dialog, Motif and GTK): DECODE_FILE before
+	returning it.
+
+2006-02-21  Giorgos Keramidas  <keramida@ceid.upatras.gr>  (tiny change)
+
+	* fringe.c (horizontal_bar_bits): Rename from `horisontal_bar_bits'.
+	(standard_bitmaps): Use it.
+
+2006-02-21  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
+
+	* macterm.c (mac_draw_string_common): Remove arg MODE.  New arg
+	BG_WIDTH.  All uses changed.  Draw background if BG_WIDTH is not zero.
+	(mac_draw_image_string, mac_draw_image_string_16): New arg BG_WIDTH.
+	[USE_CG_TEXT_DRAWING] (mac_draw_image_string_cg): Rename from
+	mac_draw_string_cg.  New arg BG_WIDTH.  All uses changed.  Draw
+	background if BG_WIDTH is not zero.  Use float constants as
+	divisors instead of double.  Use alloca instead of xmalloc/xfree.
+	(x_draw_glyph_string_background, x_draw_glyph_string_foreground)
+	[!MAC_OS8 || USE_ATSUI]: Background may be drawn using
+	mac_draw_image_string* functions.
+	(XLoadQueryFont) [MAC_OS8 && USE_ATSUI]: Don't adjust heights of
+	some fonts when srcCopy text transfer mode might be used.
+	(mac_begin_clip, mac_end_clip): Check if region is empty.
+	(mac_set_clip_rectangles): When resetting clip region, make it
+	empty instead of disposing of it.
+
+2006-02-20  Kim F. Storm  <storm@cua.dk>
+
+	* Makefile.in: Add fringe.elc to WINDOW_SUPPORT.
+
+	* buffer.h (struct buffer): New members fringe_indicator_alist and
+	fringe_cursor_alist.
+
+	* buffer.c (init_buffer_once): Set dummy default values for
+	fringe-indicator-alist and fringe-cursor-alist.  The proper
+	default values are set by pre-loading fringe.el.
+	(syms_of_buffer): defvar_per_buffer new fringe-indicator-alist and
+	fringe-cursor-alist buffer-local variables and defvar_lisp_nopro
+	corresponding default- variables.
+
+	* fringe.c (enum fringe_bitmap_type): Remove.  Change all uses
+	to use `int'.
+	(NO_FRINGE_BITMAP, UNDEF_FRINGE_BITMAP, MAX_STANDARD_FRINGE_BITMAPS):
+	Define explicitly.
+	(Qtruncation, Qcontinuation, Qempty_line, Qtop_bottom)
+	(Qhollow_small): New variables.
+	(syms_of_fringe): Intern and staticpro them.
+	(question_mark_bits): Rename from unknown_bits.
+	(left_curly_arrow_bits): Rename from continuation_bits.
+	(right_curly_arrow_bits): Rename from continued_bits.
+	(left_triangle_bits): Rename from ov_bits.
+	(right_triangle_bits): Added.
+	(filled_rectangle_bits): Rename from filled_box_cursor_bits.
+	(hollow_rectangle_bits): Rename from hollow_box_cursor_bits.
+	(filled_square_bits): Added.
+	(vertical_bar_bits): Rename from bar_cursor_bits.
+	(horizontal_bar_bits): Rename from hbar_cursor_bits.
+	(empty_line_bits): Rename from zv_bits.
+	(standard_bitmaps): Update to use new names.
+	(draw_fringe_bitmap_1): Make static.
+	(get_logical_cursor_bitmap, get_logical_fringe_bitmap): New functions
+	to map from logical cursors and indicators to physical bitmaps.
+	(draw_fringe_bitmap): Resolve fringe cursor and	overlay-arrow
+	bitmaps using symbol names instead of bitmap numbers.
+	(update_window_fringes): Use logical indicator symbol names
+	instead of bitmap numbers for logical.  Add bitmap cache.
+	(LEFT_FRINGE, RIGHT_FRINGE): New helper macros.
+
+2006-02-20  Chong Yidong  <cyd@stupidchicken.com>
+
+	* regex.c: Revert 2006-02-19 change.
+	(xmalloc, xrealloc): Define these when not linked to Emacs.
+	Redefine malloc -> xmalloc, realloc -> xrealloc as in Emacs case.
+
+2006-02-19  Luc Teirlinck  <teirllm@auburn.edu>
+
+	* regex.c (extend_range_table_work_area): Fix typo.
+
+2006-02-19  Richard M. Stallman  <rms@gnu.org>
+
+	* xterm.c (x_catch_errors): Use xmalloc.
+
+	* regex.c (extend_range_table_work_area): Call xmalloc and xrealloc.
+	(regex_compile): Likewise.
+	(regcomp): Use xmalloc.
+
+	* gtkutil.c (malloc_widget_value): Use xmalloc.
+
+	* vm-limit.c [HAVE_GETRLIMIT]: Include sys/resource.h.
+	(check_memory_limits) [HAVE_GETRLIMIT]: Use getrlimit.
+
+	* xmenu.c (digest_single_submenu): When pane_string is empty,
+	do initialize save_wv.
+
+2006-02-19  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
+
+	* xdisp.c (update_menu_bar) [MAC_OS]: Don't set
+	w->update_mode_line if arg F is not the selected frame.
+
+	* macmenu.c (popup_activated_flag, submenu_id)
+	(next_menubar_widget_id): Remove variables.
+	(initialize_frame_menubar): Remove function.
+	(pop_down_menu, mac_menu_show): Simplify save value.
+	(dispose_menus): New function.
+	(pop_down_menu, fill_menubar): Use it.
+	(fill_submenu): Remove function.  All uses changed to fill_menu.
+	(add_menu_item): Remove args SUBMENU and FORCE_DISABLE.  New arg
+	POS.  Don't call SetMenuItemHierarchicalID here.
+	(fill_menu): Add arg SUBMENU_ID.  Return submenu_id that is to be
+	used next.  Call SetMenuItemHierarchicalID here.
+	(fill_menubar): Add arg DEEP_P.  All uses changed.  Clean up menu
+	objects if needed.  Reuse existing menu bar titles if possible.
+	(set_frame_menubar): Don't clean up menu objects here.
+
+2006-02-18  Chong Yidong  <cyd@stupidchicken.com>
+
+	* window.c (window_min_size_1): Ensure room for the scroll bar and
+	fringes.
+
+2006-02-17  Romain Francoise  <romain@orebokech.com>
+
+	* puresize.h (BASE_PURESIZE): Increment to 1200000.
+
+2006-02-17  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* alloc.c (Fmake_symbol): Comment-out left-over assert from before the
+	addition of the BLOCK_INPUTs.
+
+2006-02-17  Juanma Barranquero  <lekktu@gmail.com>
+
+	* window.c (Fset_window_scroll_bars): Doc fix.
+
+2006-02-17  Kenichi Handa  <handa@m17n.org>
+
+	* xdisp.c (display_mode_element): Call display_string with correct
+	PREC arg (which must be a number of characters, not column width).
+
 2006-02-15  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
 
 	* frame.c (x_get_arg): Clear out PARAM in ALIST also on Mac.
--- a/src/Makefile.in	Wed Feb 22 06:52:00 2006 +0000
+++ b/src/Makefile.in	Wed Feb 22 06:54:10 2006 +0000
@@ -679,11 +679,11 @@
 
 #ifdef HAVE_WINDOW_SYSTEM
 #ifdef HAVE_X_WINDOWS
-#define WINDOW_SUPPORT ${lispsource}image.elc \
+#define WINDOW_SUPPORT ${lispsource}fringe.elc ${lispsource}image.elc \
  ${lispsource}international/fontset.elc ${lispsource}dnd.elc \
  ${lispsource}tool-bar.elc ${lispsource}mwheel.elc ${lispsource}x-dnd.elc
 #else
-#define WINDOW_SUPPORT ${lispsource}image.elc \
+#define WINDOW_SUPPORT ${lispsource}fringe.elc ${lispsource}image.elc \
  ${lispsource}international/fontset.elc ${lispsource}dnd.elc \
  ${lispsource}tool-bar.elc ${lispsource}mwheel.elc
 #endif
--- a/src/alloc.c	Wed Feb 22 06:52:00 2006 +0000
+++ b/src/alloc.c	Wed Feb 22 06:54:10 2006 +0000
@@ -3166,7 +3166,7 @@
 
   CHECK_STRING (name);
 
-  eassert (!handling_signal);
+  /* eassert (!handling_signal); */
 
 #ifndef SYNC_INPUT
   BLOCK_INPUT;
--- a/src/buffer.c	Wed Feb 22 06:52:00 2006 +0000
+++ b/src/buffer.c	Wed Feb 22 06:54:10 2006 +0000
@@ -5009,6 +5009,8 @@
   buffer_defaults.vertical_scroll_bar_type = Qt;
   buffer_defaults.indicate_empty_lines = Qnil;
   buffer_defaults.indicate_buffer_boundaries = Qnil;
+  buffer_defaults.fringe_indicator_alist = Qnil;
+  buffer_defaults.fringe_cursor_alist = Qnil;
   buffer_defaults.scroll_up_aggressively = Qnil;
   buffer_defaults.scroll_down_aggressively = Qnil;
   buffer_defaults.display_time = Qnil;
@@ -5080,6 +5082,8 @@
   XSETFASTINT (buffer_local_flags.vertical_scroll_bar_type, idx); ++idx;
   XSETFASTINT (buffer_local_flags.indicate_empty_lines, idx); ++idx;
   XSETFASTINT (buffer_local_flags.indicate_buffer_boundaries, idx); ++idx;
+  XSETFASTINT (buffer_local_flags.fringe_indicator_alist, idx); ++idx;
+  XSETFASTINT (buffer_local_flags.fringe_cursor_alist, idx); ++idx;
   XSETFASTINT (buffer_local_flags.scroll_up_aggressively, idx); ++idx;
   XSETFASTINT (buffer_local_flags.scroll_down_aggressively, idx); ++idx;
   XSETFASTINT (buffer_local_flags.header_line_format, idx); ++idx;
@@ -5373,6 +5377,16 @@
 		     doc: /* Default value of `indicate-buffer-boundaries' for buffers that don't override it.
 This is the same as (default-value 'indicate-buffer-boundaries).  */);
 
+  DEFVAR_LISP_NOPRO ("default-fringe-indicator-alist",
+		     &buffer_defaults.fringe_indicator_alist,
+		     doc: /* Default value of `fringe-indicator-alist' for buffers that don't override it.
+This is the same as (default-value 'fringe-indicator-alist').  */);
+
+  DEFVAR_LISP_NOPRO ("default-fringe-cursor-alist",
+		     &buffer_defaults.fringe_cursor_alist,
+		     doc: /* Default value of `fringe-cursor-alist' for buffers that don't override it.
+This is the same as (default-value 'fringe-cursor-alist').  */);
+
   DEFVAR_LISP_NOPRO ("default-scroll-up-aggressively",
 		     &buffer_defaults.scroll_up_aggressively,
 		     doc: /* Default value of `scroll-up-aggressively'.
@@ -5718,6 +5732,40 @@
 bitmaps in right fringe.  To show just the angle bitmaps in the left
 fringe, but no arrow bitmaps, use ((top .  left) (bottom . left)).  */);
 
+  DEFVAR_PER_BUFFER ("fringe-indicator-alist",
+		     &current_buffer->fringe_indicator_alist, Qnil,
+		     doc: /* *Mapping from logical to physical fringe indicator bitmaps.
+The value is an alist where each element (INDICATOR . BITMAPS)
+specifies the fringe bitmaps used to display a specific logical
+fringe indicator.
+
+INDICATOR specifies the logical indicator type which is one of the
+following symbols: `truncation' , `continuation', `overlay-arrow',
+`top', `bottom', `up', `down', `one-line', `empty-line', or `unknown'.
+
+BITMAPS is list of symbols (LEFT RIGHT [LEFT1 RIGHT1]) which specifies
+the actual bitmap shown in the left or right fringe for the logical
+indicator.  LEFT and RIGHT are the bitmaps shown in the left and/or
+right fringe for the specific indicator.  The LEFT1 or RIGHT1 bitmaps
+are used only for the `bottom' and `one-line' indicators when the last
+(only) line in has no final newline.  BITMAPS may also be a single
+symbol which is used in both left and right fringes.  */);
+
+  DEFVAR_PER_BUFFER ("fringe-cursor-alist",
+		     &current_buffer->fringe_cursor_alist, Qnil,
+		     doc: /* *Mapping from logical to physical fringe cursor bitmaps.
+The value is an alist where each element (CURSOR . BITMAP)
+specifies the fringe bitmaps used to display a specific logical
+cursor type in the fringe.
+
+CURSOR specifies the logical cursor type which is one of the following
+symbols: `box' , `hollow', `bar', `hbar', or `hollow-small'.  The last
+one is used to show a hollow cursor on narrow lines display lines
+where the normal hollow cursor will not fit.
+
+BITMAP is the corresponding fringe bitmap shown for the logical
+cursor type.  */);
+
   DEFVAR_PER_BUFFER ("scroll-up-aggressively",
 		     &current_buffer->scroll_up_aggressively, Qnil,
 		     doc: /* How far to scroll windows upward.
--- a/src/buffer.h	Wed Feb 22 06:52:00 2006 +0000
+++ b/src/buffer.h	Wed Feb 22 06:54:10 2006 +0000
@@ -743,6 +743,12 @@
   /* Non-nil means indicate buffer boundaries and scrolling.  */
   Lisp_Object indicate_buffer_boundaries;
 
+  /* Logical to physical fringe bitmap mappings.  */
+  Lisp_Object fringe_indicator_alist;
+
+  /* Logical to physical cursor bitmap mappings.  */
+  Lisp_Object fringe_cursor_alist;
+
   /* Time stamp updated each time this buffer is displayed in a window.  */
   Lisp_Object display_time;
 
--- a/src/fringe.c	Wed Feb 22 06:52:00 2006 +0000
+++ b/src/fringe.c	Wed Feb 22 06:54:10 2006 +0000
@@ -49,31 +49,45 @@
 
 Lisp_Object Vfringe_bitmaps;
 
-enum fringe_bitmap_type
-{
-  NO_FRINGE_BITMAP = 0,
-  UNDEF_FRINGE_BITMAP,
-  LEFT_TRUNCATION_BITMAP,
-  RIGHT_TRUNCATION_BITMAP,
-  UP_ARROW_BITMAP,
-  DOWN_ARROW_BITMAP,
-  CONTINUED_LINE_BITMAP,
-  CONTINUATION_LINE_BITMAP,
-  OVERLAY_ARROW_BITMAP,
-  TOP_LEFT_ANGLE_BITMAP,
-  TOP_RIGHT_ANGLE_BITMAP,
-  BOTTOM_LEFT_ANGLE_BITMAP,
-  BOTTOM_RIGHT_ANGLE_BITMAP,
-  LEFT_BRACKET_BITMAP,
-  RIGHT_BRACKET_BITMAP,
-  FILLED_BOX_CURSOR_BITMAP,
-  HOLLOW_BOX_CURSOR_BITMAP,
-  HOLLOW_SQUARE_BITMAP,
-  BAR_CURSOR_BITMAP,
-  HBAR_CURSOR_BITMAP,
-  ZV_LINE_BITMAP,
-  MAX_STANDARD_FRINGE_BITMAPS
-};
+/* Fringe bitmaps are represented in three different ways:
+
+   Logical bitmaps are used internally to denote things like
+   'end-of-buffer', 'left-truncation', 'overlay-arrow', etc.
+
+   Physical bitmaps specify the visual appearence of the bitmap,
+   e.g. 'bottom-left-angle', 'left-arrow', 'left-triangle', etc.
+   User defined bitmaps are physical bitmaps.
+
+   Internally, fringe bitmaps for a specific display row are
+   represented as a simple integer that is used as an index
+   into the table of all defined bitmaps.  This index is stored
+   in the `fringe' property of the physical bitmap symbol.
+
+   Logical bitmaps are mapped to physical bitmaps through the
+   buffer-local `fringe-indicator-alist' variable.
+
+   Each element of this alist is a cons (LOGICAL . PHYSICAL)
+   mapping a logical bitmap to a physical bitmap.
+   PHYSICAL is either a symbol to use in both left and right fringe,
+   or a cons of two symbols (LEFT . RIGHT) denoting different
+   bitmaps to use in left and right fringe.
+
+   LOGICAL is first looked up in the window's buffer's buffer-local
+   value of the fringe-indicator-alist variable, and if not present,
+   in the global value of fringe-indicator-alist.
+
+   If LOGICAL is not present in either alist, or the PHYSICAL value
+   found is nil, no bitmap is shown for the logical bitmap.
+
+   The `left-fringe' and `right-fringe' display properties
+   must specify physical bitmap symbols.
+*/
+
+extern Lisp_Object Qunknown;
+Lisp_Object Qtruncation, Qcontinuation, Qoverlay_arrow;
+Lisp_Object Qempty_line, Qtop_bottom;
+extern Lisp_Object Qbar, Qhbar, Qbox, Qhollow;
+Lisp_Object Qhollow_small;
 
 enum fringe_bitmap_align
 {
@@ -110,7 +124,7 @@
   ...xx...
   ...xx...
 */
-static unsigned short unknown_bits[] = {
+static unsigned short question_mark_bits[] = {
   0x3c, 0x7e, 0x7e, 0x0c, 0x18, 0x18, 0x00, 0x18, 0x18};
 
 /* An arrow like this: `<-'.  */
@@ -172,6 +186,20 @@
 static unsigned short down_arrow_bits[] = {
    0x18, 0x18, 0x18, 0x18, 0xff, 0x7e, 0x3c, 0x18};
 
+/* Marker for continuation lines.  */
+/*
+  ..xxxx..
+  .xxxxx..
+  xx......
+  xxx..x..
+  xxxxxx..
+  .xxxxx..
+  ..xxxx..
+  .xxxxx..
+*/
+static unsigned short left_curly_arrow_bits[] = {
+   0x3c, 0x7c, 0xc0, 0xe4, 0xfc, 0x7c, 0x3c, 0x7c};
+
 /* Marker for continued lines.  */
 /*
   ..xxxx..
@@ -183,22 +211,22 @@
   ..xxxx..
   ..xxxxx.
 */
-static unsigned short continued_bits[] = {
+static unsigned short right_curly_arrow_bits[] = {
    0x3c, 0x3e, 0x03, 0x27, 0x3f, 0x3e, 0x3c, 0x3e};
 
-/* Marker for continuation lines.  */
+/* Reverse Overlay arrow bitmap.  A triangular arrow.  */
 /*
-  ..xxxx..
-  .xxxxx..
-  xx......
-  xxx..x..
-  xxxxxx..
-  .xxxxx..
-  ..xxxx..
-  .xxxxx..
+  ......xx
+  ....xxxx
+  ...xxxxx
+  ..xxxxxx
+  ..xxxxxx
+  ...xxxxx
+  ....xxxx
+  ......xx
 */
-static unsigned short continuation_bits[] = {
-   0x3c, 0x7c, 0xc0, 0xe4, 0xfc, 0x7c, 0x3c, 0x7c};
+static unsigned short left_triangle_bits[] = {
+   0x03, 0x0f, 0x1f, 0x3f, 0x3f, 0x1f, 0x0f, 0x03};
 
 /* Overlay arrow bitmap.  A triangular arrow.  */
 /*
@@ -211,25 +239,9 @@
   xxxx....
   xx......
 */
-static unsigned short ov_bits[] = {
+static unsigned short right_triangle_bits[] = {
    0xc0, 0xf0, 0xf8, 0xfc, 0xfc, 0xf8, 0xf0, 0xc0};
 
-#if 0
-/* Reverse Overlay arrow bitmap.  A triangular arrow.  */
-/*
-  ......xx
-  ....xxxx
-  ...xxxxx
-  ..xxxxxx
-  ..xxxxxx
-  ...xxxxx
-  ....xxxx
-  ......xx
-*/
-static unsigned short rev_ov_bits[] = {
-   0x03, 0x0f, 0x1f, 0x3f, 0x3f, 0x1f, 0x0f, 0x03};
-#endif
-
 /* First line bitmap.  An top-left angle.  */
 /*
   xxxxxx..
@@ -334,7 +346,7 @@
   xxxxxxx.
   xxxxxxx.
 */
-static unsigned short filled_box_cursor_bits[] = {
+static unsigned short filled_rectangle_bits[] = {
    0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe};
 
 /* Hollow box cursor bitmap.  A hollow box; max 13 pixels high.  */
@@ -353,9 +365,33 @@
   x.....x.
   xxxxxxx.
 */
-static unsigned short hollow_box_cursor_bits[] = {
+static unsigned short hollow_rectangle_bits[] = {
    0xfe, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0xfe};
 
+/* Hollow square bitmap.  */
+/*
+  .xxxxxx.
+  .x....x.
+  .x....x.
+  .x....x.
+  .x....x.
+  .xxxxxx.
+*/
+static unsigned short hollow_square_bits[] = {
+   0x7e, 0x42, 0x42, 0x42, 0x42, 0x7e};
+
+/* Filled square bitmap.  */
+/*
+  .xxxxxx.
+  .xxxxxx.
+  .xxxxxx.
+  .xxxxxx.
+  .xxxxxx.
+  .xxxxxx.
+*/
+static unsigned short filled_square_bits[] = {
+   0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e};
+
 /* Bar cursor bitmap.  A vertical bar; max 13 pixels high.  */
 /*
   xx......
@@ -372,15 +408,15 @@
   xx......
   xx......
 */
-static unsigned short bar_cursor_bits[] = {
+static unsigned short vertical_bar_bits[] = {
    0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0};
 
-/* HBar cursor bitmap.  A horisontal bar; 2 pixels high.  */
+/* HBar cursor bitmap.  A horizontal bar; 2 pixels high.  */
 /*
   xxxxxxx.
   xxxxxxx.
 */
-static unsigned short hbar_cursor_bits[] = {
+static unsigned short horizontal_bar_bits[] = {
   0xfe, 0xfe};
 
 
@@ -394,7 +430,7 @@
   ..xxxx..
   ........
 */
-static unsigned short zv_bits[] = {
+static unsigned short empty_line_bits[] = {
   0x00, 0x3c, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x3c, 0x00,
   0x00, 0x3c, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x3c, 0x00,
   0x00, 0x3c, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x3c, 0x00,
@@ -404,48 +440,45 @@
   0x00, 0x3c, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x3c, 0x00,
   0x00, 0x3c, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x3c, 0x00};
 
-/* Hollow square bitmap.  */
-/*
-  .xxxxxx.
-  .x....x.
-  .x....x.
-  .x....x.
-  .x....x.
-  .xxxxxx.
-*/
-static unsigned short hollow_square_bits[] = {
-   0x7e, 0x42, 0x42, 0x42, 0x42, 0x7e};
-
 
 #define BYTES_PER_BITMAP_ROW  (sizeof (unsigned short))
 #define STANDARD_BITMAP_HEIGHT(bits) (sizeof (bits)/BYTES_PER_BITMAP_ROW)
 #define FRBITS(bits)  bits, STANDARD_BITMAP_HEIGHT (bits)
 
-struct fringe_bitmap standard_bitmaps[MAX_STANDARD_FRINGE_BITMAPS] =
+/* NOTE:  The order of these bitmaps must match the sequence
+   used in fringe.el to define the corresponding symbols.  */
+
+struct fringe_bitmap standard_bitmaps[] =
 {
   { NULL, 0, 0, 0, 0, 0 }, /* NO_FRINGE_BITMAP */
-  { FRBITS (unknown_bits),            8, 0, ALIGN_BITMAP_CENTER, 0 },
+  { FRBITS (question_mark_bits),      8, 0, ALIGN_BITMAP_CENTER, 0 },
   { FRBITS (left_arrow_bits),         8, 0, ALIGN_BITMAP_CENTER, 0 },
   { FRBITS (right_arrow_bits),        8, 0, ALIGN_BITMAP_CENTER, 0 },
   { FRBITS (up_arrow_bits),           8, 0, ALIGN_BITMAP_TOP,    0 },
   { FRBITS (down_arrow_bits),         8, 0, ALIGN_BITMAP_BOTTOM, 0 },
-  { FRBITS (continued_bits),          8, 0, ALIGN_BITMAP_CENTER, 0 },
-  { FRBITS (continuation_bits),       8, 0, ALIGN_BITMAP_CENTER, 0 },
-  { FRBITS (ov_bits),                 8, 0, ALIGN_BITMAP_CENTER, 0 },
+  { FRBITS (left_curly_arrow_bits),   8, 0, ALIGN_BITMAP_CENTER, 0 },
+  { FRBITS (right_curly_arrow_bits),  8, 0, ALIGN_BITMAP_CENTER, 0 },
+  { FRBITS (left_triangle_bits),      8, 0, ALIGN_BITMAP_CENTER, 0 },
+  { FRBITS (right_triangle_bits),     8, 0, ALIGN_BITMAP_CENTER, 0 },
   { FRBITS (top_left_angle_bits),     8, 0, ALIGN_BITMAP_TOP,    0 },
   { FRBITS (top_right_angle_bits),    8, 0, ALIGN_BITMAP_TOP,    0 },
   { FRBITS (bottom_left_angle_bits),  8, 0, ALIGN_BITMAP_BOTTOM, 0 },
   { FRBITS (bottom_right_angle_bits), 8, 0, ALIGN_BITMAP_BOTTOM, 0 },
   { FRBITS (left_bracket_bits),       8, 0, ALIGN_BITMAP_CENTER, 0 },
   { FRBITS (right_bracket_bits),      8, 0, ALIGN_BITMAP_CENTER, 0 },
-  { FRBITS (filled_box_cursor_bits),  8, 0, ALIGN_BITMAP_CENTER, 0 },
-  { FRBITS (hollow_box_cursor_bits),  8, 0, ALIGN_BITMAP_CENTER, 0 },
+  { FRBITS (filled_rectangle_bits),   8, 0, ALIGN_BITMAP_CENTER, 0 },
+  { FRBITS (hollow_rectangle_bits),   8, 0, ALIGN_BITMAP_CENTER, 0 },
+  { FRBITS (filled_square_bits),      8, 0, ALIGN_BITMAP_CENTER, 0 },
   { FRBITS (hollow_square_bits),      8, 0, ALIGN_BITMAP_CENTER, 0 },
-  { FRBITS (bar_cursor_bits),         8, 0, ALIGN_BITMAP_CENTER, 0 },
-  { FRBITS (hbar_cursor_bits),        8, 0, ALIGN_BITMAP_BOTTOM, 0 },
-  { FRBITS (zv_bits),                 8, 3, ALIGN_BITMAP_TOP,    0 },
+  { FRBITS (vertical_bar_bits),       8, 0, ALIGN_BITMAP_CENTER, 0 },
+  { FRBITS (horizontal_bar_bits),     8, 0, ALIGN_BITMAP_BOTTOM, 0 },
+  { FRBITS (empty_line_bits),         8, 3, ALIGN_BITMAP_TOP,    0 },
 };
 
+#define NO_FRINGE_BITMAP 0
+#define UNDEF_FRINGE_BITMAP 1
+#define MAX_STANDARD_FRINGE_BITMAPS (sizeof(standard_bitmaps)/sizeof(standard_bitmaps[0]))
+
 static struct fringe_bitmap **fringe_bitmaps;
 static Lisp_Object *fringe_faces;
 static int max_fringe_bitmaps;
@@ -516,12 +549,12 @@
    LEFT_P is 1 for left fringe, 0 for right fringe.
 */
 
-void
+static void
 draw_fringe_bitmap_1 (w, row, left_p, overlay, which)
      struct window *w;
      struct glyph_row *row;
      int left_p, overlay;
-     enum fringe_bitmap_type which;
+     int which;
 {
   struct frame *f = XFRAME (WINDOW_FRAME (w));
   struct draw_fringe_bitmap_params p;
@@ -656,6 +689,134 @@
   rif->draw_fringe_bitmap (w, row, &p);
 }
 
+static int
+get_logical_cursor_bitmap (w, cursor)
+     struct window *w;
+     Lisp_Object cursor;
+{
+  Lisp_Object cmap, bm = Qnil;
+
+  if ((cmap = XBUFFER (w->buffer)->fringe_cursor_alist), !NILP (cmap))
+    {
+      bm = Fassq (cursor, cmap);
+      if (CONSP (bm))
+	{
+	  if ((bm = XCDR (bm)), NILP (bm))
+	    return NO_FRINGE_BITMAP;
+	  return lookup_fringe_bitmap (bm);
+	}
+    }
+  if (EQ (cmap, buffer_defaults.fringe_cursor_alist))
+    return NO_FRINGE_BITMAP;
+  bm = Fassq (cursor, buffer_defaults.fringe_cursor_alist);
+  if (!CONSP (bm) || ((bm = XCDR (bm)), NILP (bm)))
+    return NO_FRINGE_BITMAP;
+  return lookup_fringe_bitmap (bm);
+}
+
+static int
+get_logical_fringe_bitmap (w, bitmap, right_p, partial_p)
+     struct window *w;
+     Lisp_Object bitmap;
+     int right_p, partial_p;
+{
+  Lisp_Object cmap, bm1 = Qnil, bm2 = Qnil, bm;
+  int ln1 = 0, ln2 = 0;
+  int ix1 = right_p;
+  int ix2 = ix1 + (partial_p ? 2 : 0);
+
+  /* Lookup in buffer-local fringe-indicator-alist before global alist.
+
+     Elements are:
+	BITMAP		-- use for all
+	(L R)		-- use for left right (whether partial or not)
+	(L R PL PR)	-- use for left rigth partial-left partial-right
+	If any value in local binding is not present or t, use global value.
+
+     If partial, lookup partial bitmap in default value if not found here.
+     If not partial, or no partial spec is present, use non-partial bitmap.  */
+
+  if ((cmap = XBUFFER (w->buffer)->fringe_indicator_alist), !NILP (cmap))
+    {
+      bm1 = Fassq (bitmap, cmap);
+      if (CONSP (bm1))
+	{
+	  if ((bm1 = XCDR (bm1)), NILP (bm1))
+	    return NO_FRINGE_BITMAP;
+	  if (CONSP (bm1))
+	    {
+	      ln1 = XINT (Flength (bm1));
+	      if (partial_p)
+		{
+		  if (ln1 > ix2)
+		    {
+		      bm = Fnth (make_number (ix2), bm1);
+		      if (!EQ (bm, Qt))
+			goto found;
+		    }
+		}
+	      else
+		{
+		  if (ln1 > ix1)
+		    {
+		      bm = Fnth (make_number (ix1), bm1);
+		      if (!EQ (bm, Qt))
+			goto found;
+		    }
+		}
+	    }
+	  else if ((bm = bm1, !EQ (bm, Qt)))
+	    goto found;
+	}
+    }
+
+  if (!EQ (cmap, buffer_defaults.fringe_indicator_alist)
+      && !NILP (buffer_defaults.fringe_indicator_alist))
+    {
+      bm2 = Fassq (bitmap, buffer_defaults.fringe_indicator_alist);
+      if (CONSP (bm2))
+	{
+	  if ((bm2 = XCDR (bm2)), !NILP (bm2))
+	    {
+	      if (CONSP (bm2))
+		{
+		  ln2 = XINT (Flength (bm2));
+		  if (partial_p)
+		    {
+		      if (ln2 > ix2)
+			{
+			  bm = Fnth (make_number (ix2), bm2);
+			  if (!EQ (bm, Qt))
+			    goto found;
+			}
+		    }
+		}
+	    }
+	}
+    }
+
+  if (ln1 > ix1)
+    {
+      bm = Fnth (make_number (ix1), bm1);
+      if (!EQ (bm, Qt))
+	goto found;
+    }
+
+  if (ln2 > ix1)
+    {
+      bm = Fnth (make_number (ix1), bm2);
+      if (!EQ (bm, Qt))
+	goto found;
+      return NO_FRINGE_BITMAP;
+    }
+  else if ((bm = bm2, NILP (bm)))
+    return NO_FRINGE_BITMAP;
+
+ found:
+  return lookup_fringe_bitmap (bm);
+}
+
+
 void
 draw_fringe_bitmap (w, row, left_p)
      struct window *w;
@@ -666,24 +827,24 @@
 
   if (!left_p && row->cursor_in_fringe_p)
     {
-      int cursor = NO_FRINGE_BITMAP;
+      Lisp_Object cursor = Qnil;
 
       switch (w->phys_cursor_type)
 	{
 	case HOLLOW_BOX_CURSOR:
-	  if (row->visible_height >= STANDARD_BITMAP_HEIGHT (hollow_box_cursor_bits))
-	    cursor = HOLLOW_BOX_CURSOR_BITMAP;
+	  if (row->visible_height >= STANDARD_BITMAP_HEIGHT (hollow_rectangle_bits))
+	    cursor = Qhollow;
 	  else
-	    cursor = HOLLOW_SQUARE_BITMAP;
+	    cursor = Qhollow_small;
 	  break;
 	case FILLED_BOX_CURSOR:
-	  cursor = FILLED_BOX_CURSOR_BITMAP;
+	  cursor = Qbox;
 	  break;
 	case BAR_CURSOR:
-	  cursor = BAR_CURSOR_BITMAP;
+	  cursor = Qbar;
 	  break;
 	case HBAR_CURSOR:
-	  cursor = HBAR_CURSOR_BITMAP;
+	  cursor = Qhbar;
 	  break;
 	case NO_CURSOR:
 	default:
@@ -691,10 +852,14 @@
 	  row->cursor_in_fringe_p = 0;
 	  break;
 	}
-      if (cursor != NO_FRINGE_BITMAP)
+      if (!NILP (cursor))
 	{
-	  draw_fringe_bitmap_1 (w, row, 0, 2, cursor);
-	  overlay = cursor == FILLED_BOX_CURSOR_BITMAP ? 3 : 1;
+	  int bm = get_logical_cursor_bitmap (w, cursor);
+	  if (bm != NO_FRINGE_BITMAP)
+	    {
+	      draw_fringe_bitmap_1 (w, row, 0, 2, bm);
+	      overlay = EQ (cursor, Qbox) ? 3 : 1;
+	    }
 	}
     }
 
@@ -703,7 +868,7 @@
   if (left_p && row->overlay_arrow_bitmap != NO_FRINGE_BITMAP)
     draw_fringe_bitmap_1 (w, row, 1, 1,
 			  (row->overlay_arrow_bitmap < 0
-			   ? OVERLAY_ARROW_BITMAP
+			   ? get_logical_fringe_bitmap (w, Qoverlay_arrow, 0, 0)
 			   : row->overlay_arrow_bitmap));
 }
 
@@ -795,6 +960,8 @@
   Lisp_Object arrow_top = Qnil, arrow_bot = Qnil;
   Lisp_Object empty_pos;
   Lisp_Object ind = Qnil;
+#define MAX_BITMAP_CACHE (8*4)
+  int bitmap_cache[MAX_BITMAP_CACHE];
 
   if (w->pseudo_window_p)
     return 0;
@@ -880,11 +1047,27 @@
   if (!NILP (empty_pos) && !EQ (empty_pos, Qright))
     empty_pos = WINDOW_LEFT_FRINGE_WIDTH (w) == 0 ? Qright : Qleft;
 
+  for (y = 0; y < MAX_BITMAP_CACHE; y++)
+    bitmap_cache[y] = -1;
+
+#define LEFT_FRINGE(cache, which, partial_p)			\
+  (bitmap_cache[cache*4+partial_p] >= 0				\
+   ? bitmap_cache[cache*4+partial_p]				\
+   : (bitmap_cache[cache*4+partial_p] =				\
+      get_logical_fringe_bitmap (w, which, 0, partial_p)))
+
+#define RIGHT_FRINGE(cache, which, partial_p)			\
+  (bitmap_cache[cache*4+2+partial_p] >= 0			\
+   ? bitmap_cache[cache*4+2+partial_p]				\
+   : (bitmap_cache[cache*4+2+partial_p] =			\
+      get_logical_fringe_bitmap (w, which, 1, partial_p)))
+
+
   for (y = 0, rn = 0;
        y < yb && rn < nrows;
        y += row->height, rn++)
     {
-      enum fringe_bitmap_type left, right;
+      int left, right;
       unsigned left_face_id, right_face_id;
 
       row = w->desired_matrix->rows + rn;
@@ -903,23 +1086,21 @@
 	  left_face_id = row->left_user_fringe_face_id;
 	}
       else if (row->truncated_on_left_p)
-	left = LEFT_TRUNCATION_BITMAP;
+	left = LEFT_FRINGE(0, Qtruncation, 0);
       else if (row->indicate_bob_p && EQ (boundary_top, Qleft))
 	left = ((row->indicate_eob_p && EQ (boundary_bot, Qleft))
-		? (row->ends_at_zv_p
-		   ? TOP_RIGHT_ANGLE_BITMAP : LEFT_BRACKET_BITMAP)
-		: TOP_LEFT_ANGLE_BITMAP);
+		? LEFT_FRINGE (1, Qtop_bottom, row->ends_at_zv_p)
+		: LEFT_FRINGE (2, Qtop, 0));
       else if (row->indicate_eob_p && EQ (boundary_bot, Qleft))
-	left = (row->ends_at_zv_p
-		? TOP_RIGHT_ANGLE_BITMAP : BOTTOM_LEFT_ANGLE_BITMAP);
+	left = LEFT_FRINGE (3, Qbottom, row->ends_at_zv_p);
       else if (MATRIX_ROW_CONTINUATION_LINE_P (row))
-	left = CONTINUATION_LINE_BITMAP;
+	left = LEFT_FRINGE (4, Qcontinuation, 0);
       else if (row->indicate_empty_line_p && EQ (empty_pos, Qleft))
-	left = ZV_LINE_BITMAP;
+	left = LEFT_FRINGE (5, Qempty_line, 0);
       else if (row->indicate_top_line_p && EQ (arrow_top, Qleft))
-	left = UP_ARROW_BITMAP;
+	left = LEFT_FRINGE (6, Qup, 0);
       else if (row->indicate_bottom_line_p && EQ (arrow_bot, Qleft))
-	left = DOWN_ARROW_BITMAP;
+	left = LEFT_FRINGE (7, Qdown, 0);
       else
 	left = NO_FRINGE_BITMAP;
 
@@ -932,23 +1113,21 @@
 	  right_face_id = row->right_user_fringe_face_id;
 	}
       else if (row->truncated_on_right_p)
-	right = RIGHT_TRUNCATION_BITMAP;
+	right = RIGHT_FRINGE (0, Qtruncation, 0);
       else if (row->indicate_bob_p && EQ (boundary_top, Qright))
 	right = ((row->indicate_eob_p && EQ (boundary_bot, Qright))
-		 ? (row->ends_at_zv_p
-		    ? TOP_LEFT_ANGLE_BITMAP : RIGHT_BRACKET_BITMAP)
-		 : TOP_RIGHT_ANGLE_BITMAP);
+		 ? RIGHT_FRINGE (1, Qtop_bottom, row->ends_at_zv_p)
+		 : RIGHT_FRINGE (2, Qtop, 0));
       else if (row->indicate_eob_p && EQ (boundary_bot, Qright))
-	right = (row->ends_at_zv_p
-		 ? TOP_LEFT_ANGLE_BITMAP : BOTTOM_RIGHT_ANGLE_BITMAP);
+	right = RIGHT_FRINGE (3, Qbottom, row->ends_at_zv_p);
       else if (row->continued_p)
-	right = CONTINUED_LINE_BITMAP;
+	right = RIGHT_FRINGE (4, Qcontinuation, 0);
       else if (row->indicate_top_line_p && EQ (arrow_top, Qright))
-	right = UP_ARROW_BITMAP;
+	right = RIGHT_FRINGE (6, Qup, 0);
       else if (row->indicate_bottom_line_p && EQ (arrow_bot, Qright))
-	right = DOWN_ARROW_BITMAP;
+	right = RIGHT_FRINGE (7, Qdown, 0);
       else if (row->indicate_empty_line_p && EQ (empty_pos, Qright))
-	right = ZV_LINE_BITMAP;
+	right = RIGHT_FRINGE (5, Qempty_line, 0);
       else
 	right = NO_FRINGE_BITMAP;
 
@@ -1150,7 +1329,7 @@
 
 void
 init_fringe_bitmap (which, fb, once_p)
-     enum fringe_bitmap_type which;
+     int which;
      struct fringe_bitmap *fb;
      int once_p;
 {
@@ -1436,6 +1615,19 @@
 void
 syms_of_fringe ()
 {
+  Qtruncation = intern ("truncation");
+  staticpro (&Qtruncation);
+  Qcontinuation = intern ("continuation");
+  staticpro (&Qcontinuation);
+  Qoverlay_arrow = intern ("overlay-arrow");
+  staticpro (&Qoverlay_arrow);
+  Qempty_line = intern ("empty-line");
+  staticpro (&Qempty_line);
+  Qtop_bottom = intern ("top-bottom");
+  staticpro (&Qtop_bottom);
+  Qhollow_small = intern ("hollow-small");
+  staticpro (&Qhollow_small);
+
   defsubr (&Sdestroy_fringe_bitmap);
   defsubr (&Sdefine_fringe_bitmap);
   defsubr (&Sfringe_bitmaps_at_pos);
@@ -1451,8 +1643,7 @@
   Voverflow_newline_into_fringe = Qt;
 
   DEFVAR_LISP ("fringe-bitmaps", &Vfringe_bitmaps,
-    doc: /* List of fringe bitmap symbols.
-You must (require 'fringe) to use fringe bitmap symbols in your programs." */);
+    doc: /* List of fringe bitmap symbols.  */);
   Vfringe_bitmaps = Qnil;
 }
 
@@ -1473,7 +1664,7 @@
 void
 init_fringe_once ()
 {
-  enum fringe_bitmap_type bt;
+  int bt;
 
   for (bt = NO_FRINGE_BITMAP + 1; bt < MAX_STANDARD_FRINGE_BITMAPS; bt++)
     init_fringe_bitmap(bt, &standard_bitmaps[bt], 1);
@@ -1503,7 +1694,7 @@
 void
 w32_init_fringe ()
 {
-  enum fringe_bitmap_type bt;
+  int bt;
 
   if (!rif)
     return;
--- a/src/gtkutil.c	Wed Feb 22 06:52:00 2006 +0000
+++ b/src/gtkutil.c	Wed Feb 22 06:54:10 2006 +0000
@@ -199,7 +199,7 @@
     }
   else
     {
-      wv = (widget_value *) malloc (sizeof (widget_value));
+      wv = (widget_value *) xmalloc (sizeof (widget_value));
       malloc_cpt++;
     }
   memset (wv, 0, sizeof (widget_value));
--- a/src/macmenu.c	Wed Feb 22 06:52:00 2006 +0000
+++ b/src/macmenu.c	Wed Feb 22 06:54:10 2006 +0000
@@ -189,8 +189,9 @@
 static void list_of_panes P_ ((Lisp_Object));
 static void list_of_items P_ ((Lisp_Object));
 
-static void fill_submenu (MenuHandle, widget_value *);
-static void fill_menubar (widget_value *);
+static int fill_menu P_ ((MenuHandle, widget_value *, int));
+static void fill_menubar P_ ((widget_value *, int));
+static void dispose_menus P_ ((int));
 
 
 /* This holds a Lisp vector that holds the results of decoding
@@ -247,15 +248,6 @@
 /* Current depth within submenus.  */
 static int menu_items_submenu_depth;
 
-/* Flag which when set indicates a dialog or menu has been posted by
-   Xt on behalf of one of the widget sets.  */
-static int popup_activated_flag;
-
-/* Index of the next submenu */
-static int submenu_id;
-
-static int next_menubar_widget_id;
-
 /* This is set nonzero after the user activates the menu bar, and set
    to zero again after the menu bars are redisplayed by prepare_menu_bar.
    While it is nonzero, all calls to set_frame_menubar go deep.
@@ -1440,7 +1432,7 @@
       menu = GetMenuHandle (++i);
     }
 
-  i = menu_handle ? MIN_POPUP_SUBMENU_ID : MIN_SUBMENU_ID;  
+  i = menu_handle ? MIN_POPUP_SUBMENU_ID : MIN_SUBMENU_ID;
   menu = GetMenuHandle (i);
   while (menu != NULL)
     {
@@ -1679,27 +1671,7 @@
   /* Non-null value to indicate menubar has already been "created".  */
   f->output_data.mac->menubar_widget = 1;
 
-  {
-    int i = MIN_MENU_ID;
-    MenuHandle menu = GetMenuHandle (i);
-    while (menu != NULL)
-      {
-	DeleteMenu (i);
-	DisposeMenu (menu);
-	menu = GetMenuHandle (++i);
-      }
-
-    i = MIN_SUBMENU_ID;
-    menu = GetMenuHandle (i);
-    while (menu != NULL)
-      {
-	DeleteMenu (i);
-	DisposeMenu (menu);
-	menu = GetMenuHandle (++i);
-      }
-  }
-
-  fill_menubar (first_wv->contents);
+  fill_menubar (first_wv->contents, deep_p);
 
   /* Add event handler so we can detect C-g. */
   install_menu_quit_handler (NULL);
@@ -1708,22 +1680,6 @@
   UNBLOCK_INPUT;
 }
 
-/* Called from Fx_create_frame to create the initial menubar of a frame
-   before it is mapped, so that the window is mapped with the menubar already
-   there instead of us tacking it on later and thrashing the window after it
-   is visible.  */
-
-void
-initialize_frame_menubar (f)
-     FRAME_PTR f;
-{
-  /* This function is called before the first chance to redisplay
-     the frame.  It has to be, so the frame will have the right size.  */
-  FRAME_MENU_BAR_ITEMS (f) = menu_bar_items (FRAME_MENU_BAR_ITEMS (f));
-  set_frame_menubar (f, 1, 1);
-}
-
-
 /* Get rid of the menu bar of frame F, and free its storage.
    This is used when deleting a frame, and when turning off the menu bar.  */
 
@@ -1739,11 +1695,9 @@
 pop_down_menu (arg)
      Lisp_Object arg;
 {
-  struct Lisp_Save_Value *p1 = XSAVE_VALUE (Fcar (arg));
-  struct Lisp_Save_Value *p2 = XSAVE_VALUE (Fcdr (arg));
-
-  FRAME_PTR f = p1->pointer;
-  MenuHandle *menu = p2->pointer;
+  struct Lisp_Save_Value *p = XSAVE_VALUE (arg);
+  FRAME_PTR f = p->pointer;
+  MenuHandle menu = GetMenuHandle (POPUP_SUBMENU_ID);
 
   BLOCK_INPUT;
 
@@ -1752,19 +1706,9 @@
   FRAME_MAC_DISPLAY_INFO (f)->grabbed = 0;
 
   /* delete all menus */
-  {
-    int i = MIN_POPUP_SUBMENU_ID;
-    MenuHandle submenu = GetMenuHandle (i);
-    while (submenu != NULL)
-      {
-	DeleteMenu (i);
-	DisposeMenu (submenu);
-	submenu = GetMenuHandle (++i);
-      }
-  }
-
+  dispose_menus (MIN_POPUP_SUBMENU_ID);
   DeleteMenu (POPUP_SUBMENU_ID);
-  DisposeMenu (*menu);
+  DisposeMenu (menu);
 
   UNBLOCK_INPUT;
 
@@ -1998,8 +1942,8 @@
 
   /* Actually create the menu.  */
   menu = NewMenu (POPUP_SUBMENU_ID, "\p");
-  submenu_id = MIN_POPUP_SUBMENU_ID;
-  fill_submenu (menu, first_wv->contents);
+  InsertMenu (menu, -1);
+  fill_menu (menu, first_wv->contents, MIN_POPUP_SUBMENU_ID);
 
   /* Free the widget_value objects we used to specify the
      contents.  */
@@ -2016,11 +1960,7 @@
   menu_item_choice = 0;
   menu_item_selection = 0;
 
-  InsertMenu (menu, -1);
-
-  record_unwind_protect (pop_down_menu,
-                         Fcons (make_save_value (f, 0),
-                                make_save_value (&menu, 0)));
+  record_unwind_protect (pop_down_menu, make_save_value (f, 0));
 
   /* Add event handler so we can detect C-g. */
   install_menu_quit_handler (menu);
@@ -2421,15 +2361,16 @@
 }
 
 static void
-add_menu_item (MenuHandle menu, widget_value *wv, int submenu,
-	       int force_disable)
+add_menu_item (menu, pos, wv)
+     MenuHandle menu;
+     int pos;
+     widget_value *wv;
 {
 #if TARGET_API_MAC_CARBON
   CFStringRef item_name;
 #else
   Str255 item_name;
 #endif
-  int pos;
 
   if (name_is_separator (wv->name))
     AppendMenu (menu, "\p-");
@@ -2438,8 +2379,6 @@
       AppendMenu (menu, "\pX");
 
 #if TARGET_API_MAC_CARBON
-      pos = CountMenuItems (menu);
-
       item_name = cfstring_create_with_utf8_cstring (wv->name);
 
       if (wv->key != NULL)
@@ -2457,13 +2396,11 @@
       SetMenuItemTextWithCFString (menu, pos, item_name);
       CFRelease (item_name);
 
-      if (wv->enabled && !force_disable)
+      if (wv->enabled)
         EnableMenuItem (menu, pos);
       else
         DisableMenuItem (menu, pos);
 #else  /* ! TARGET_API_MAC_CARBON */
-      pos = CountMItems (menu);
-
       item_name[sizeof (item_name) - 1] = '\0';
       strncpy (item_name, wv->name, sizeof (item_name) - 1);
       if (wv->key != NULL)
@@ -2477,88 +2414,140 @@
       c2pstr (item_name);
       SetMenuItemText (menu, pos, item_name);
 
-      if (wv->enabled && !force_disable)
+      if (wv->enabled)
         EnableItem (menu, pos);
       else
         DisableItem (menu, pos);
 #endif  /* ! TARGET_API_MAC_CARBON */
 
       /* Draw radio buttons and tickboxes. */
-      {
       if (wv->selected && (wv->button_type == BUTTON_TYPE_TOGGLE ||
                            wv->button_type == BUTTON_TYPE_RADIO))
 	SetItemMark (menu, pos, checkMark);
       else
 	SetItemMark (menu, pos, noMark);
-      }
 
       SetMenuItemRefCon (menu, pos, (UInt32) wv->call_data);
     }
-
-  if (submenu != 0)
-    SetMenuItemHierarchicalID (menu, pos, submenu);
+}
+
+/* Construct native Mac OS menu based on widget_value tree.  */
+
+static int
+fill_menu (menu, wv, submenu_id)
+     MenuHandle menu;
+     widget_value *wv;
+     int submenu_id;
+{
+  int pos;
+
+  for (pos = 1; wv != NULL; wv = wv->next, pos++)
+    {
+      add_menu_item (menu, pos, wv);
+      if (wv->contents)
+	{
+	  MenuHandle submenu = NewMenu (submenu_id, "\pX");
+
+	  InsertMenu (submenu, -1);
+	  SetMenuItemHierarchicalID (menu, pos, submenu_id);
+	  submenu_id = fill_menu (submenu, wv->contents, submenu_id + 1);
+	}
+    }
+
+  return submenu_id;
 }
 
 /* Construct native Mac OS menubar based on widget_value tree.  */
 
 static void
-fill_submenu (MenuHandle menu, widget_value *wv)
+fill_menubar (wv, deep_p)
+     widget_value *wv;
+     int deep_p;
 {
-  for ( ; wv != NULL; wv = wv->next)
-    if (wv->contents)
-      {
-	int cur_submenu = submenu_id++;
-        MenuHandle submenu = NewMenu (cur_submenu, "\pX");
-        fill_submenu (submenu, wv->contents);
-        InsertMenu (submenu, -1);
-        add_menu_item (menu, wv, cur_submenu, 0);
-      }
-    else
-      add_menu_item (menu, wv, 0, 0);
+  int id, submenu_id;
+  MenuHandle menu;
+  Str255 title;
+#if !TARGET_API_MAC_CARBON
+  int title_changed_p = 0;
+#endif
+
+  /* Clean up the menu bar when filled by the entire menu trees.  */
+  if (deep_p)
+    {
+      dispose_menus (MIN_MENU_ID);
+      dispose_menus (MIN_SUBMENU_ID);
+#if !TARGET_API_MAC_CARBON
+      title_changed_p = 1;
+#endif
+    }
+
+  /* Fill menu bar titles and submenus.  Reuse the existing menu bar
+     titles as much as possible to minimize redraw (if !deep_p).  */
+  submenu_id = MIN_SUBMENU_ID;
+  for (id = MIN_MENU_ID; wv != NULL; wv = wv->next, id++)
+    {
+      strncpy (title, wv->name, 255);
+      title[255] = '\0';
+      c2pstr (title);
+
+      menu = GetMenuHandle (id);
+      if (menu)
+	{
+#if TARGET_API_MAC_CARBON
+	  Str255 old_title;
+
+	  GetMenuTitle (menu, old_title);
+	  if (!EqualString (title, old_title, false, false))
+	    SetMenuTitle (menu, title);
+#else  /* !TARGET_API_MAC_CARBON */
+	  if (!EqualString (title, (*menu)->menuData, false, false))
+	    {
+	      DeleteMenu (id);
+	      DisposeMenu (menu);
+	      menu = NewMenu (id, title);
+	      InsertMenu (menu, GetMenuHandle (id + 1) ? id + 1 : 0);
+	      title_changed_p = 1;
+	    }
+#endif  /* !TARGET_API_MAC_CARBON */
+	}
+      else
+	{
+	  menu = NewMenu (id, title);
+	  InsertMenu (menu, 0);
+#if !TARGET_API_MAC_CARBON
+	  title_changed_p = 1;
+#endif
+	}
+
+      if (wv->contents)
+        submenu_id = fill_menu (menu, wv->contents, submenu_id);
+    }
+
+  if (GetMenuHandle (id))
+    {
+      dispose_menus (id);
+#if !TARGET_API_MAC_CARBON
+      title_changed_p = 1;
+#endif
+    }
+
+#if !TARGET_API_MAC_CARBON
+  if (title_changed_p)
+    InvalMenuBar ();
+#endif
 }
 
-
-/* Construct native Mac OS menu based on widget_value tree.  */
-
 static void
-fill_menu (MenuHandle menu, widget_value *wv)
+dispose_menus (id)
+     int id;
 {
-  for ( ; wv != NULL; wv = wv->next)
-    if (wv->contents)
-      {
-	int cur_submenu = submenu_id++;
-        MenuHandle submenu = NewMenu (cur_submenu, "\pX");
-        fill_submenu (submenu, wv->contents);
-        InsertMenu (submenu, -1);
-        add_menu_item (menu, wv, cur_submenu, 0);
-      }
-    else
-      add_menu_item (menu, wv, 0, 0);
-}
-
-/* Construct native Mac OS menubar based on widget_value tree.  */
-
-static void
-fill_menubar (widget_value *wv)
-{
-  int id;
-
-  submenu_id  = MIN_SUBMENU_ID;
-
-  for (id = MIN_MENU_ID; wv != NULL; wv = wv->next, id++)
+  MenuHandle menu;
+
+  while ((menu = GetMenuHandle (id)) != NULL)
     {
-      MenuHandle menu;
-      Str255 title;
-
-      strncpy (title, wv->name, 255);
-      title[255] = 0;
-      c2pstr (title);
-      menu = NewMenu (id, title);
-
-      if (wv->contents)
-        fill_menu (menu, wv->contents);
-
-      InsertMenu (menu, 0);
+      DeleteMenu (id);
+      DisposeMenu (menu);
+      id++;
     }
 }
 
--- a/src/macterm.c	Wed Feb 22 06:52:00 2006 +0000
+++ b/src/macterm.c	Wed Feb 22 06:54:10 2006 +0000
@@ -285,7 +285,7 @@
   if (new_region == NULL)
     new_region = NewRgn ();
 
-  if (region)
+  if (region && !EmptyRgn (region))
     {
       GetClip (saved_port_clip_region);
       SectRgn (saved_port_clip_region, region, new_region);
@@ -297,7 +297,7 @@
 mac_end_clip (region)
      RgnHandle region;
 {
-  if (region)
+  if (region && !EmptyRgn (region))
     SetClip (saved_port_clip_region);
 }
 
@@ -684,27 +684,15 @@
 
 
 static void
-mac_draw_string_common (f, gc, x, y, buf, nchars, mode, bytes_per_char)
+mac_draw_string_common (f, gc, x, y, buf, nchars, bg_width, bytes_per_char)
      struct frame *f;
      GC gc;
      int x, y;
      char *buf;
-     int nchars, mode, bytes_per_char;
-{
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1020
-  UInt32 textFlags, savedFlags;
-  if (mac_use_core_graphics) {
-    textFlags = kQDUseCGTextRendering;
-    savedFlags = SwapQDTextFlags(textFlags);
-  }
-#endif
-
+     int nchars, bg_width, bytes_per_char;
+{
   SetPortWindowPort (FRAME_MAC_WINDOW (f));
 
-  RGBForeColor (GC_FORE_COLOR (gc));
-  if (mode != srcOr)
-    RGBBackColor (GC_BACK_COLOR (gc));
-
 #if USE_ATSUI
   if (GC_FONT (gc)->mac_style)
     {
@@ -726,91 +714,144 @@
 						nchars,
 						GC_FONT (gc)->mac_style,
 						&text_layout);
-      if (err == noErr)
-	{
-#ifdef MAC_OSX
-	  if (!mac_use_core_graphics)
-	    {
-#endif
-	      mac_begin_clip (GC_CLIP_REGION (gc));
-	      MoveTo (x, y);
-	      ATSUDrawText (text_layout,
-			    kATSUFromTextBeginning, kATSUToTextEnd,
-			    kATSUUseGrafPortPenLoc, kATSUUseGrafPortPenLoc);
-	      mac_end_clip (GC_CLIP_REGION (gc));
+      if (err != noErr)
+	return;
 #ifdef MAC_OSX
-	    }
-	  else
+      if (!mac_use_core_graphics)
+	{
+#endif
+	  mac_begin_clip (GC_CLIP_REGION (gc));
+	  RGBForeColor (GC_FORE_COLOR (gc));
+	  if (bg_width)
 	    {
-	      CGrafPtr port;
-	      CGContextRef context;
-	      float port_height = FRAME_PIXEL_HEIGHT (f);
-	      ATSUAttributeTag tags[] = {kATSUCGContextTag};
-	      ByteCount sizes[] = {sizeof (CGContextRef)};
-	      ATSUAttributeValuePtr values[] = {&context};
-
-	      GetPort (&port);
-	      QDBeginCGContext (port, &context);
+	      Rect r;
+
+	      SetRect (&r, x, y - FONT_BASE (GC_FONT (gc)),
+		       x + bg_width, y + FONT_DESCENT (GC_FONT (gc)));
+	      RGBBackColor (GC_BACK_COLOR (gc));
+	      EraseRect (&r);
+	      RGBBackColor (GC_BACK_COLOR (FRAME_NORMAL_GC (f)));
+	    }
+	  MoveTo (x, y);
+	  ATSUDrawText (text_layout,
+			kATSUFromTextBeginning, kATSUToTextEnd,
+			kATSUUseGrafPortPenLoc, kATSUUseGrafPortPenLoc);
+	  mac_end_clip (GC_CLIP_REGION (gc));
+#ifdef MAC_OSX
+	}
+      else
+	{
+	  CGrafPtr port;
+	  CGContextRef context;
+	  float port_height = FRAME_PIXEL_HEIGHT (f);
+	  ATSUAttributeTag tags[] = {kATSUCGContextTag};
+	  ByteCount sizes[] = {sizeof (CGContextRef)};
+	  ATSUAttributeValuePtr values[] = {&context};
+
+	  GetPort (&port);
+	  QDBeginCGContext (port, &context);
+	  if (gc->n_clip_rects || bg_width)
+	    {
+	      CGContextTranslateCTM (context, 0, port_height);
+	      CGContextScaleCTM (context, 1, -1);
 	      if (gc->n_clip_rects)
+		CGContextClipToRects (context, gc->clip_rects,
+				      gc->n_clip_rects);
+	      if (bg_width)
 		{
-		  CGContextTranslateCTM (context, 0, port_height);
-		  CGContextScaleCTM (context, 1, -1);
-		  CGContextClipToRects (context, gc->clip_rects,
-					gc->n_clip_rects);
-		  CGContextScaleCTM (context, 1, -1);
-		  CGContextTranslateCTM (context, 0, -port_height);
+		  CGContextSetRGBFillColor
+		    (context,
+		     RED_FROM_ULONG (gc->xgcv.background) / 255.0f,
+		     GREEN_FROM_ULONG (gc->xgcv.background) / 255.0f,
+		     BLUE_FROM_ULONG (gc->xgcv.background) / 255.0f,
+		     1.0);
+		  CGContextFillRect
+		    (context,
+		     CGRectMake (x, y - FONT_BASE (GC_FONT (gc)),
+				 bg_width, FONT_HEIGHT (GC_FONT (gc))));
 		}
-	      CGContextSetRGBFillColor
-		(context,
-		 RED_FROM_ULONG (gc->xgcv.foreground) / 255.0,
-		 GREEN_FROM_ULONG (gc->xgcv.foreground) / 255.0,
-		 BLUE_FROM_ULONG (gc->xgcv.foreground) / 255.0,
-		 1.0);
-	      err = ATSUSetLayoutControls (text_layout,
-					   sizeof (tags) / sizeof (tags[0]),
-					   tags, sizes, values);
-	      if (err == noErr)
-		ATSUDrawText (text_layout,
-			      kATSUFromTextBeginning, kATSUToTextEnd,
-			      Long2Fix (x), Long2Fix (port_height - y));
-	      CGContextSynchronize (context);
-	      QDEndCGContext (port, &context);
+	      CGContextScaleCTM (context, 1, -1);
+	      CGContextTranslateCTM (context, 0, -port_height);
+	    }
+	  CGContextSetRGBFillColor
+	    (context,
+	     RED_FROM_ULONG (gc->xgcv.foreground) / 255.0f,
+	     GREEN_FROM_ULONG (gc->xgcv.foreground) / 255.0f,
+	     BLUE_FROM_ULONG (gc->xgcv.foreground) / 255.0f,
+	     1.0);
+	  err = ATSUSetLayoutControls (text_layout,
+				       sizeof (tags) / sizeof (tags[0]),
+				       tags, sizes, values);
+	  if (err == noErr)
+	    ATSUDrawText (text_layout,
+			  kATSUFromTextBeginning, kATSUToTextEnd,
+			  Long2Fix (x), Long2Fix (port_height - y));
+	  CGContextSynchronize (context);
+	  QDEndCGContext (port, &context);
 #if 0
-	      /* This doesn't work on Mac OS X 10.1.  */
-	      ATSUClearLayoutControls (text_layout,
-				       sizeof (tags) / sizeof (tags[0]),
-				       tags);
+	  /* This doesn't work on Mac OS X 10.1.  */
+	  ATSUClearLayoutControls (text_layout,
+				   sizeof (tags) / sizeof (tags[0]), tags);
 #else
-	      ATSUSetLayoutControls (text_layout,
-				     sizeof (tags) / sizeof (tags[0]),
-				     tags, sizes, values);
-#endif
-	    }
+	  ATSUSetLayoutControls (text_layout,
+				 sizeof (tags) / sizeof (tags[0]),
+				 tags, sizes, values);
 #endif
 	}
+#endif	/* MAC_OSX */
     }
   else
-    {
-#endif
-  TextFont (GC_FONT (gc)->mac_fontnum);
-  TextSize (GC_FONT (gc)->mac_fontsize);
-  TextFace (GC_FONT (gc)->mac_fontface);
-  TextMode (mode);
-
-  mac_begin_clip (GC_CLIP_REGION (gc));
-  MoveTo (x, y);
-  DrawText (buf, 0, nchars * bytes_per_char);
-  mac_end_clip (GC_CLIP_REGION (gc));
-#if USE_ATSUI
-    }
-#endif
-
-  if (mode != srcOr)
-    RGBBackColor (GC_BACK_COLOR (FRAME_NORMAL_GC (f)));
+#endif	/* USE_ATSUI */
+    {
 #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1020
-  if (mac_use_core_graphics)
-    SwapQDTextFlags(savedFlags);
-#endif
+      UInt32 savedFlags;
+
+      if (mac_use_core_graphics)
+	savedFlags = SwapQDTextFlags (kQDUseCGTextRendering);
+#endif
+      mac_begin_clip (GC_CLIP_REGION (gc));
+      RGBForeColor (GC_FORE_COLOR (gc));
+#ifdef MAC_OS8
+      if (bg_width)
+	{
+	  RGBBackColor (GC_BACK_COLOR (gc));
+	  TextMode (srcCopy);
+	}
+      else
+	TextMode (srcOr);
+#else
+      /* We prefer not to use srcCopy text transfer mode on Mac OS X
+	 because:
+	 - Screen is double-buffered.  (In srcCopy mode, a text is
+	   drawn into an offscreen graphics world first.  So
+	   performance gain cannot be expected.)
+	 - It lowers rendering quality.
+	 - Some fonts leave garbage on cursor movement.  */
+      if (bg_width)
+	{
+	  Rect r;
+
+	  RGBBackColor (GC_BACK_COLOR (gc));
+	  SetRect (&r, x, y - FONT_BASE (GC_FONT (gc)),
+		   x + bg_width, y + FONT_DESCENT (GC_FONT (gc)));
+	  EraseRect (&r);
+	}
+      TextMode (srcOr);
+#endif
+      TextFont (GC_FONT (gc)->mac_fontnum);
+      TextSize (GC_FONT (gc)->mac_fontsize);
+      TextFace (GC_FONT (gc)->mac_fontface);
+      MoveTo (x, y);
+      DrawText (buf, 0, nchars * bytes_per_char);
+      if (bg_width)
+	RGBBackColor (GC_BACK_COLOR (FRAME_NORMAL_GC (f)));
+      mac_end_clip (GC_CLIP_REGION (gc));
+
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1020
+      if (mac_use_core_graphics)
+	SwapQDTextFlags(savedFlags);
+#endif
+    }
 }
 
 
@@ -824,7 +865,7 @@
      char *buf;
      int nchars;
 {
-  mac_draw_string_common (f, gc, x, y, buf, nchars, srcOr, 1);
+  mac_draw_string_common (f, gc, x, y, buf, nchars, 0, 1);
 }
 
 
@@ -838,35 +879,35 @@
      XChar2b *buf;
      int nchars;
 {
-  mac_draw_string_common (f, gc, x, y, (char *) buf, nchars, srcOr, 2);
+  mac_draw_string_common (f, gc, x, y, (char *) buf, nchars, 0, 2);
 }
 
 
 /* Mac replacement for XDrawImageString.  */
 
 static void
-mac_draw_image_string (f, gc, x, y, buf, nchars)
+mac_draw_image_string (f, gc, x, y, buf, nchars, bg_width)
      struct frame *f;
      GC gc;
      int x, y;
      char *buf;
-     int nchars;
-{
-  mac_draw_string_common (f, gc, x, y, buf, nchars, srcCopy, 1);
+     int nchars, bg_width;
+{
+  mac_draw_string_common (f, gc, x, y, buf, nchars, bg_width, 1);
 }
 
 
 /* Mac replacement for XDrawString16.  */
 
 static void
-mac_draw_image_string_16 (f, gc, x, y, buf, nchars)
+mac_draw_image_string_16 (f, gc, x, y, buf, nchars, bg_width)
      struct frame *f;
      GC gc;
      int x, y;
      XChar2b *buf;
-     int nchars;
-{
-  mac_draw_string_common (f, gc, x, y, (char *) buf, nchars, srcCopy, 2);
+     int nchars, bg_width;
+{
+  mac_draw_string_common (f, gc, x, y, (char *) buf, nchars, bg_width, 2);
 }
 
 
@@ -1040,12 +1081,12 @@
 }
 
 static int
-mac_draw_string_cg (f, gc, x, y, buf, nchars)
+mac_draw_image_string_cg (f, gc, x, y, buf, nchars, bg_width)
      struct frame *f;
      GC gc;
      int x, y;
      XChar2b *buf;
-     int nchars;
+     int nchars, bg_width;
 {
   CGrafPtr port;
   float port_height, gx, gy;
@@ -1062,7 +1103,9 @@
   gx = x;
   gy = port_height - y;
   glyphs = (CGGlyph *)buf;
-  advances = xmalloc (sizeof (CGSize) * nchars);
+  advances = alloca (sizeof (CGSize) * nchars);
+  if (advances == NULL)
+    return 0;
   for (i = 0; i < nchars; i++)
     {
       XCharStruct *pcm = mac_per_char_metric (GC_FONT (gc), buf, 0);
@@ -1074,18 +1117,32 @@
     }
 
   QDBeginCGContext (port, &context);
-  if (gc->n_clip_rects)
+  if (gc->n_clip_rects || bg_width)
     {
       CGContextTranslateCTM (context, 0, port_height);
       CGContextScaleCTM (context, 1, -1);
-      CGContextClipToRects (context, gc->clip_rects, gc->n_clip_rects);
+      if (gc->n_clip_rects)
+	CGContextClipToRects (context, gc->clip_rects, gc->n_clip_rects);
+      if (bg_width)
+	{
+	  CGContextSetRGBFillColor
+	    (context,
+	     RED_FROM_ULONG (gc->xgcv.background) / 255.0f,
+	     GREEN_FROM_ULONG (gc->xgcv.background) / 255.0f,
+	     BLUE_FROM_ULONG (gc->xgcv.background) / 255.0f,
+	     1.0);
+	  CGContextFillRect
+	    (context,
+	     CGRectMake (gx, y - FONT_BASE (GC_FONT (gc)),
+			 bg_width, FONT_HEIGHT (GC_FONT (gc))));
+	}
       CGContextScaleCTM (context, 1, -1);
       CGContextTranslateCTM (context, 0, -port_height);
     }
   CGContextSetRGBFillColor (context,
-			    RED_FROM_ULONG (gc->xgcv.foreground) / 255.0,
-			    GREEN_FROM_ULONG (gc->xgcv.foreground) / 255.0,
-			    BLUE_FROM_ULONG (gc->xgcv.foreground) / 255.0,
+			    RED_FROM_ULONG (gc->xgcv.foreground) / 255.0f,
+			    GREEN_FROM_ULONG (gc->xgcv.foreground) / 255.0f,
+			    BLUE_FROM_ULONG (gc->xgcv.foreground) / 255.0f,
 			    1.0);
   CGContextSetFont (context, GC_FONT (gc)->cg_font);
   CGContextSetFontSize (context, GC_FONT (gc)->mac_fontsize);
@@ -1104,8 +1161,6 @@
   CGContextSynchronize (context);
   QDEndCGContext (port, &context);
 
-  xfree (advances);
-
   return 1;
 }
 #endif
@@ -1377,10 +1432,7 @@
   if (n == 0)
     {
       if (gc->clip_region)
-	{
-	  DisposeRgn (gc->clip_region);
-	  gc->clip_region = NULL;
-	}
+	SetEmptyRgn (gc->clip_region);
     }
   else
     {
@@ -2324,14 +2376,6 @@
 }
 
 
-/* We prefer not to use XDrawImageString (srcCopy text transfer mode)
-   on Mac OS X because:
-   - Screen is double-buffered.  (In srcCopy mode, a text is drawn
-     into an offscreen graphics world first.  So performance gain
-     cannot be expected.)
-   - It lowers rendering quality.
-   - Some fonts leave garbage on cursor movement.  */
-
 /* Draw the background of glyph_string S.  If S->background_filled_p
    is non-zero don't draw it.  FORCE_P non-zero means draw the
    background even if it wouldn't be drawn normally.  This is used
@@ -2363,12 +2407,10 @@
 	}
       else
 #endif
-#if defined (MAC_OS8) && !USE_ATSUI
         if (FONT_HEIGHT (s->font) < s->height - 2 * box_line_width
 	       || s->font_not_found_p
 	       || s->extends_to_end_of_line_p
 	       || force_p)
-#endif
 	{
 	  x_clear_glyph_string_rect (s, s->x, s->y + box_line_width,
 				     s->background_width,
@@ -2385,7 +2427,7 @@
 x_draw_glyph_string_foreground (s)
      struct glyph_string *s;
 {
-  int i, x;
+  int i, x, bg_width;
 
   /* If first glyph of S has a left box line, start drawing the text
      of S to the right of that box line.  */
@@ -2424,7 +2466,6 @@
 	for (i = 0; i < s->nchars; ++i)
 	  char1b[i] = s->char2b[i].byte2;
 
-#if defined (MAC_OS8) && !USE_ATSUI
       /* Draw text with XDrawString if background has already been
 	 filled.  Otherwise, use XDrawImageString.  (Note that
 	 XDrawImageString is usually faster than XDrawString.)  Always
@@ -2432,38 +2473,27 @@
 	 no chance that characters under a box cursor are invisible.  */
       if (s->for_overlaps
 	  || (s->background_filled_p && s->hl != DRAW_CURSOR))
-#endif
-	{
-	  /* Draw characters with 16-bit or 8-bit functions.  */
-	  if (s->two_byte_p
+	bg_width = 0;		/* Corresponds to XDrawString.  */
+      else
+	bg_width = s->background_width; /* Corresponds to XDrawImageString.  */
+
+      if (s->two_byte_p
 #if USE_ATSUI
-	      || GC_FONT (s->gc)->mac_style
-#endif
-	      )
+	  || GC_FONT (s->gc)->mac_style
+#endif
+	  )
 #if USE_CG_TEXT_DRAWING
-	    if (!s->two_byte_p
-		&& mac_draw_string_cg (s->f, s->gc, x, s->ybase - boff,
-				       s->char2b, s->nchars))
-	      ;
-	    else
-#endif
-	    mac_draw_string_16 (s->f, s->gc, x,	s->ybase - boff,
-				s->char2b, s->nchars);
-	  else
-	    mac_draw_string (s->f, s->gc, x, s->ybase - boff,
-			     char1b, s->nchars);
-	}
-#if defined (MAC_OS8) && !USE_ATSUI
+	if (!s->two_byte_p
+	    && mac_draw_image_string_cg (s->f, s->gc, x, s->ybase - boff,
+					 s->char2b, s->nchars, bg_width))
+	  ;
+	else
+#endif
+	  mac_draw_image_string_16 (s->f, s->gc, x, s->ybase - boff,
+				    s->char2b, s->nchars, bg_width);
       else
-	{
-	  if (s->two_byte_p)
-	    mac_draw_image_string_16 (s->f, s->gc, x, s->ybase - boff,
-				      s->char2b, s->nchars);
-	  else
-	    mac_draw_image_string (s->f, s->gc, x, s->ybase - boff,
-				   char1b, s->nchars);
-	}
-#endif
+	mac_draw_image_string (s->f, s->gc, x, s->ybase - boff,
+			       char1b, s->nchars, bg_width);
     }
 }
 
@@ -7856,9 +7886,13 @@
 #if !defined (MAC_OS8) || USE_ATSUI
   /* AppKit and WebKit do some adjustment to the heights of Courier,
      Helvetica, and Times.  This only works on the environments where
-     the XDrawImageString counterpart is never used.  */
-  if (strcmp (family, "courier") == 0 || strcmp (family, "helvetica") == 0
-      || strcmp (family, "times") == 0)
+     srcCopy text transfer mode is never used.  */
+  if (
+#ifdef MAC_OS8			/* implies USE_ATSUI */
+      font->mac_style &&
+#endif
+      (strcmp (family, "courier") == 0 || strcmp (family, "helvetica") == 0
+       || strcmp (family, "times") == 0))
     font->ascent += (font->ascent + font->descent) * .15 + 0.5;
 #endif
 
--- a/src/puresize.h	Wed Feb 22 06:52:00 2006 +0000
+++ b/src/puresize.h	Wed Feb 22 06:54:10 2006 +0000
@@ -43,7 +43,7 @@
 #endif
 
 #ifndef BASE_PURESIZE
-#define BASE_PURESIZE (1190000 + SYSTEM_PURESIZE_EXTRA + SITELOAD_PURESIZE_EXTRA)
+#define BASE_PURESIZE (1200000 + SYSTEM_PURESIZE_EXTRA + SITELOAD_PURESIZE_EXTRA)
 #endif
 
 /* Increase BASE_PURESIZE by a ratio depending on the machine's word size.  */
--- a/src/regex.c	Wed Feb 22 06:52:00 2006 +0000
+++ b/src/regex.c	Wed Feb 22 06:54:10 2006 +0000
@@ -197,6 +197,51 @@
 char *realloc ();
 # endif
 
+/* When used in Emacs's lib-src, we need xmalloc and xrealloc. */
+
+void *
+xmalloc (size)
+     size_t size;
+{
+  register void *val;
+  val = (void *) malloc (size);
+  if (!val && size)
+    {
+      write (2, "virtual memory exhausted\n", 25);
+      exit (1);
+    }
+  return val;
+}
+
+void *
+xrealloc (block, size)
+     void *block;
+     size_t size;
+{
+  register void *val;
+  /* We must call malloc explicitly when BLOCK is 0, since some
+     reallocs don't do this.  */
+  if (! block)
+    val = (void *) malloc (size);
+  else
+    val = (void *) realloc (block, size);
+  if (!val && size)
+    {
+      write (2, "virtual memory exhausted\n", 25);
+      exit (1);
+    }
+  return val;
+}
+
+# ifdef malloc
+#  undef malloc
+# endif
+# define malloc xmalloc
+# ifdef realloc
+#  undef realloc
+# endif
+# define realloc xrealloc
+
 /* When used in Emacs's lib-src, we need to get bzero and bcopy somehow.
    If nothing else has been done, use the method below.  */
 # ifdef INHIBIT_STRING_HEADER
--- a/src/vm-limit.c	Wed Feb 22 06:52:00 2006 +0000
+++ b/src/vm-limit.c	Wed Feb 22 06:54:10 2006 +0000
@@ -33,6 +33,10 @@
 
 #include "mem-limits.h"
 
+#ifdef HAVE_GETRLIMIT
+#include <sys/resource.h>
+#endif
+
 /*
   Level number of warnings already issued.
   0 -- no warnings issued.
@@ -61,6 +65,19 @@
   unsigned long five_percent;
   unsigned long data_size;
 
+#ifdef HAVE_GETRLIMIT
+  struct rlimit {
+    rlim_t rlim_cur;
+    rlim_t rlim_max;
+  } rlimit;
+
+  getrlimit (RLIMIT_DATA, &rlimit);
+
+  five_percent = rlimit.rlim_max / 20;
+  data_size = rlimit.rlim_cur;
+
+#else /* not HAVE_GETRLIMIT */
+
   if (lim_data == 0)
     get_lim_data ();
   five_percent = lim_data / 20;
@@ -74,6 +91,8 @@
   cp = (char *) (*__morecore) (0);
   data_size = (char *) cp - (char *) data_space_start;
 
+#endif /* not HAVE_GETRLIMIT */
+
   if (warn_function)
     switch (warnlevel)
       {
--- a/src/window.c	Wed Feb 22 06:52:00 2006 +0000
+++ b/src/window.c	Wed Feb 22 06:54:10 2006 +0000
@@ -2568,7 +2568,10 @@
   else
     {
       if (width_p)
-	size = window_min_width;
+	size = max (window_min_width,
+		    (MIN_SAFE_WINDOW_WIDTH
+		     + WINDOW_FRINGE_COLS (w)
+		     + WINDOW_SCROLL_BAR_COLS (w)));
       else
 	{
 	  if (MINI_WINDOW_P (w)
@@ -4286,7 +4289,7 @@
 	    {
               /* This may happen for the minibuffer.  In that case
                  the window_deletion_count check below does not work.  */
-              if (XINT (CURSIZE (p->next)) - delta <= 0) 
+              if (XINT (CURSIZE (p->next)) - delta <= 0)
                 {
                   Fset_window_configuration (old_config);
                   error ("Cannot adjust window size as specified");
@@ -6600,7 +6603,8 @@
 Third parameter VERTICAL-TYPE specifies the type of the vertical scroll
 bar: left, right, or nil.
 If WIDTH is nil, use the frame's scroll-bar width.
-If TYPE is t, use the frame's scroll-bar type.  */)
+If VERTICAL-TYPE is t, use the frame's scroll-bar type.
+Fourth parameter HORIZONTAL-TYPE is currently unused.  */)
      (window, width, vertical_type, horizontal_type)
      Lisp_Object window, width, vertical_type, horizontal_type;
 {
--- a/src/xdisp.c	Wed Feb 22 06:52:00 2006 +0000
+++ b/src/xdisp.c	Wed Feb 22 06:54:10 2006 +0000
@@ -9158,14 +9158,15 @@
 	  /* Redisplay the menu bar in case we changed it.  */
 #if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) || defined (MAC_OS) \
     || defined (USE_GTK)
-	  if (FRAME_WINDOW_P (f)
-#if defined (MAC_OS)
-              /* All frames on Mac OS share the same menubar.  So only the
-                 selected frame should be allowed to set it.  */
-              && f == SELECTED_FRAME ()
-#endif
-	     )
-	    set_frame_menubar (f, 0, 0);
+	  if (FRAME_WINDOW_P (f))
+	    {
+#ifdef MAC_OS
+              /* All frames on Mac OS share the same menubar.  So only
+                 the selected frame should be allowed to set it.  */
+              if (f == SELECTED_FRAME ())
+#endif
+		set_frame_menubar (f, 0, 0);
+	    }
 	  else
 	    /* On a terminal screen, the menu bar is an ordinary screen
 	       line, and this makes it get updated.  */
@@ -16572,8 +16573,11 @@
 		    {
 		      int bytepos = last_offset;
 		      int charpos = string_byte_to_char (elt, bytepos);
+
+		      if (precision <= 0)
+			nchars = string_byte_to_char (elt, offset) - charpos;
 		      n += display_string (NULL, elt, Qnil, 0, charpos,
-					   it, 0, prec, 0,
+					   it, 0, nchars, 0,
 					   STRING_MULTIBYTE (elt));
 		    }
 		    break;
@@ -17825,7 +17829,7 @@
    display them, and < 0 means obey the current buffer's value of
    enable_multibyte_characters.
 
-   Value is the number of glyphs produced.  */
+   Value is the number of columns displayed.  */
 
 static int
 display_string (string, lisp_string, face_string, face_string_pos,
--- a/src/xfns.c	Wed Feb 22 06:52:00 2006 +0000
+++ b/src/xfns.c	Wed Feb 22 06:54:10 2006 +0000
@@ -5313,6 +5313,7 @@
   int result;
   struct frame *f = SELECTED_FRAME ();
   Lisp_Object file = Qnil;
+  Lisp_Object decoded_file;
   Widget dialog, text, help;
   Arg al[10];
   int ac = 0;
@@ -5453,7 +5454,9 @@
   if (NILP (file))
     Fsignal (Qquit, Qnil);
 
-  return unbind_to (count, file);
+  decoded_file = DECODE_FILE (file);
+
+  return unbind_to (count, decoded_file);
 }
 
 #endif /* USE_MOTIF */
@@ -5481,6 +5484,7 @@
   FRAME_PTR f = SELECTED_FRAME ();
   char *fn;
   Lisp_Object file = Qnil;
+  Lisp_Object decoded_file;
   int count = SPECPDL_INDEX ();
   struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5, gcpro6;
   char *cdef_file;
@@ -5521,7 +5525,9 @@
   if (NILP (file))
     Fsignal (Qquit, Qnil);
 
-  return unbind_to (count, file);
+  decoded_file = DECODE_FILE (file);
+
+  return unbind_to (count, decoded_file);
 }
 
 #endif /* USE_GTK */
--- a/src/xmenu.c	Wed Feb 22 06:52:00 2006 +0000
+++ b/src/xmenu.c	Wed Feb 22 06:54:10 2006 +0000
@@ -1807,8 +1807,11 @@
 	      wv->enabled = 1;
 	      wv->button_type = BUTTON_TYPE_NONE;
 	      wv->help = Qnil;
+	      save_wv = wv;
 	    }
-	  save_wv = wv;
+	  else
+	    save_wv = first_wv;
+
 	  prev_wv = 0;
 	  i += MENU_ITEMS_PANE_LENGTH;
 	}
--- a/src/xterm.c	Wed Feb 22 06:52:00 2006 +0000
+++ b/src/xterm.c	Wed Feb 22 06:54:10 2006 +0000
@@ -7567,7 +7567,7 @@
      Display *dpy;
 {
   int count = SPECPDL_INDEX ();
-  struct x_error_message_stack *data = malloc (sizeof (*data));
+  struct x_error_message_stack *data = xmalloc (sizeof (*data));
   Lisp_Object dummy;
 #ifdef ENABLE_CHECKING
   dummy = make_number ((EMACS_INT)dpy + (EMACS_INT)x_error_message);