changeset 83104:625059157bad

Merged in changes from CVS trunk. Patches applied: * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-220 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-221 Restore deleted tagline in etc/TUTORIAL.ru * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-222 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-223 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-224 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-225 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-144
author Karoly Lorentey <lorentey@elte.hu>
date Sun, 18 Apr 2004 01:40:02 +0000
parents efc0b56b83d9 (current diff) a40f83f2ce7e (diff)
children efc02a84dfbb
files ChangeLog lisp/ChangeLog lisp/allout.el lisp/url/url-dav.el lisp/url/url-file.el lisp/url/url-handlers.el lisp/url/url-http.el lisp/url/url-https.el lisp/url/url-nfs.el lisp/url/url-util.el src/buffer.c src/keyboard.c src/keymap.c src/xdisp.c
diffstat 43 files changed, 988 insertions(+), 701 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Sun Apr 18 01:34:11 2004 +0000
+++ b/ChangeLog	Sun Apr 18 01:40:02 2004 +0000
@@ -1,3 +1,8 @@
+2004-04-17  Richard M. Stallman  <rms@gnu.org>
+
+	* INSTALL: Move the info about site-lisp dirs,
+	and say uninstalled Emacs looks there too.
+
 2004-04-04  Eli Zaretskii  <eliz@gnu.org>
 
 	* config.bat (lib-src): Recognize comment lines in Makefile.in
--- a/INSTALL	Sun Apr 18 01:34:11 2004 +0000
+++ b/INSTALL	Sun Apr 18 01:40:02 2004 +0000
@@ -466,17 +466,6 @@
 		at the same time; in particular, you don't have to
 		make Emacs unavailable while installing a new version.
 
-`/usr/local/share/emacs/VERSION/site-lisp' holds the local Emacs Lisp
-		files installed for Emacs version VERSION only.
-
-`/usr/local/share/emacs/site-lisp' holds the local Emacs Lisp
-		files installed for all Emacs versions.
-
-		When Emacs is installed, it searches for its Lisp files
-		in `/usr/local/share/emacs/VERSION/site-lisp', then in
-		`/usr/local/share/emacs/site-lisp', and finally in
-		`/usr/local/share/emacs/VERSION/lisp'.
-
 `/usr/local/share/emacs/VERSION/etc' holds the Emacs tutorial, the DOC
 		file, the `yow' database, and other
 		architecture-independent files Emacs might need while
@@ -506,6 +495,20 @@
 `/usr/local/man/man1' holds the man pages for the programs installed
 		in `/usr/local/bin'.
 
+Any version of Emacs, whether installed or not, also looks for Lisp
+files in these directories.
+
+`/usr/local/share/emacs/VERSION/site-lisp' holds the local Emacs Lisp
+		files installed for Emacs version VERSION only.
+
+`/usr/local/share/emacs/site-lisp' holds the local Emacs Lisp
+		files installed for all Emacs versions.
+
+		When Emacs is installed, it searches for its Lisp files
+		in `/usr/local/share/emacs/VERSION/site-lisp', then in
+		`/usr/local/share/emacs/site-lisp', and finally in
+		`/usr/local/share/emacs/VERSION/lisp'.
+
 If these directories are not what you want, you can specify where to
 install Emacs's libraries and data files or where Emacs should search
 for its Lisp files by giving values for `make' variables as part of
--- a/etc/ChangeLog	Sun Apr 18 01:34:11 2004 +0000
+++ b/etc/ChangeLog	Sun Apr 18 01:40:02 2004 +0000
@@ -1,3 +1,7 @@
+2004-04-16  David Kastrup  <dak@gnu.org>
+
+	* TUTORIAL.ru: Changes by Alex Ott checked in.
+
 2004-04-14  Jan Nieuwenhuizen  <janneke@gnu.org>
 
 	* TUTORIAL.nl: Update Delete/Delback translation.
--- a/etc/NEWS	Sun Apr 18 01:34:11 2004 +0000
+++ b/etc/NEWS	Sun Apr 18 01:40:02 2004 +0000
@@ -88,6 +88,7 @@
 
 * Changes in Emacs 21.4
 
++++
 ** New command line option -Q.
 
 This is like using -q --no-site-file, but in addition it also disables
--- a/etc/TUTORIAL.fr	Sun Apr 18 01:34:11 2004 +0000
+++ b/etc/TUTORIAL.fr	Sun Apr 18 01:40:02 2004 +0000
@@ -1197,6 +1197,7 @@
 
 ;;; Local Variables:
 ;;;   coding: latin-1
+;;;   sentence-end-double-space: nil
 ;;; End:
 
 ;;; arch-tag: f6c5c2ff-bf24-477c-bd18-32f76f51ba65
--- a/etc/TUTORIAL.it	Sun Apr 18 01:34:11 2004 +0000
+++ b/etc/TUTORIAL.it	Sun Apr 18 01:40:02 2004 +0000
@@ -1114,4 +1114,8 @@
 l'ostruzionismo al software ("la proprietЮ") usando, scrivendo e
 condividendo software libero!
 
+;;; Local Variables:
+;;;   coding: latin-1
+;;; End:
+
 ;;; arch-tag: c6f7079d-8032-473d-91d4-36754af15719
--- a/etc/TUTORIAL.nl	Sun Apr 18 01:34:11 2004 +0000
+++ b/etc/TUTORIAL.nl	Sun Apr 18 01:40:02 2004 +0000
@@ -830,8 +830,7 @@
    zien wat er met de cursor gebeurt.  Je hebt nu eenmaal naar het woord
    `cursor' gezocht.
 >> Type nogmaals C-s, om het volgende woord `cursor' te zoeken
-  
-> Type nu viermaal <Delback> en let op de cursorbewegingen.
+>> Type nu viermaal <Delback> en let op de cursorbewegingen.
 >> Type <RET> om het zoeken te beКindigen.
 
 Zag je wat er gebeurde?  Tijdens incrementeel zoeken probeert Emacs naar
@@ -1093,4 +1092,8 @@
 GNU Emacs to your friends.  Help stamp out software obstructionism
 ("ownership") by using, writing, and sharing free software!)
 
+;;; Local Variables:
+;;;   coding: latin-1
+;;; End:
+
 ;;; arch-tag: 3399e308-e605-4125-8fbb-b2fe91ac3149
--- a/etc/TUTORIAL.pl	Sun Apr 18 01:34:11 2004 +0000
+++ b/etc/TUTORIAL.pl	Sun Apr 18 01:40:02 2004 +0000
@@ -1239,13 +1239,10 @@
 znajomym kopie Emacsa. PomС© tЙpiФ obstrukcjonizm w informatyce,
 u©ywaj╠c, tworz╠c i dziel╠c siЙ oprogramowaniem swobodnym.
 
-
 ;;; Local Variables:
 ;;; mode: fundamental
 ;;; coding: latin-2
+;;; sentence-end-double-space: nil
 ;;; End:
 
-
-
-
 ;;; arch-tag: 6c6b7445-4cd5-44ca-a101-7f4697b92f60
--- a/etc/TUTORIAL.ru	Sun Apr 18 01:34:11 2004 +0000
+++ b/etc/TUTORIAL.ru	Sun Apr 18 01:40:02 2004 +0000
@@ -1,43 +1,41 @@
-;; -*- coding: cyrillic-koi8; -*-
-Copyright (c) 1985, 1996 Free Software Foundation, Inc. See end for conditions.
-
-Вы читаете учебник Emacs.
+Вы читаете учебник Emacs.  Условия копирования в конце файла.
+Copyright (c) 1985, 1996, 2004 Free Software Foundation, Inc.
 
 Для управления Emacs обычно используется ключ (сочетание клавиш клавиатуры
-и/или кнопок мыши), включающий в себя клавишу CONTROL (иногда отмечаемая как
-CTRL или CTL) или клавишу META (иногда помеченную как ALT или EDIT). В
-дальнейшем вместо того, чтобы каждый раз писать META или CONTROL мы будем
+и/или кнопок мыши), включающий в себя клавишу CONTROL (иногда отмечаемая
+как CTRL или CTL) или клавишу META (иногда помеченную как ALT или EDIT). В
+дальнейшем вместо того, чтобы каждый раз писать META или CONTROL, мы будем
 использовать следующее сокращение:
 
- C-<chr> следует удерживать клавишу CONTROL пока набирается символ <chr>
+ C-<chr> следует удерживать клавишу CONTROL, пока набирается символ <chr>.
 	 Так, C-f должно означать: нажать клавишу CONTROL и f.
- M-<chr> следует удерживать клавишу META пока набирается символ <chr>.  Если
+ M-<chr> следует удерживать клавишу META, пока набирается символ <chr>. Если
          нет клавиши META, ALT или EDIT, то нажмите <ESC>, отпустите ее,
          а потом наберите символ <chr>.
 
-Важное замечание: для завершения сеанса Emacs, наберите C-x C-c.  (Два
+Важное замечание: для завершения сеанса Emacs, наберите C-x C-c. (Два
 символа). Символы ">>" с левой стороны указывают, что вам нужно делать,
-чтобы применить команду.  Например:
-<<Середина страницы оставлена пустой для учебных целей. Текст прдолжается ниже>>
+чтобы применить команду. Например:
+<<Середина страницы оставлена пустой для учебных целей. Текст продолжается ниже>>
 >> Теперь нажмите C-v (Просмотр следующего экрана) для перемещения на
    следующий экран. (Выполните это, удерживая клавишу CONTROL нажимая v).
    Теперь вы должны это сделать еще раз, когда закончите читать экран.
 
 Обратите внимание на то, что, пока вы движетесь с экрана на экран,
-перекрываются две строчки; это обеспечивает некоторую непрерывность, так что
-вы можете продолжить читать текст.
+перекрываются две строчки; это обеспечивает некоторую непрерывность, так
+что вы можете продолжить читать текст.
 
-Первое что вам необходимо знать -- как передвигаться по тексту из одного
+Первое, что вам необходимо знать -- как передвигаться по тексту из одного
 места в другое. Вы уже знаете, как переместиться вперед один экран,
-используя ключ C-v.  Для перемещения назад на один экран, нажмите M-v
-(удерживайте клавишу META и наберите v, или нажмите <ESC>v если у вас нет
-клавише META, EDIT, или ALT).
+используя ключ C-v. Для перемещения назад на один экран, нажмите M-v
+(удерживайте клавишу META и наберите v, или нажмите <ESC>v, если у вас нет
+клавишы META, EDIT, или ALT).
 
 >> попробуйте набрать M-v и потом C-v, несколько раз.
 
 
 * КРАТКАЯ СВОДКА
----------
+----------------
 
 Для просмотра используются следующие команды:
 
@@ -47,18 +45,18 @@
 		 текст, находящийся возле курсора, в центре экрана.
 		 (Это CONTROL-L, а не CONTROL-1.)
 
->> Найдите курсор, и запомните текст возле него.  Потом нажмите C-l.
+>> Найдите курсор, и запомните текст возле него. Потом нажмите C-l.
    Найдите курсор снова и убедитесь, что возле него все тот же текст.
 
 
 * БАЗОВЫЕ КОМАНДЫ УПРАВЛЕНИЯ КУРСОРОМ
------------------------------
+-------------------------------------
 
 Движение от экрана к экрану удобно, но как переместиться в определенное
 место текста на экране?
 
-Есть насколько способов сделать это. Основной способ -- использовать команды
-C-p, C-b, C-f и C-n.  Каждая из этих команд передвигает курсор на одну
+Есть несколько способов сделать это. Основной способ -- использовать команды
+C-p, C-b, C-f и C-n. Каждая из этих команд передвигает курсор на одну
 строку или колонку на экране в определенном направлении. Эта таблица
 показывает четыре команды и четыре направления их движения:
 
@@ -78,7 +76,7 @@
 F-вперед (forward). Это основные команды позиционирования курсора, которыми
 Вы будете пользоваться ВСЕГДА, так что будет неплохо их выучить.
 
->> Нажмите несколько раз C-n чтоб опустить курсор вниз на эту строку.
+>> Нажмите несколько раз C-n, чтобы опустить курсор вниз на эту строку.
 
 >> Переместитесь по строке, используя C-f и потом поднимитесь вверх с
    помощью C-p. Посмотрите, как изменилось положение курсора при нажатии
@@ -95,7 +93,7 @@
 
 C-f может перемещать курсор через символ перевода строки так же, как и C-b.
 
->> Попробуйте несколько раз применить C-b, так чтобы Вы увидели, как
+>> Попробуйте несколько раз применить C-b так, чтобы Вы увидели, как
    движется курсор. Далее используйте C-f чтобы вернуться на конец
    строки. Нажмите C-f еще раз, чтобы перейти к началу следующей строки.
 
@@ -130,15 +128,16 @@
 перемещает курсор в начало и конец строки, а M-a и M-e перемещает курсор в
 начало и конец предложения.
 
->> Попробуйте нажать пару раз C-a, и потом пару раз C-e.  Попробуйте пару
+>> Попробуйте нажать пару раз C-a, и потом пару раз C-e. Попробуйте пару
    раз нажать M-a, после этого пару раз нажать M-e.
 
 Посмотрите, что повтор C-a ничего не изменяет, а повтор M-a продолжает
 движение курсора к следующему предложению. Это не сохраняет аналогию, но
 выглядит естественно.
 
-Положение курсора в тексте также называют "точка". Скажем иначе: курсор
-показывает место на экране в какой точке будет расположен вводимый текст.
+Положение курсора в тексте также называют "точкой вставки". Скажем иначе:
+курсор показывает место на экране в какой точке будет расположен вводимый
+текст.
 
 Здесь собраны простые команды перемещения курсора, включая движение по
 словам и предложениям:
@@ -166,22 +165,22 @@
 Greater-than {Больше-Чем}), которая перемещает курсор в конец текста.
 
 На большинстве терминалов знак "<" находится над знаком точки, и чтобы
-набрать его вы должны использовать клавишу Shift. На этих терминалах вы так
-же должны использовать Shift чтоб набрать M-<; Без удержания клавиши Shift
-вы наберете M-точка.
+набрать его, вы должны использовать клавишу Shift. На этих терминалах вы так
+же должны использовать Shift, чтобы набрать M-< (без удержания клавиши Shift
+вы наберете M-точка).
 
->> Сейчас попробуйте M-<, чтоб переместиться в начало учебника.  Потом
-   используйте C-v чтоб вернуться назад.
+>> Сейчас попробуйте M-<, чтобы переместиться в начало учебника. Потом
+   используйте C-v, чтобы вернуться назад.
 
->> Сейчас попробуйте M->, что переместиться к концу учебника.  Используйте
-   M-v чтоб вернуться снова.
+>> Сейчас попробуйте M->, чтобы переместиться к концу учебника. Используйте
+   M-v, чтобы вернуться снова.
 
 Курсор можно перемещать клавишами управления курсора (стрелками), если ваш
 терминал оборудован ими. Мы рекомендуем выучить C-b, C-f, C-n и C-p по трем
-причинам. Во первых, они работают на любых терминалах. Во вторых, однажды
+причинам. Во-первых, они работают на любых терминалах. Во-вторых, однажды
 получив практику использования Emacs, вы поймете, что использовать
 CTRL-символы удобнее и быстрее, чем кнопки со стрелочками (потому что вы не
-убираете руки с обычного их положения при печати). В третьих, как только вы
+убираете руки с обычного их положения при печати). В-третьих, как только вы
 привыкните использовать CTRL-символы, вы сможете так же легко выучить и
 использовать другие, расширенные команды перемещения курсора.
 
@@ -192,7 +191,7 @@
 аргумент можно задать другим способом: наберите цифры, удерживая клавишу
 META. Мы рекомендуем освоить использование C-u, поскольку эта
 последовательность клавиш работает на любом терминале. Числовой аргумент
-также называется "префиксным аргументом" поскольку вы набираете аргумент до
+также называется "префиксным аргументом", поскольку вы набираете аргумент до
 выполнения команды.
 
 Например, C-u 8 C-f переместит курсор на восемь символов вперед.
@@ -217,7 +216,7 @@
 прокрутить его вниз, можете задать аргумент для M-v.
 
 Если вы используете оконную систему, такую как X11 или MS-Windows, должна
-быть прямоугольная область именуемая полосой прокрутки с левой стороны окна
+быть прямоугольная область, именуемая полосой прокрутки с левой стороны окна
 Emacs. Вы можете прокручивать текст, используя манипулятор мышь.
 
 >> Попробуйте перемещать мышь при нажатой средней кнопке мыши. Вы увидите
@@ -232,7 +231,7 @@
 влево, вправо, вверх и вниз передвигают курсор в ожидаемом направлении; они
 работают точно также как C-b, C-f, C-p и C-n, но легче в наборе и
 запоминании. Вы так же можете использовать сочетания C-left и C-right для
-передвижения по словам, и C-up и C-down для передвижения по блокам (т.е.,
+передвижения по словам, и C-up и C-down для передвижения по блокам (т.е.
 параграфам, если вы редактируете текст). Если у вас есть кнопки помеченные
 HOME (или BEGIN) или END, то они будут перемещать курсор в начало и конец
 строки, соответственно, и C-home и C-end будут перемещать в начало и конец
@@ -249,14 +248,14 @@
 * ЕСЛИ EMACS ЗАВИС
 ------------------
 
-Если Emacs перестал реагировать на ваши команды, вы можете остановить это
-просто нажав C-g. Вы можете использовать C-g чтобы остановить выполнение
-команды которая слишком долго выполняется.
+Если Emacs перестал реагировать на ваши команды, вы можете остановить это,
+просто нажав C-g. Вы можете использовать C-g, чтобы остановить выполнение
+команды, которая слишком долго выполняется.
 
-Вы так же можете использовать C-g для отмены цифрового аргумента или начатой
+Вы также можете использовать C-g для отмены цифрового аргумента или начатой
 команды, которую вы не хотите завершать.
 
->> Наберите C-u 100 для задания аргумента 100, потом нажмите C-g.  Теперь
+>> Наберите C-u 100 для задания аргумента 100, потом нажмите C-g. Теперь
    нажмите C-f. Курсор должен переместиться всего на один символ, потому что
    вы отменили аргумент нажатием C-g.
 
@@ -264,7 +263,7 @@
 нажатием C-g.
 
 
-* ЗАПРЕЩЕННЫЕ  КОМАНДЫ (DISABLED COMMANDS)
+* ЗАПРЕЩЕННЫЕ КОМАНДЫ (DISABLED COMMANDS)
 -----------------------------------------
 
 Некоторые команды Emacs "запрещены", поскольку начинающие пользователи могут
@@ -291,7 +290,7 @@
 
 	C-x 1	Одно окно. (закрыть все другие окна).
 
-Это CONTROL-x со следующей цифрой 1. C-x 1 развернет окно которое содержит
+Это CONTROL-x со следующей цифрой 1. C-x 1 развернет окно, которое содержит
 курсор, так, чтобы оно заняло весь экран. При этом будут удалены все
 остальные окна.
 
@@ -301,7 +300,7 @@
    Посмотрите, как текущее окно сожмется, когда новое
    появится и отобразит документацию на команду CONTROL-f.
 
->> Наберите C-x 1 и посмотрите как окно с документацией исчезнет.
+>> Наберите C-x 1 и посмотрите, как окно с документацией исчезнет.
 
 Эта команда отличается от других команд, которые вы изучили, тем, что она
 состоит из двух символов. Она начинается со знака CONTROL-x. Есть целый
@@ -326,7 +325,7 @@
 курсора.
 
 >> Попробуйте выполнить это сейчас -- наберите несколько символов, потом
-   удалите их нажимая <Delete> несколько раз. Не волнуйтесь о изменениях
+   удалите их нажимая <Delete> несколько раз. Не волнуйтесь об изменениях
    этого файла; вы не изменяете главный учебник. Это ваша личная копия
    учебника.
 
@@ -336,7 +335,7 @@
 стрелка) с правой границы показывает, что строка будет продолжена.
 
 >> Вводите текст, пока не достигните правой границы, и продолжайте
-   вставку.  Вы увидите, как появится символ продолжения строки.
+   вставку. Вы увидите, как появится символ продолжения строки.
 
 >> Используйте <Delete> для удаления текста, пока строка не поместится в
    экран снова. Символ продолжения строки исчезнет.
@@ -353,13 +352,13 @@
    удаленного вами.
 
 Помните, что многие команды Emacs могут получать счетчик повторения; простые
-символы не являются исключением. Набирайте простые символы вставляя их по
+символы не являются исключением. Набирайте простые символы, вставляя их по
 несколько за один раз.
 
 >> Попробуйте выполнить это -- наберите C-u 8 * для вставки ********.
 
 Теперь вы научились основному способу набрать что-нибудь в Emacs и
-исправлять ошибки. Так же вы можете удалять слова и строки. Здесь собраны
+исправлять ошибки. Также вы можете удалять слова и строки. Здесь собраны
 операции удаления:
 
 	<Delete>     удалить символ перед курсором
@@ -371,8 +370,8 @@
 	C-k	     Убить все от курсора до конца строки
 	M-k	     Убить все до конца предложения
 
-Заметьте, что <Delete> и C-d против M-<Delete> и M-d расширяют параллель
-начатую, C-f и M-f (да, <Delete> это не реальный управляющий символ, но не
+Заметьте, что <Delete> и C-d против M-<Delete> и M-d расширяют параллель,
+начатую C-f и M-f (да, <Delete> это не реальный управляющий символ, но не
 нужно волноваться об этом). C-k и M-k, как и C-e и M-e, проводят параллель
 между строками и предложениями.
 
@@ -393,13 +392,13 @@
 Отличие между "убить (killing)" и "удалить (deleting)" заключается в том,
 что "убитый" текст может быть заново вставлен, в то время как "удаленные"
 части не могут быть вставлены. Вставка "убитого" текста называется
-"восстановление (yanking)". В общем, команды, которые могут удалять большие
-части текста, удаляют этот текст (они так настраиваются так, что вы можете
-восстановить текст), в то время как команды, которые удаляют только один
+"восстановление (yanking)". В общем, команды, которые могут убирать большие
+части текста, убивают этот текст (они так настраиваются так, что вы можете
+восстановить текст), в то время как команды, которые убирают только один
 символ, или только пустые строки и пробельные символы, выполняют удаление
 (так что вы не можете восстановить текст).
 
->> Переместите курсор на начало непустой строки. Теперь нажмите C-k чтобы
+>> Переместите курсор на начало непустой строки. Теперь нажмите C-k, чтобы
    убить текст в этой строке.
 
 >> Нажмите C-k еще раз. Вы видите, что это убьет символ новой строки
@@ -407,7 +406,7 @@
 
 Заметьте, что первое C-k убивает содержимое строки, а второе C-k убивает
 саму строку и поднимает другие строки вверх. C-k обрабатывает числовой
-аргумент специальным образом: убивает много строк _И_ их содержимое. Это не
+аргумент специальным образом: убивает столько строк _И_ их содержимое. Это не
 просто повторение. C-u 2 C-k удалит две строи и завершающие их символы новой
 строки; ввод C-k два раза не сделает этого.
 
@@ -420,10 +419,10 @@
 Командой для восстановления текста является C-y. Она восстанавливает
 последний убитый текст в место расположение курсора.
 
->> Попробуйте выполнить это; наберите C-y чтоб вернуть текст назад.
+>> Попробуйте выполнить это; наберите C-y, чтобы вернуть текст назад.
 
 Помните, если вы использовали несколько команд C-k в строке, все убитые
-строки будут сохранены вместе, так, что C-y восстановит их вместе.
+строки будут сохранены вместе так, что C-y восстановит их вместе.
 
 >> Попробуйте выполнить это сейчас, нажмите C-k несколько раз.
 
@@ -434,8 +433,8 @@
 
 Что делать, если есть некоторый текст, который вы хотите вернуть назад и
 потом убить что-то еще?  C-y вернет не более чем последний удаленный текст.
-Но предыдущий текст не будет потерян. Вы сможете его вернуть назад используя
-команду M-y. После того как вы вернули последний удаленный текст, нажмите
+Но предыдущий текст не будет потерян. Вы сможете его вернуть назад, используя
+команду M-y. После того, как вы вернули последний удаленный текст, нажмите
 M-y, и замените этот восстановленный текст тем, который был убит ранее.
 Нажатие M-y снова и снова будет возвращать ранее убитый текст. Когда вы
 достигните искомого текста, вам не нужно делать ничего более чтобы сохранить
@@ -447,7 +446,7 @@
 
 >> Убейте строку, переместите курсор вокруг этой точки, потом удалите еще
    одну строку. Затем используйте C-y для восстановления второй убитой
-   строки. Затем используйте M-y и она будет заменена первой убитой
+   строки. Затем используйте M-y, и она будет заменена первой убитой
    строкой. Нажмите M-y еще несколько раз, чтобы увидеть полученный
    результат. Продолжайте делать это, пока вторая убитая строка не вернется,
    и еще чуть-чуть. Если вам хочется, то вы можете задавать для M-y
@@ -463,7 +462,7 @@
 Обычно, C-x u отменяет изменения, сделанные одной командой; если повторить
 C-x u несколько раз подряд, каждый раз будет отменяться еще одна команда.
 
-Но есть два исключения: команды которые не изменяют текст не учитываются
+Но есть два исключения: команды, которые не изменяют текст, не учитываются
 (это включает команды перемещения курсора и прокрутки), и самовставляющиеся
 (self-inserting) символы обрабатываются группами до 20. (Это уменьшает
 число C-x u которые вы можете набрать для отмены ввода текста).
@@ -472,14 +471,14 @@
    вернуться назад.
 
 C-_ альтернативная команда отмены; она работает также как и C-x u, но легче
-в использовании несколько раз подряд. Неудобное положение C-_ а на некоторых
+в использовании несколько раз подряд. Неудобное положение C-_ на некоторых
 клавиатурах делает неочевидным способ ее набора. Поэтому мы предлагаем
-использовать C-x u. На некоторых терминалах, вы можете набирать C-_ нажимая
+использовать C-x u. На некоторых терминалах, вы можете набирать C-_, нажимая
 / и удерживая клавишу CONTROL.
 
 Числовой аргумент для C-_ или C-x u работает как счетчик повторения.
 
-Вы можете отменить удаление текста точно также как отмену убития
+Вы можете отменить удаление текста точно так же, как отмену убития
 текста. Отличие между убийством и удалением чего-либо заключается в том, что
 вы можете восстановить убитый текст с помощью C-y; но это не делает различий
 для отмены.
@@ -488,27 +487,27 @@
 -------
 
 Чтобы созданный текст можно было редактировать позже, вы должны его
-поместить в файл. Иначе, он исчезнет когда вы выйдите из Emacs. Вы помещаете
-ваш текст в файл "открывая" файл. (Еще это называют "посетить" файл.)
+поместить в файл. Иначе, он исчезнет, когда вы выйдите из Emacs. Вы помещаете
+ваш текст в файл, "открывая" файл. (Еще это называют "посетить" файл.)
 
-Открыть файл означает посмотреть его содержимое используя Emacs. Во многих
-случаях, это происходит когда вы редактируете файл сами. Однако ваши
+Открыть файл означает посмотреть его содержимое, используя Emacs. Во многих
+случаях, это происходит, когда вы редактируете файл сами. Однако ваши
 изменения, сделанные с использованием Emacs не будут зафиксированы, пока вы
 не сохраните файл. Так вы можете не оставлять полуизмененный файл в системе,
 если вы не хотите этого. Даже когда вы сохраняете файл, Emacs оставляет
-оригинальный файл с измененным именем, чтоб вы могли позже решить, что ваши
+оригинальный файл с измененным именем, чтобы вы могли позже решить, что ваши
 изменения были ошибочны.
 
 Если вы посмотрите в нижнюю часть экрана, то вы увидите строку, которая
 начинается с тире и начинается с "--:-- TUTORIAL.ru" или чего-то
-подобного. Эта часть экрана всегда показывает имя файла который вы
-открыли. Итак, сейчас вы открыли файл с именем "TUTORIAL.ru" который
-является вашей персональной копией учебника Emacs. Для любого файла который
+подобного. Эта часть экрана всегда показывает имя файла, который вы
+открыли. Итак, сейчас вы открыли файл с именем "TUTORIAL.ru", который
+является вашей персональной копией учебника Emacs. Для любого файла, который
 вы откроете, имя этого файла появится в этом месте.
 
-Одной из специальных вещей, которую вам нужно знать о команде открытия файла
--- это то, что вы должны ввести имя файла, который нужно читать. Мы это
-называем командой "читающая аргумент с терминала" (в этом случае, аргументом
+Одной из специальных вещей, которую вам нужно знать о команде открытия файла,
+это то, что вы должны ввести имя файла, который нужно читать. Мы это
+называем командой, "читающей аргумент с терминала" (в этом случае, аргументом
 является имя файла). После ввода команды
 
 	C-x C-f   Открыть (найти) файл
@@ -522,15 +521,15 @@
 отменить команду нажав C-g.
 
 >> Нажмите C-x C-f, затем нажмите C-g. Это отменит мини-буфер, и команду
-   C-x C-f которая использовала мини-буфер. В итоге, вы не открыли ни одного
+   C-x C-f, которая использовала мини-буфер. В итоге, вы не открыли ни одного
    файла.
 
 Когда вы завершите ввод имени файла, нажмите <Return>. Далее сработает
-команда C-x C-f, и откроет файл указанный вами. Мини-буфер исчезнет когда
-команда C-x C-f завершится.
+команда C-x C-f, которая откроет указанный вами файл. Мини-буфер исчезнет,
+когда команда C-x C-f завершится.
 
 И мгновением позже содержимое файла появится на экране, и вы сможете его
-редактировать. Когда вы закончите редактирование, чтобы сохранить изменения
+редактировать. Когда вы закончите редактирование, чтобы сохранить изменения,
 наберите команду
 
 	C-x C-s   Сохранить файл
@@ -541,18 +540,18 @@
 имени файла.
 
 Когда сохранение завершится, Emacs напечатает имя записанного файла. Вы
-должны сохранять изменения достаточно часто, так чтобы не потерять много
-работы если вдруг система погибнет.
+должны сохранять изменения достаточно часто, чтобы не потерять много
+работы, если вдруг система зависнет.
 
 >> Наберите C-x C-s, сохраните вашу копию учебника. В нижней строке экрана
    должна появиться надпись "Wrote ...TUTORIAL.ru".
 
 ЗАМЕЧАНИЕ: На некоторых системах, ввод C-x C-s заблокирует экран и вы не
-увидите последующего вывода Emacs`а. Это означает что операционная система
-имеет "особенность" именуемую "flow control" перехватывающую C-s и не
+увидите последующего вывода Emacs`а. Это означает, что операционная система
+имеет "особенность", именуемую "flow control", перехватывающую C-s и не
 пропускающую этот символ к Emacs`у. Для разблокировки экрана, нажмите C-q.
-Смотрите раздел "Spontaneous Entry to Incremental Search" руководства Emacs
-чтобы узнать как бороться с этой "особенностью".
+Смотрите раздел "Spontaneous Entry to Incremental Search" руководства Emacs,
+чтобы узнать, как бороться с этой "особенностью".
 
 Вы можете открыть существующий файл для просмотра или редактирования. Вы
 также можете найти файл, которого еще не существует. Другими словами --
@@ -569,45 +568,45 @@
 внутри Emacs. Вы можете переключиться назад, найдя его снова C-x C-f. Это
 способ загрузить несколько файлов в Emacs.
 
->> Создайте файл с именем "foo" набирая C-x C-f foo <Return>.
-   Вставьте какой-нибудь текст, отредактируйте его, и сохраните "foo"
+>> Создайте файл с именем "foo", набирая C-x C-f foo <Return>.
+   Вставьте какой-нибудь текст, отредактируйте его, и сохраните "foo",
    набрав C-x C-s.
-   Наконец, наберите C-x C-f TUTORIAL.ru <Return>
+   Наконец, наберите C-x C-f TUTORIAL.ru <Return>,
    чтобы вернуться назад к учебнику.
 
-Emacs сохраняет текст каждого файла внутри в объекте называемый "буфер"
-("buffer"). Открытие файла создает новый буфер внутри Emacs. чтобы увидеть
-список буферов созданных в текущем Emacs наберите
+Emacs сохраняет текст каждого файла внутри в объекте, называемом "буфер"
+("buffer"). Открытие файла создает новый буфер внутри Emacs. Чтобы увидеть
+список буферов, созданных в текущем Emacs, наберите
 
 	C-x C-b   Список буферов
 
 >> Попробуйте C-x C-b сейчас.
 
-Мы видим что каждый буфер имеет имя, и может иметь имя файла, содержимое
+Мы видим, что каждый буфер имеет имя, и может иметь имя файла, содержимое
 которого в нем хранится. Некоторые буфера не соответствуют файлам. Например,
-буфер названный "*Buffer List*" не содержит никакого файла. В этом буфере
-содержится список буферов, который был создан командой C-x C-b. ЛЮБОЙ текст
-который ви видите в окне Emacs всегда является частью какого-либо буфера.
+буфер, названный "*Buffer List*", не содержит никакого файла. В этом буфере
+содержится список буферов, который был создан командой C-x C-b. ЛЮБОЙ текст,
+который вы видите в окне Emacs, всегда является частью какого-либо буфера.
 
->> Наберите C-x 1 чтобы избавиться от списка буферов.
+>> Наберите C-x 1, чтобы избавиться от списка буферов.
 
 Если вы изменяете текст одного файла, потом открываете другой, то первый
-остается не сохраненным. Изменения останутся внутри Emacs, в файловом
-буфере.  Создание или редактирование следующего файлового буфера не
+остается несохраненным. Изменения останутся внутри Emacs, в файловом
+буфере. Создание или редактирование следующего файлового буфера не
 сказывается на первом буфере. Это очень удобно, но имейте в виду, что вам
 нужно иметь удобный способ сохранить первый файловый буфер. Было бы
 неприятно каждый раз возвращаться назад с помощью C-x C-f и потом
-использовать C-x C-s.  Поэтому существует команда
+использовать C-x C-s. Поэтому существует команда
 
 	C-x s     Сохранить некоторые буфера. (Save some buffers)
 
-C-x s спрашивает вас о каждом буфере, который содержит не сохраненные
-изменения. Для каждого такого буфера у вас спрашивают сохранять или не
+C-x s спрашивает вас о каждом буфере, который содержит несохраненные
+изменения. Для каждого такого буфера у вас спрашивают: сохранять или не
 сохранять изменения.
 
 >> Вставьте строку текста, потом наберите C-x s.
-   У вас должны спросить сохранять ли буфер с именем TUTORIAL.ru.
-   Ответьте на вопрос да набрав "y".
+   У вас должны спросить, сохранять ли буфер с именем TUTORIAL.ru.
+   Ответьте на вопрос да, набрав "y".
 
 
 * РАСШИРЕННЫЙ НАБОР КОМАНД
@@ -624,28 +623,28 @@
 
 Это команды, которые обычно используются, но вы уже выучили некоторые из
 них. Вы уже видели: команды работы с файлами C-x C-f -- открыть, и C-x C-s
--- сохранить.  Другой пример - завершения работы с Emacs -- это команда C-x
+-- сохранить. Другой пример - завершения работы с Emacs -- это команда C-x
 C-c. (Не волнуйтесь о том, что вы потеряете сделанные изменения, C-x C-c
-предлагает сохранить изменения перед тем как удалит буфер Emacs.)
+предлагает сохранить изменения перед тем, как удалит буфер Emacs.)
 
-C-z это команда *временного* выхода из Emacs -- вы можете вернуться в туже
-сессию Emacs после.
+C-z это команда *временного* выхода из Emacs -- вы можете вернуться в ту же
+сессию Emacs позже.
 
-На системах, которые допускают этого, C-z "приостанавливают" ("suspends")
-Emacs; Возвращают в оболочку (shell), но не закрывают Emacs. В большинстве
-оболочек вы можете продолжить работу в Emacs используя команду `fg' или
+На системах, которые допускают это, C-z "приостанавливают" ("suspends")
+Emacs; возвращают в оболочку (shell), но не закрывают Emacs. В большинстве
+оболочек вы можете продолжить работу в Emacs, используя команду `fg' или
 `%emacs'.
 
-В системах не поддерживающих приостановку процессов, C-z создает новую
+В системах, не поддерживающих приостановку процессов, C-z создает новую
 оболочку (subshell), запущенную из-под Emacs, чтобы дать вам возможность
-выполнить другую программу, и потом вернуться в Emacs; Это не настоящий
+выполнить другую программу, и потом вернуться в Emacs; это не настоящий
 выход из Emacs. В этом случае, команда `exit' вернет вас в Emacs из
 оболочки.
 
-Используйте C-x C-c если вы хотите выйти (log out) из системы. Это также
-используется чтобы выйти из Emacs вызванного из почтовой программы, или другой
-утилиты, которая может не знает как справиться с приостановленным Emacs.
-Обычно, если вы не выходите из системы, лучше приостановить Emacs
+Используйте C-x C-c, если вы хотите выйти (log out) из системы. Это также
+используется, чтобы выйти из Emacs, вызванного из почтовой программы, или другой
+утилиты, которая может не знать, как справиться с приостановленным Emacs.
+Обычно, если вы не выходите из системы, лучше приостановить Emacs,
 используя C-z вместо выхода их него.
 
 Существует очень много C-x команд. Эти вы уже выучили:
@@ -661,18 +660,18 @@
 только в определенных режимах. В качестве примера команда замена строки,
 которая заменяет одну строку на другую во всем тексте. Когда вы наберете
 M-x, Emacs предложит вам ввести имя команды в нижней строке экрана; в нашем
-случае, "replace-string". Только наберите "repl s<TAB>" и Emacs дополнит
+случае, "replace-string". Только наберите "repl s<TAB>", и Emacs дополнит
 имя. (<TAB> -- это клавиша табуляции, обычно находящаяся выше клавиш
 CapsLock или Shift слева на клавиатуре). Завершите имя вводом <Return>.
 
-Команда замены строки (replace-string) требует два аргумента -- строку
-которая будет заменена, и строка на которую нужно заменить. Вы должны
+Команда замены строки (replace-string) требует два аргумента -- строку,
+которая будет заменена, и строку, на которую нужно заменить. Вы должны
 завершать каждый аргумент вводом <Return>.
 
 >> Переместите курсор на две пустые строки ниже этой.
    Наберите M-x repl s<Return>changed<Return>altered<Return>.
 
-   Заметьте как эта строка изменится: вы замените слово c-h-a-n-g-e-d
+   Заметьте, как эта строка изменится: вы замените слово c-h-a-n-g-e-d
    словом "altered" везде, где оно встретится, ниже позиции курсора.
 
 
@@ -680,40 +679,40 @@
 ----------------
 
 Когда вы изменяете файл, но не сохраняете его, то в случае краха системы
-вы можете потерять информацию. чтобы защитить вас от этого, Emacs
+вы можете потерять информацию. Чтобы защитить вас от этого, Emacs
 периодически сохраняет каждый файл, который вы редактируете. Автосохранение
 происходит в файл, имя которого такое же, но начинается и заканчивается
 символом "#"; например, если ваш файл называется "hello.c", то
 автосохраненный файл будет называться "#hello.c#". Когда вы сохраните файл
-обычным способом. Emacs удалит автосохраненный файл.
+обычным способом, Emacs удалит автосохраненный файл.
 
-Если система подвисает, вы можете восстановить ваши изменения который были
-сохранены автоматически, путем открытия нормального файла (файла который вы
-редактировали, не автосохраненного) и затем набрав M-x recover-file<return>.
-Когда у вас спросят подтверждение, наберите yes<return> чтобы восстановить
+Если система зависла, вы можете восстановить ваши изменения, который были
+сохранены автоматически, путем открытия нормального файла (файла, который вы
+редактировали, не автосохраненного), и затем набрав M-x recover-file<return>.
+Когда у вас спросят подтверждение, наберите yes<return>, чтобы восстановить
 автосохраненные данные.
 
 
 * ОБЛАСТЬ ЭХО (ECHO AREA)
 -------------------------
 
-Если Emacs видит что вы медленно набираете команды, он показывает их вам
+Если Emacs видит, что вы медленно набираете команды, он показывает их вам
 внизу экрана, в области называемой "область эхо". Область эхо -- это самая
 нижняя строка экрана.
 
 
 * СТРОКА РЕЖИМА
-------------------
+---------------
 
 Строка сразу над областью эхо называется "строка состояния".
 Выглядит эта строка примерно так:
 
---:**  TUTORIAL          (Fundamental)--L670--58%----------------
+--:**  TUTORIAL.ru       (Fundamental)--L670--58%----------------
 
 Эта строка сообщает полезную информацию о состоянии Emacs и текста, который
 вы редактируете.
 
-Вы уже знаете что означает имя файла -- это файл, который вы открыли. -NN%--
+Вы уже знаете, что означает имя файла -- это файл, который вы открыли. -NN%--
 показывает текущую позицию курсора в тексте; это означает что NN процентов
 текста выше, чем начало экрана. Если первая строка находится в первой строке
 экрана, вы там увидите --Top-- вместо --00%--. Если на экране отображается
@@ -744,13 +743,13 @@
 его. Например, M-x fundamental-mode - команда, которая переключает в базовый
 (Fundamental) режим.
 
-Если вы редактируете английский текст, например как этот (//конечно не именно
+Если вы редактируете русский текст, например как этот (конечно, не именно
 этот, а TUTORIAL) файл, вы вероятно должны переключиться в Text-режим.
 
 >> Наберите M-x text mode<Return>.
 
 Не волнуйтесь, ни одна из выученных вами команд Emacs не изменилась. Но вы
-можите заметить, что M-f и M-b теперь различать апострофы как части слова.
+можете заметить, что M-f и M-b теперь различают апострофы как части слова.
 Ранее, в базовом режиме (Fundamental mode), M-f и M-b понимали апострофы
 как разделители слов.
 
@@ -762,8 +761,8 @@
 
 >> Используйте C-u C-v один раз или более, чтобы расположить эту строку ближе
    к верху экрана.
->> Наберите C-h m, что посмотреть отличия Text-режима от базового.
->> Наберите C-x 1 чтобы убрать документацию с глаз долой :)
+>> Наберите C-h m, чтобы посмотреть отличия Text-режима от базового.
+>> Наберите C-x 1, чтобы убрать документацию с глаз долой :)
 
 Основной режим называется основным потому, что есть несколько дополнительных
 (minor) режимов. Дополнительные режимы не являются альтернативами основным,
@@ -777,13 +776,13 @@
 включен, Emacs разрывает строки между словами автоматически, когда вы
 вставляете текст и делаете строки слишком длинными.
 
-Вы можете включить режим автозаполнения набрав M-x auto fill mode<Return>.
+Вы можете включить режим автозаполнения, набрав M-x auto fill mode<Return>.
 Когда этот режим включен, его можно выключить - M-x auto fill mode<Return>.
 Если режим включен -- команда его выключит, если выключен -- включит. Мы
 называем это командой "переключения режима".
 
 >> Наберите M-x auto fill mode<Return>. Затем вводите строку из слов
-   "фыва " пока не увидите как она разделится на две строки. Вы должны
+   "фыва " пока не увидите, как она разделится на две строки. Вы должны
    помещать пробелы между словами, потому что режим автозаполнения разделяет
    строки только по пробелам.
 
@@ -806,22 +805,22 @@
 * ПОИСК
 -------
 
-Emacs умеет искать строки (это непрерывные группы символов или слова) вперед
-по тексту, или назад. Поиск строки это команда перемещения курсора; она
+Emacs умеет искать строки (непрерывные группы символов или слова) вперед
+по тексту, или назад. Поиск строки - это команда перемещения курсора; она
 перемещает курсор в следующую точку, где найдена искомая строка.
 
 Команда поиска Emacs отличаются от аналогичных команд большинства других
-редакторов тем, что она инкрементальная. Это означает что поиск происходит по
-мере того как вы набираете искомую строку.
+редакторов тем, что она инкрементальная. Это означает, что поиск происходит
+по мере, того как вы набираете искомую строку.
 
 Команда, начинающая поиск вперед -- C-s, а C-r ищет назад. ПОДОЖДИТЕ! Не
 нужно пробовать прямо сейчас.
 
-Когда вы нажмете C-s вы увидите строку "I-search", появившуюся в области эхо.
-Вам сообщается что Emacs ждет ввода слова, которое вы хотите найти.
+Когда вы нажмете C-s, вы увидите строку "I-search", появившуюся в области эхо.
+Вам сообщается, что Emacs ждет ввода слова, которое вы хотите найти.
 <Return> завершает поиск.
 
->> Теперь, нажмите C-s для начала поиска. Медленно, одну букву за один раз,
+>> Теперь нажмите C-s для начала поиска. Медленно, одну букву за один раз,
    набирайте слово 'курсор', останавливаясь после каждой введенной буквы и
    замечая что происходит с курсором.
    Сейчас вы нашли первое вхождение слова "курсор".
@@ -829,38 +828,38 @@
 >> Теперь нажмите <Delete> четыре раза и проследите за перемещениями курсора.
 >> Нажмите <Return> для завершения поиска.
 
-Вы видели что происходило? Emacs, в режиме инкрементального поиска, пытался
-переходить к строкам совпадающим с набираемой вами, подсвечивая их для вас.
+Вы видели, что происходило? Emacs в режиме инкрементального поиска пытался
+переходить к строкам, совпадающим с набираемой вами, подсвечивая их для вас.
 Чтобы перейти к следующему вхождения слова 'курсор' просто нажмите C-s
-снова.  Если больше нет вхождений, Emacs издаст звуковой сигнал, и сообщит
-что ваш поиск не удался ("failing"), C-g также должен отменить поиск.
+снова. Если больше нет вхождений, Emacs издаст звуковой сигнал, и сообщит,
+что ваш поиск не удался ("failing"), C-g также может отменить поиск.
 
-ЗАМЕЧАНИЕ: На некоторых системах, ввод C-s заморозит экран и вы не увидите
-последующего вывода Emacs`а. Это означает что операционная система имеет
-"особенность" именуемую "flow control" перехватывающую C-s и не пропускающую
-этот символ к Emacs`у.  Для разморозки экрана, нажмите C-q.  Смотрите раздел
-"Spontaneous Entry to Incremental Search" руководства Emacs чтобы узнать как
-бороться с этой "особенностью".
+ЗАМЕЧАНИЕ: На некоторых системах ввод C-s заморозит экран, и вы не увидите
+последующего вывода Emacs`а. Это означает, что операционная система имеет
+"особенность", именуемую "flow control", перехватывающую C-s и не пропускающую
+этот символ к Emacs`у. Для разморозки экрана, нажмите C-q. Смотрите раздел
+"Spontaneous Entry to Incremental Search" руководства Emacs, чтобы узнать,
+как бороться с этой "особенностью".
 
-Если вы во время инкрементального поиска нажмете <Delete>, вы можете заметить
+Если вы во время инкрементального поиска нажмете <Delete>, вы можете заметить,
 что последний символ в искомой строке удалился, и поиск вернулся к предыдущему
-найденному месту. Например, предположим, что вы набрали "c", поиск перейдет к
-первому вхождению символа "c". Теперь если вы наберете "u", курсор перейдет к
-первому вхождению "cu". Нажатие <Delete> удалит символ "u" их строки поиска, и
-курсор вернется к первому вхождению "c".
+найденному месту. Например, предположим, что вы набрали "к", поиск перейдет к
+первому вхождению символа "к". Теперь, если вы наберете "у", курсор перейдет к
+первому вхождению "ку". Нажатие <Delete> удалит символ "у" из строки поиска, и
+курсор вернется к первому вхождению "к".
 
 Если вы во время поиска введете control- или meta- символ (за некоторыми
 исключениями -- символы вызывающие поиск, а именно C-s и C-r), поиск
 прекратится.
 
 C-s начинает поиск и смотрит на любые вхождения искомой строки ПОСЛЕ текущей
-позиции курсора. Если вы хотите найти что-то ранее в тексте, нажмите C-r. Все
-что мы говорили о C-s применимо и к C-r, за исключением противоположного
+позиции курсора. Если вы хотите найти что-то ранее в тексте, нажмите C-r.
+Все, что мы говорили о C-s, применимо и к C-r, за исключением противоположного
 направления поиска.
 
 
 * МНОЖЕСТВО ОКОН (MULTIPLE WINDOWS)
--------------------------------
+-----------------------------------
 
 Одна из приятных особенностей Emacs это то, что вы можете одновременно
 отображать на экране более чем одно окно.
@@ -868,7 +867,7 @@
 >> Переместите курсор на эту линию, и наберите C-u 0 C-l (это CONTROL-L, а
    не CONTROL-1).
 
->> Теперь, наберите C-x 2, что разделит экран на два окна.
+>> Теперь наберите C-x 2, что разделит экран на два окна.
    Оба окна отображают учебник. Курсор остался в верхнем окне.
 
 >> Нажмите C-M-v для прокрутки нижнего окна.
@@ -876,10 +875,10 @@
 
 >> Нажмите C-x o ("o" от слова "other" - другое) для перемещения курсора в
    нижнее окно.
->> Используйте C-v и M-v в нижнем окне что прокручивать его.
+>> Используйте C-v и M-v в нижнем окне, чтобы прокручивать его.
    Продолжите чтение этих инструкций в верхнем окне.
 
->> Нажмите C-x o снова чтобы переместить курсор назад в верхнее окно.
+>> Нажмите C-x o снова, чтобы переместить курсор назад в верхнее окно.
    Курсор в верхнем окне там же, где и был до того.
 
 Вы можете продолжать переключаться между окнами, используя C-x o. Каждое
@@ -892,9 +891,9 @@
 в окне редактирования и последовательно продвигаться во втором, используя
 C-M-v.
 
-C-M-v пример CONTROL-META символа. Если у вас есть настоящая кнопка META
-(Alt), то вы можете набрать C-M-v нажав одновременно CONTROL и META и не
-отпуская их нажать v. И не важно какая из клавиш будет нажата первой,
+C-M-v - пример CONTROL-META символа. Если у вас есть настоящая кнопка META
+(Alt), то вы можете набрать C-M-v, нажав одновременно CONTROL и META и,
+не отпуская их, нажать v. И не важно, какая из клавиш будет нажата первой,
 CONTROL или META, поскольку эти кнопки модифицируют тип символа.
 
 Если у вас нет настоящей кнопки META, и вы используете ESC вместо нее,
@@ -902,43 +901,43 @@
 CONTROL-ESC v не будет работать. Потому, что ESC имеет свой собственный
 символ -- это не модифицирующая кнопка.
 
->> Нажмите C-x 1 (в верхнем окне) чтобы избавиться от нижнего.
+>> Нажмите C-x 1 (в верхнем окне), чтобы избавиться от нижнего.
 
 (Если вы нажали C-x 1 в нижнем окне, то вы избавились от верхнего. Понимайте
-эту команду как "Оставить только одно окно, то в котором я сейчас нахожусь").
+эту команду как "Оставить только одно окно, то, в котором я сейчас нахожусь").
 
-Вам не нужно отображать один и тот же буфер в обоих окнах. Если вы используете
-C-x C-f чтобы открыть файл в одном окне, другое останется без изменения. Вы
-можете открывать файлы в каждом окне независимо.
+Вам не нужно отображать один и тот же буфер в обоих окнах. Если вы
+используете C-x C-f, чтобы открыть файл в одном окне, другое останется без
+изменения. Вы можете открывать файлы в каждом окне независимо.
 
-Есть другой путь использовать два окна отображающих разные файлы:
+Есть другой путь использовать два окна, отображающих разные файлы:
 
->> Наберите C-x 4 C-f затем имя одного и ваших файлов. Завершите <Return>.
-   Посмотрите что выбранный файл появился в нижнем окне. Курсор перешел
+>> Наберите C-x 4 C-f, затем имя одного и ваших файлов. Завершите <Return>.
+   Посмотрите, что выбранный файл появился в нижнем окне. Курсор перешел
    туда же.
 
->> Наберите C-x o чтобы вернуться в верхнее окно, и C-x 1 чтобы удалить нижнее
-   окно.
+>> Наберите C-x o, чтобы вернуться в верхнее окно, и C-x 1, чтобы удалить
+   нижнее окно.
 
 
 * РЕКУРСИВНЫЕ УРОВНИ РЕДАКТИРОВАНИЯ (RECURSIVE EDITING LEVELS)
 --------------------------------------------------------------
 
 Иногда вы будете включать так называемые "рекурсивные уровни
-редактирования".  На это указывают прямоугольные скобки в строке
-состояния, окружающие обычные скобки вокруг имени основного режима. Например
-вы можете увидеть [(Fundamental)] вместо (Fundamental).
+редактирования". На это указывают прямоугольные скобки в строке состояния,
+окружающие обычные скобки вокруг имени основного режима. Например, вы можете
+увидеть [(Fundamental)] вместо (Fundamental).
 
-Чтобы выйти из рекурсивных уровней редактирования, нажмите ESC ESC ESC.  Это
-многоцелевая команда "выход". Вы так же можете использовать ее как для
+Чтобы выйти из рекурсивных уровней редактирования, нажмите ESC ESC ESC. Это
+многоцелевая команда "выход". Вы также можете использовать ее как для
 уничтожения лишних окон, так и для выхода из мини-буфера.
 
->> Нажмите M-x чтобы попасть в мини-буфер; затем нажмите ESC ESC ESC чтобы
-   покинуть его.
+>> Нажмите M-x, чтобы попасть в мини-буфер; затем нажмите ESC ESC ESC,
+   чтобы покинуть его.
 
-Вы не можете использовать C-g чтобы выйти из рекурсивных уровней
-редактирования. Потому, что C-g используется для отмены команды и аргументов
-БЕЗ рекурсивных уровней редактирования.
+Вы не можете использовать C-g, чтобы выйти из рекурсивных уровней
+редактирования. Потому, что C-g используется для отмены команды и
+аргументов БЕЗ рекурсивных уровней редактирования.
 
 
 * КАК ПОЛУЧИТЬ ПОМОЩЬ (GETTING MORE HELP)
@@ -953,10 +952,10 @@
 помощи".
 
 Чтобы использовать особенности Помощи, нажмите C-h, и затем символ, который
-расскажет какой именно вид помощи вы хотите получить. Если вы ДЕЙСТВИТЕЛЬНО
-растерялись, наберите C-h ? и Emacs расскажет вам какую помощь он может вам
+расскажет, какой именно вид помощи вы хотите получить. Если вы ДЕЙСТВИТЕЛЬНО
+растерялись, наберите C-h ?, и Emacs расскажет вам какую помощь он может вам
 предоставить. Если вы нажали C-h и передумали обращаться к помощи, просто
-нажмите C-g чтобы отменить эту команду.
+нажмите C-g, чтобы отменить эту команду.
 
 (Кое-где переназначают символ C-h. Реальной необходимости в этом нет,
 сообщите о ней системному администратору. Тем временем, если C-h не вызывает
@@ -971,35 +970,35 @@
   Сообщение должно выглядеть примерно так
 
 	C-p runs the command previous-line
-       (C-p выполняет команду previous-line {предыдущая-линия})
+       (C-p выполняет команду previous-line {предыдущая-строка})
 
-Вам сообщают "имя функции". Имена функции используются в основном для
-настройки и расширения Emacs. Имена функций выбраны так, чтобы показать что
-именно команда делает, так же они позволяют с помощью этой краткой
+Вам сообщают "имя функции". Имена функций используются в основном для
+настройки и расширения Emacs. Имена функций выбраны так, чтобы показать,
+что именно команда делает, также они позволяют с помощью этой краткой
 информации легче запомнить уже выученные команды.
 
 Многосимвольные команды, такие как C-x C-s и (если у вас нет кнопки META или
-EDIT или ALT) <ESC>v так же будут доступны после C-h c.
+EDIT или ALT) <ESC>v также будут доступны после C-h c.
 
 Получите больше информации о команде используя C-h k вместо C-h c.
 
 >> Наберите C-h k C-p.
 
 Вы увидите описание функции, а также ее имя в отдельном окне Emacs. Когда вы
-завершите чтение, нажмите C-x 1 чтобы избавиться от текста помощи.  Вы
+завершите чтение, нажмите C-x 1, чтобы избавиться от текста помощи. Вы
 можете выполнить какое-то редактирование во время просмотра текста справки,
-а только затем нажать C-x 1
+а только затем нажать C-x 1.
 
 Есть еще несколько полезных опций C-h:
 
-   C-h f	Описывает функцию. Вам  необходимо набрать имя функции.
+   C-h f	Описывает функцию. Вам необходимо набрать имя функции.
 
 >> Попробуйте набрать C-h f previous-line<Return>.
    Это распечатает информацию Emacs о этой функции, которая выполняется
    командой C-p.
 
 Аналогичная команда C-h v отображает документацию о переменных, значение
-которых вы можете изменить для настройки поведения Emacs. Вым нужно набрать
+которых вы можете изменить для настройки поведения Emacs. Вам нужно набрать
 имя переменной, когда Emacs запросит его.
 
    C-h a	Hyper Apropos. Введите ключевое слово и Emacs покажет вам
@@ -1009,14 +1008,14 @@
 
 >> Наберите C-h a file<Return>.
 
-это отобразит полный список функций и переменных имена которых начинаются с
-"newline". Нажмите <Return> или кликните средней кнопкой мышки чтобы
-получить больше о функции или переменной. Нажмите `q' чтобы выйти из
-hyper-apropos.
+это отобразит полный список функций и переменных, имена которых начинаются
+с "newline". Нажмите <Return> или кликните средней кнопкой мышки, чтобы
+получить больше информации о функции или переменной. Нажмите `q', чтобы
+выйти из hyper-apropos.
 
 Это отобразит в другом окне список всех команд M-x со словом "file" в их
-именах. Также в списке, кроме команд, таких как find-file, вы увидите
-соответствующие символьные команды, такие как  C-x C-f.
+именах. Также в списке кроме команд таких, как find-file, вы увидите
+соответствующие символьные команды такие, как C-x C-f.
 
 >> Наберите C-M-v для прокрутки окна справки. Выполните это несколько раз.
 
@@ -1024,29 +1023,28 @@
 
    C-h i	Читать интерактивные руководства (a.k.a. Info). Эта команда
 		переходит в специальный буфер с именем `*info*', где вы
-		можете читать интерактивные руководства для пакетов
+		можете читать интерактивные руководства для пакетов,
 		установленных в вашей системе. Наберите m emacs <Return> для
 		чтения руководства по Emacs. Если вы никогда ранее не
 		использовали Info, то наберите ? и Emacs откроет учебник по
 		возможностям режима Info. Однажды ознакомившись с этим
 		учебником, вы должны использовать руководство Emacs Info в
-		качетсве основной документации.
-
+		качестве основной документации.
 
 
 * ЗАКЛЮЧЕНИЕ
 ------------
 
-Запомните, что чтобы выйти из Emacs насовсем используется сочетание C-x
-C-c. А чтобы временно выйти в оболочку (shell) и потом вернуться обратно,
-используйте C-z.
+Запомните, чтобы совсем выйти из Emacs, используется сочетание клавиш
+C-x C-c. А чтобы временно выйти в оболочку (shell) и потом вернуться
+обратно, используйте C-z.
 
-Этот учебник должен быть понятен всем новым пользователям, если вы найдете
-что-нибудь неясное, не нужно сидеть и порицать себя -- жалуйтесь!
+Этот учебник должен быть понятен всем новым пользователям, но если вы
+найдете что-нибудь неясное, не нужно сидеть и порицать себя -- жалуйтесь!
 
 
 * COPYING
--------
+---------
 
 Этот учебник произошел из длинной серии учебников Emacs, начатой с однажды
 написанного by Stuart Cracraft для оригинального Emacs.
@@ -1071,12 +1069,17 @@
 Условия копирования самого Emacs более сложные, но в том же духе.
 Пожалуйста, прочтите файл COPYING и затем дайте копию GNU Emacs вашим
 друзьям. Помогите уничтожить обструкционизм в области программного
-обеспечения ("владение") используя, создавая и распространяя свободное
+обеспечения ("владение"), используя, создавая и распространяя свободное
 программное обеспечение!
 
-// замечания, исправления ошибок с нетерпением жду по адресу ottalex@beep.ru
+// замечания, исправления ошибок с нетерпением жду по адресу ottalex@narod.ru
 // Alex Ott.
 // Большое спасибо Владимиру Бормотову, на базе перевода которого был сделан
 // этот перевод
 
+;;; Local Variables:
+;;; coding: cyrillic-koi8
+;;; sentence-end-double-space: nil
+;;; End:
+
 ;;; arch-tag: ad4e5698-ea8b-45b7-b236-ed5ad5b72d2b
--- a/etc/TUTORIAL.sl	Sun Apr 18 01:34:11 2004 +0000
+++ b/etc/TUTORIAL.sl	Sun Apr 18 01:40:02 2004 +0000
@@ -1134,6 +1134,7 @@
 
 ;;; Local Variables:
 ;;; coding: iso-latin-2
+;;; sentence-end-double-space: nil
 ;;; End:
 
 ;;; arch-tag: 985059e4-44c6-4ac9-b627-46c8db57acf6
--- a/etc/TUTORIAL.sv	Sun Apr 18 01:34:11 2004 +0000
+++ b/etc/TUTORIAL.sv	Sun Apr 18 01:40:02 2004 +0000
@@ -1089,4 +1089,9 @@
 GNU Emacs to your friends.  Help stamp out software obstructionism
 ("ownership") by using, writing, and sharing free software!
 
+;;; Local Variables:
+;;;   coding: latin-1
+;;;   sentence-end-double-space: nil
+;;; End:
+
 ;;; arch-tag: b352f774-622b-4cc6-85ce-43e3baf4fc1b
--- a/etc/TUTORIAL.th	Sun Apr 18 01:34:11 2004 +0000
+++ b/etc/TUTORIAL.th	Sun Apr 18 01:40:02 2004 +0000
@@ -1005,4 +1005,8 @@
 
 Translate - January 1999 by Virach Sornlertlamvanich
 
+;;; Local Variables:
+;;;   sentence-end-double-space: nil
+;;; End:
+
 ;;; arch-tag: 79ad252a-448a-4dc9-a4cb-2097dd1ec014
--- a/lisp/ChangeLog	Sun Apr 18 01:34:11 2004 +0000
+++ b/lisp/ChangeLog	Sun Apr 18 01:40:02 2004 +0000
@@ -1,3 +1,91 @@
+2004-04-18  Nick Roberts  <nick@nick.uklinux.net>
+
+	* progmodes/gdb-ui.el (gdb-goto-info): Require 'info.
+	(gdb-info-breakpoints-custom): Revert previous change.
+	(gdb-view-assembler): Update assembler if necessary.
+	(gdb-frame-handler): Parse correctly for gdb-current-frame.
+	(gdb-display-source-buffer): Update properly when both source and
+	assembler are visible.
+
+2004-04-17  John Wiegley  <johnw@newartisans.com>
+
+	* iswitchb.el (iswitchb-max-to-show): Added a new config variable
+	which limits the number of names shown in the minibuffer.  Off by
+	default.
+	(iswitchb-completions): Use `iswitchb-max-to-show'.  This speeds
+	up iswitchb for users with a multitude of open buffers by showing
+	only the first and last N/2 buffers in the completion list (which
+	is enough to aid C-s/C-r, and to know that more characters are
+	needed to refine the completion list).
+
+2004-04-17  Richard M. Stallman  <rms@gnu.org>
+
+	* files.el (locate-file-completion): Handle nil in path-and-suffixes.
+	(file-truename): Expand all ~ constructs directly.
+	(insert-directory): Delete any error msg output by the
+	`insert-directory-program'.
+
+	* allout.el (allout-mode-exposure-menu, allout-mode-editing-menu):
+	(allout-mode-navigation-menu, allout-mode-misc-menu): New defvars.
+	(allout-prior-bindings, allout-added-bindings): Defvars deleted.
+	(allout-init): Use find-file-hook, not find-file-hooks.
+	(allout-mode): Eliminate Emacs 18 support.
+	Use write-contents-functions, not local-write-file-hooks.
+
+2004-04-17  Daniel Pfeiffer  <occitan@esperanto.org>
+
+	* progmodes/compile.el (compilation-error-properties): Fix for
+	adding messages when there are already markers for their file.
+	(compilation-fake-loc): New function.
+
+2004-04-16  Dave Love  <fx@gnu.org>
+
+	* progmodes/python.el (python-compilation-line-number): Fix braindamage.
+	(python-load-file): Fix python-orig-start setting.
+
+	* progmodes/compile.el: Doc fixes.
+	(compilation-error-regexp-alist-alist)
+	(compilation-mode-font-lock-keywords): Allow non-ASCII where possible.
+	(compilation-assq): Wrap in eval-when-compile.
+	(compilation-mode-font-lock-keywords): Don't use list*.
+	(compilation-start): Avoid warning.
+	(compilation-compat-error-properties)
+	(compilation-directory-properties): Add keymap property.
+	(compilation-parsing-end): Make it a marker for better compatibility.
+
+	* progmodes/python.el (python-after-info-look): Use with-no-warnings.
+
+2004-04-16  Mark A. Hershberger  <mah@everybody.org>
+
+	* xml.el: Doc fixes.
+	(xml-get-children): Only looks at sub-tags and ignore strings.
+
+	* xml.el (xml-parse-tag): Avoid overwriting node-name.
+
+2004-04-16  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* url/url-util.el (url-debug): Use with-current-buffer.
+
+	* url/url-nfs.el (url-nfs-file-attributes): Add id-format parameter.
+	(url-nfs-create-wrapper): Use new backquote syntax.
+
+	* url/url-https.el (url-https-file-attributes): Add id-format param.
+
+	* url/url-http.el (url-http-head-file-attributes)
+	(url-http-file-attributes): Add id-format parameter.
+
+	* url/url-handlers.el: Use new find-file-hook.
+	(url-file-attributes): Add id-format parameter.
+
+	* url/url-file.el (url-file-create-wrapper): Use new backquote syntax.
+	(url-file-file-attributes): Add id-format parameter.
+
+	* url/url-dav.el: Use with-current-buffer.
+	(url-dav-process-response): Fix regexps and spurious quote.
+	(url-dav-file-attributes): Add id-format param.
+
+	* diff-mode.el (diff-end-of-hunk): Be more careful with unified hunks.
+
 2004-04-16  Andre Spiegel  <spiegel@gnu.org>
 
 	* vc-hooks.el (vc-default-workfile-unchanged-p): Quote signal.
@@ -9,8 +97,7 @@
 	* simple.el (completion-setup-function): Set an initial value
 	to `element-common-end' before entering loop. Set a value
 	to `element-common-end' at the end of loop.
-	The bug is reported by Juri Linkov <juri@jurta.org> in emacs-devel
-	list.
+	The bug is reported by Juri Linkov <juri@jurta.org> in emacs-devel list.
 	(completions-common-part): Rename from completion-de-emphasis.
 	(completions-first-difference): Rename from completion-emphasis.
 	Suggested by RMS.
@@ -20,6 +107,12 @@
 	* bookmark.el (bookmark-send-edited-annotation): Fix docstring.
 	(bookmark-edit-annotation-mode): Add mode name.
 
+2004-04-15  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* smerge-mode.el (smerge-match-conflict): Try to do something sensible
+	for nested conflict markers.
+	(smerge-find-conflict): Better handle errors in smerge-match-conflict.
+
 2004-04-15  Nick Roberts  <nick@nick.uklinux.net>
 
 	* progmodes/gdb-ui.el (gdb-goto-info): New function.
@@ -119,7 +212,7 @@
 	in addition it also disables menu-bar, tool-bar, scroll-bars,
 	tool-tips, and the blinking cursor.
 	(command-line-1): Skip startup screen if -Q.
-	(fancy-splash-head): Use :align-to center prop to center splash image.
+	(fancy-splash-head): Use ":align-to center" prop to center splash image.
 
 	* emulation/cua-base.el (cua-read-only-cursor-color)
 	(cua-overwrite-cursor-color, cua-global-mark-cursor-color): Doc fix.
@@ -154,6 +247,10 @@
 	* progmodes/python.el (run-python): Use compilation-shell-minor-mode.
 	Set compilation-error-regexp-alist earlier.
 
+	* progmodes/compile.el (compilation-minor-mode-map)
+	(compilation-shell-minor-mode-map, compile-mouse-goto-error)
+	(compile-goto-error): Re-merge the mouse and non-mouse commands.
+
 2004-04-12  Stefan Monnier  <monnier@iro.umontreal.ca>
 
 	* progmodes/compile.el (compile-goto-error): Select the buffer/window
--- a/lisp/allout.el	Sun Apr 18 01:34:11 2004 +0000
+++ b/lisp/allout.el	Sun Apr 18 01:40:02 2004 +0000
@@ -83,7 +83,7 @@
 
 With value t, auto-mode-activation and auto-layout are enabled.
 \(This also depends on `allout-find-file-hook' being installed in
-`find-file-hooks', which is also done by `allout-init'.)
+`find-file-hook', which is also done by `allout-init'.)
 
 With value `ask', auto-mode-activation is enabled, and endorsement for
 performing auto-layout is asked of the user each time.
@@ -726,17 +726,12 @@
 			      (car (cdr cell)))))))
 	    keymap-list)
     map))
-;;;_   = allout-prior-bindings - being deprecated.
-(defvar allout-prior-bindings nil
-  "Variable for use in V18, with `allout-added-bindings', for
-resurrecting, on mode deactivation, bindings that existed before
-activation.  Being deprecated.")
-;;;_   = allout-added-bindings - being deprecated
-(defvar allout-added-bindings nil
-  "Variable for use in V18, with `allout-prior-bindings', for
-resurrecting, on mode deactivation, bindings that existed before
-activation.  Being deprecated.")
+
 ;;;_  : Menu bar
+(defvar allout-mode-exposure-menu)
+(defvar allout-mode-editing-menu)
+(defvar allout-mode-navigation-menu)
+(defvar allout-mode-misc-menu)
 (defun produce-allout-mode-menubar-entries ()
   (require 'easymenu)
   (easy-menu-define allout-mode-exposure-menu
@@ -909,7 +904,7 @@
 to track repeats.")
 ;;;_   > allout-write-file-hook ()
 (defun allout-write-file-hook ()
-  "In `allout-mode', run as a `local-write-file-hooks' activity.
+  "In `allout-mode', run as a `write-contents-functions' activity.
 
 Currently just sets `allout-during-write-cue', so outline change-protection
 knows to keep inactive during file write."
@@ -950,7 +945,7 @@
 `allout-expose-topic' docstrings for more details on auto layout).
 
 `allout-init' works by setting up (or removing)
-`allout-find-file-hook' in `find-file-hooks', and giving
+`allout-find-file-hook' in `find-file-hook', and giving
 `allout-auto-activation' a suitable setting.
 
 To prime your emacs session for full auto-outline operation, include
@@ -979,16 +974,16 @@
        (curr-mode 'allout-auto-activation))
 
     (cond ((not mode)
-	   (setq find-file-hooks (delq hook find-file-hooks))
+	   (setq find-file-hook (delq hook find-file-hook))
 	   (if (interactive-p)
 	       (message "Allout outline mode auto-activation inhibited.")))
 	  ((eq mode 'report)
-	   (if (memq hook find-file-hooks)
+	   (if (memq hook find-file-hook)
 	       ;; Just punt and use the reports from each of the modes:
 	       (allout-init (symbol-value curr-mode))
 	     (allout-init nil)
 	     (message "Allout outline mode auto-activation inhibited.")))
-	  (t (add-hook 'find-file-hooks hook)
+	  (t (add-hook 'find-file-hook hook)
 	     (set curr-mode		; `set', not `setq'!
 		  (cond ((eq mode 'activate)
 			 (message
@@ -1252,19 +1247,6 @@
 				       ; active state or *de*activation
 				       ; specifically requested:
       (setq allout-explicitly-deactivated t)
-      (if (string-match "^18\." emacs-version)
-				       ; Revoke those keys that remain
-				       ; as we set them:
-	  (let ((curr-loc (current-local-map)))
-	   (mapcar (function
-		    (lambda (cell)
-		      (if (eq (lookup-key curr-loc (car cell))
-			      (car (cdr cell)))
-			  (define-key curr-loc (car cell)
-			    (assq (car cell) allout-prior-bindings)))))
-		   allout-added-bindings)
-	   (allout-resumptions 'allout-added-bindings)
-	   (allout-resumptions 'allout-prior-bindings)))
 
       (if allout-old-style-prefixes
 	  (progn
@@ -1273,9 +1255,9 @@
       (allout-resumptions 'selective-display)
       (if (and (boundp 'before-change-functions) before-change-functions)
 	  (allout-resumptions 'before-change-functions))
-      (setq local-write-file-hooks
-	   (delq 'allout-write-file-hook
-		 local-write-file-hooks))
+      (setq write-contents-functions
+	    (delq 'allout-write-file-hook
+		  write-contents-functions))
       (allout-resumptions 'paragraph-start)
       (allout-resumptions 'paragraph-separate)
       (allout-resumptions (if (string-match "^18" emacs-version)
@@ -1315,13 +1297,6 @@
 		     (cons '(allout-mode . allout-mode-map)
 			   minor-mode-map-alist))))
 
-				       ; V18 minor-mode key bindings:
-				       ; Stash record of added bindings
-				       ; for later revocation:
-	(allout-resumptions 'allout-added-bindings
-			    (list allout-keybindings-list))
-	(allout-resumptions 'allout-prior-bindings
-			    (list (current-local-map)))
 				       ; and add them:
 	(use-local-map (produce-allout-mode-map allout-keybindings-list
 						(current-local-map)))
@@ -1340,7 +1315,7 @@
 				       ; Temporarily set by any outline
 				       ; functions that can be trusted to
 				       ; deal properly with concealed text.
-      (add-hook 'local-write-file-hooks 'allout-write-file-hook)
+      (add-hook 'write-contents-functions 'allout-write-file-hook)
 				       ; Custom auto-fill func, to support
 				       ; respect for topic headline,
 				       ; hanging-indents, etc:
--- a/lisp/diff-mode.el	Sun Apr 18 01:34:11 2004 +0000
+++ b/lisp/diff-mode.el	Sun Apr 18 01:40:02 2004 +0000
@@ -305,7 +305,11 @@
 (defvar diff-narrowed-to nil)
 
 (defun diff-end-of-hunk (&optional style)
-  (if (looking-at diff-hunk-header-re) (goto-char (match-end 0)))
+  (when (looking-at diff-hunk-header-re)
+    (unless style
+      ;; Especially important for unified (because headers are ambiguous).
+      (setq style (cdr (assq (char-after) '((?@ . unified) (?* . context))))))
+    (goto-char (match-end 0)))
   (let ((end (and (re-search-forward (case style
 				       ;; A `unified' header is ambiguous.
 				       (unified (concat "^[^-+# \\]\\|"
--- a/lisp/files.el	Sun Apr 18 01:34:11 2004 +0000
+++ b/lisp/files.el	Sun Apr 18 01:40:02 2004 +0000
@@ -616,6 +616,8 @@
 	  (suffix (concat (regexp-opt (cdr path-and-suffixes) t) "\\'"))
 	  (string-dir (file-name-directory string)))
       (dolist (dir (car path-and-suffixes))
+	(unless dir
+	  (setq dir default-directory))
 	(if string-dir (setq dir (expand-file-name string-dir dir)))
 	(when (file-directory-p dir)
 	  (dolist (file (file-name-all-completions
@@ -668,14 +670,17 @@
   ;; PREV-DIRS can be a cons cell whose car is an alist
   ;; of truenames we've just recently computed.
 
-  ;; The last test looks dubious, maybe `+' is meant here?  --simon.
-  (if (or (string= filename "") (string= filename "~")
-	  (and (string= (substring filename 0 1) "~")
-	       (string-match "~[^/]*" filename)))
-      (progn
-	(setq filename (expand-file-name filename))
-	(if (string= filename "")
-	    (setq filename "/"))))
+  (cond ((or (string= filename "") (string= filename "~"))
+	 (setq filename (expand-file-name filename))
+	 (if (string= filename "")
+	     (setq filename "/")))
+	((and (string= (substring filename 0 1) "~")
+	      (string-match "~[^/]*/?" filename))
+	 (let ((first-part
+		(substring filename 0 (match-end 0)))
+	       (rest (substring filename (match-end 0))))
+	   (setq filename (concat (expand-file-name first-part) rest)))))
+
   (or counter (setq counter (list 100)))
   (let (done
 	;; For speed, remove the ange-ftp completion handler from the list.
@@ -4230,7 +4235,7 @@
 whose name is in the variable `insert-directory-program'.
 If WILDCARD, it also runs the shell specified by `shell-file-name'.
 
-When SWITCHES contains the long `--dired' option,this function
+When SWITCHES contains the long `--dired' option, this function
 treats it specially, for the sake of dired.  However, the
 normally equivalent short `-D' option is just passed on to
 `insert-directory-program', as any other option."
@@ -4307,6 +4312,8 @@
 
 	  ;; If `insert-directory-program' failed, signal an error.
 	  (unless (eq 0 result)
+	    ;; Delete the error message it may have output.
+	    (delete-region beg (point))
 	    ;; On non-Posix systems, we cannot open a directory, so
 	    ;; don't even try, because that will always result in
 	    ;; the ubiquitous "Access denied".  Instead, show the
--- a/lisp/iswitchb.el	Sun Apr 18 01:34:11 2004 +0000
+++ b/lisp/iswitchb.el	Sun Apr 18 01:40:02 2004 +0000
@@ -298,6 +298,13 @@
   :type '(repeat (choice regexp function))
   :group 'iswitchb)
 
+(defcustom iswitchb-max-to-show nil
+  "*If non-nil, limit the number of names shown in the minibuffer.
+This can greatly speed up iswitchb if you have a multitude of
+buffers open."
+  :type 'integer
+  :group 'iswitchb)
+
 (defcustom iswitchb-cannot-complete-hook 'iswitchb-completion-help
   "*Hook run when `iswitchb-complete' can't complete any more.
 The most useful values are `iswitchb-completion-help', which pops up a
@@ -1185,6 +1192,15 @@
 		   contents
 		   (not minibuffer-completion-confirm)))))))
 
+(defun iswitchb-output-completion (com)
+  (if (= (length com) most-len)
+      ;; Most is one exact match,
+      ;; note that and leave out
+      ;; for later indication:
+      (ignore
+       (setq most-is-exact t))
+    (substring com most-len)))
+
 (defun iswitchb-completions (name require-match)
   "Return the string that is displayed after the user's text.
 Modified from `icomplete-completions'."
@@ -1224,28 +1240,23 @@
 		     "")
 		   (if (not iswitchb-use-fonts) " [Matched]")))
 	  (t				;multiple matches
+	   (if (and iswitchb-max-to-show
+		    (> (length comps) iswitchb-max-to-show))
+	       (setq comps
+		     (append
+		      (subseq comps 0 (/ iswitchb-max-to-show 2))
+		      (list "...")
+		      (subseq comps (- (length comps)
+				       (/ iswitchb-max-to-show 2))))))
 	   (let* (
 		  ;;(most (try-completion name candidates predicate))
 		  (most nil)
 		  (most-len (length most))
 		  most-is-exact
-		  (alternatives
-		   (apply
-		    (function concat)
-		    (cdr (apply
-			  (function nconc)
-			  (mapcar '(lambda (com)
-				     (if (= (length com) most-len)
-					 ;; Most is one exact match,
-					 ;; note that and leave out
-					 ;; for later indication:
-					 (progn
-					   (setq most-is-exact t)
-					   ())
-				       (list ","
-					     (substring com
-							most-len))))
-				  comps))))))
+		  (alternatives (if most
+				    (mapconcat 'iswitchb-output-completion
+					       comps ",")
+				  (mapconcat 'identity comps ","))))
 
 	     (concat
 
--- a/lisp/progmodes/compile.el	Sun Apr 18 01:34:11 2004 +0000
+++ b/lisp/progmodes/compile.el	Sun Apr 18 01:40:02 2004 +0000
@@ -100,7 +100,7 @@
 ;;;###autoload
 (defvar compilation-process-setup-function nil
   "*Function to call to customize the compilation process.
-This functions is called immediately before the compilation process is
+This function is called immediately before the compilation process is
 started.  It can be used to set any variables or functions that are used
 while processing the output of the compilation process.  The function
 is called with variables `compilation-buffer' and `compilation-window'
@@ -187,8 +187,9 @@
      "^\\([^( \n\t]+\\)(\\([0-9]+\\):\\([0-9]+\\)) :\
  \\(?:warnin\\(g\\)\\|informationa\\(l\\)\\)?" 1 2 3 (4 . 5))
 
+    ;; fixme: should be `mips'
     (irix
-     "^[a-z0-9/]+: \\(?:[eE]rror\\|[wW]arnin\\(g\\)\\|[iI]nf\\(o\\)\\)[0-9 ]*:\
+     "^[-[:alnum:]_/]+: \\(?:[eE]rror\\|[wW]arnin\\(g\\)\\|[iI]nf\\(o\\)\\)[0-9 ]*:\
  \\([^,\" \n\t]+\\)\\(?:, line\\|:\\) \\([0-9]+\\):" 3 4 nil (1 . 2))
 
     (java
@@ -206,7 +207,7 @@
 \\(.+\\):\\([0-9]+\\)\\(?:\\(:\\)\\|\\(,\\)\\)?" 1 2 nil (3 . 4))
 
     (gnu
-     "^\\(?:[a-zA-Z][-a-zA-Z0-9.]+: ?\\)?\
+     "^\\(?:[[:alpha:]][-[:alnum:].]+: ?\\)?\
 \\([/.]*[a-zA-Z]:?[^ \t\n:]*\\): ?\
 \\([0-9]+\\)\\([.:]?\\)\\([0-9]+\\)?\
 \\(?:-\\(?:\\([0-9]+\\)\\3\\)?\\.?\\([0-9]+\\)?\\)?:\
@@ -228,6 +229,7 @@
       (1 (compilation-error-properties 2 3 nil nil nil 0 nil)
 	 append)))
 
+    ;; Should be lint-1, lint-2 (SysV lint)
     (mips-1
      " (\\([0-9]+\\)) in \\([^ \n]+\\)" 2 1)
     (mips-2
@@ -261,15 +263,16 @@
      nil 1 nil (3) nil (2 (compilation-face '(3))))
 
     (sun
-     ": \\(?:ERROR\\|WARNIN\\(G\\)\\|REMAR\\(K\\)\\) \\(?:[a-zA-Z0-9 ]+, \\)?\
+     ": \\(?:ERROR\\|WARNIN\\(G\\)\\|REMAR\\(K\\)\\) \\(?:[[:alnum:] ]+, \\)?\
 File = \\(.+\\), Line = \\([0-9]+\\)\\(?:, Column = \\([0-9]+\\)\\)?"
      3 4 5 (1 . 2))
 
     (sun-ada
      "^\\([^, \n\t]+\\), line \\([0-9]+\\), char \\([0-9]+\\)[:., \(-]" 1 2 3)
 
-    (ultrix
-     "^\\(?:cfe\\|fort\\): \\(Warning\\)?[^:\n]*: \\([^ \n]*\\), line \\([0-9]+\\):" 2 3 nil (1))
+    ;; Redundant with `mips'
+;;    (ultrix
+;;      "^\\(?:cfe\\|fort\\): \\(Warning\\)?[^:\n]*: \\([^ \n]*\\), line \\([0-9]+\\):" 2 3 nil (1))
 
     (4bsd
      "\\(?:^\\|::  \\|\\S ( \\)\\(/[^ \n\t()]+\\)(\\([0-9]+\\))\
@@ -279,14 +282,14 @@
 (defcustom compilation-error-regexp-alist
   (mapcar 'car compilation-error-regexp-alist-alist)
   "Alist that specifies how to match errors in compiler output.
-Note that on Unix exerything is a valid filename, so these
+Note that on Unix everything is a valid filename, so these
 matchers must make some common sense assumptions, which catch
 normal cases.  A shorter list will be lighter on resource usage.
 
 Instead of an alist element, you can use a symbol, which is
 looked up in `compilation-error-regexp-alist-alist'.  You can see
 the predefined symbols and their effects in the file
-`etc/compilation.txt' (linked below if your are customizing this).
+`etc/compilation.txt' (linked below if you are customizing this).
 
 Each elt has the form (REGEXP FILE [LINE COLUMN TYPE HYPERLINK
 HIGHLIGHT...]).  If REGEXP matches, the FILE'th subexpression
@@ -357,7 +360,7 @@
       (1 font-lock-variable-name-face)
       (2 (compilation-face '(4 . 3))))
      ;; Command output lines.  Recognize `make[n]:' lines too.
-     ("^\\([A-Za-z_0-9/.+-]+\\)\\(\\[\\([0-9]+\\)\\]\\)?[ \t]*:"
+     ("^\\([[:alnum:]_/.+-]+\\)\\(\\[\\([0-9]+\\)\\]\\)?[ \t]*:"
       (1 font-lock-function-name-face) (3 compilation-line-face nil t))
      (" --?o\\(?:utfile\\|utput\\)?[= ]?\\(\\S +\\)" . 1)
      ("^Compilation finished" . compilation-info-face)
@@ -427,7 +430,7 @@
 (defvar compilation-locs ())
 
 (defvar compilation-debug nil
-  "*Set this to `t' before creating a *compilation* buffer.
+  "*Set this to t before creating a *compilation* buffer.
 Then every error line will have a debug text property with the matcher that
 fit this line and the match data.  Use `describe-text-properties'.")
 
@@ -494,7 +497,7 @@
 
 
 ;; Used for compatibility with the old compile.el.
-(defvar compilation-parsing-end nil)
+(defvar compilation-parsing-end (make-marker))
 (defvar compilation-parse-errors-function nil)
 (defvar compilation-error-list nil)
 (defvar compilation-old-error-list nil)
@@ -518,6 +521,7 @@
 			 '(nil))	; nil only isn't a property-change
 		   (cons (match-string-no-properties idx) dir))
       mouse-face highlight
+      keymap compilation-button-map
       help-echo "mouse-2: visit current directory")))
 
 ;; Data type `reverse-ordered-alist' retriever.	 This function retrieves the
@@ -528,6 +532,7 @@
 ;; may be nil.	The other KEYs are ordered backwards so that growing line
 ;; numbers can be inserted in front and searching can abort after half the
 ;; list on average.
+(eval-when-compile		    ;Don't keep it at runtime if not needed.
 (defmacro compilation-assq (key alist)
   `(let* ((l1 ,alist)
 	  (l2 (cdr l1)))
@@ -538,7 +543,7 @@
 			l2 (cdr l1)))
 		(if l2 (eq ,key (caar l2))))
 	      l2
-	    (setcdr l1 (cons (list ,key) l2))))))
+	    (setcdr l1 (cons (list ,key) l2)))))))
 
 
 ;; This function is the central driver, called when font-locking to gather
@@ -564,7 +569,7 @@
 	    file (or (if file
 			 (nth 2 (car (or (get-text-property (1- file) 'message)
 					 (get-text-property file 'message)))))
-		     ;; no previous either -- let font-lock continue
+		     ;; no previous either -- but don't let font-lock fail
 		     (gethash (setq file '("*unknown*")) compilation-locs)
 		     (puthash file (list file fmt) compilation-locs))))
     ;; All of these fields are optional, get them only if we have an index, and
@@ -581,15 +586,54 @@
     (if (and end-col (setq end-col (match-string-no-properties end-col)))
 	(setq end-col (- (string-to-number end-col) compilation-first-column))
       (if end-line (setq end-col -1)))
-    (if (consp type)			; not a preset type, check what it is.
+    (if (consp type)			; not a static type, check what it is.
 	(setq type (or (and (car type) (match-end (car type)) 1)
 		       (and (cdr type) (match-end (cdr type)) 0)
 		       2)))
-    ;; Get any (first) already existing marker (if any has one, all have one).
-    ;; Do this first, as the next assq`s may create new nodes.
-    (let ((marker (nth 3 (car (cdar (cddr file)))))
-	  (loc (compilation-assq line (cdr file)))
-	  end-loc)
+    ;; Get first already existing marker (if any has one, all have one).
+    ;; Do this first, as the compilation-assq`s may create new nodes.
+    (let* ((marker-line (car (cddr file)))	; a line structure
+	   (marker (nth 3 (cadr marker-line)))	; its marker
+	   (compilation-error-screen-columns compilation-error-screen-columns)
+	   end-marker loc end-loc)
+      (if (not (and marker (marker-buffer marker)))
+	  (setq marker)			; no valid marker for this file
+	(setq loc (or line 1)		; normalize no linenumber to line 1
+	      marker-line)
+	(catch 'marker			; find nearest loc, at least one exists
+	  (dolist (x (cddr file))	; loop over lines
+	    (if (> (or (car x) 1) loc)	; still bigger
+		(setq marker-line x)
+	      (if (or (not marker-line)	; first in list
+		      (> (- (or (car marker-line) 1) loc)
+			 (- loc (or (car x) 1)))) ; current line is nearer
+		  (setq marker-line x))
+	      (throw 'marker t))))
+	(setq marker (nth 3 (cadr marker-line))
+	      marker-line (car marker-line))
+	(with-current-buffer (marker-buffer marker)
+	  (save-restriction
+	    (widen)
+	    (goto-char (marker-position marker))
+	    (when (or end-col end-line)
+	      (beginning-of-line (- (or end-line line) marker-line -1))
+	      (if (< end-col 0)
+		  (end-of-line)
+		(if compilation-error-screen-columns
+		    (move-to-column end-col)
+		  (forward-char end-col)))
+	      (setq end-marker (list (point-marker))))
+	    (beginning-of-line (if end-line
+				   (- end-line line -1)
+				 (- loc marker-line -1)))
+	    (if col
+		(if compilation-error-screen-columns
+		    (move-to-column col)
+		  (forward-char col))
+	      (forward-to-indentation 0))
+	    (setq marker (list (point-marker))))))
+
+      (setq loc (compilation-assq line (cdr file)))
       (if end-line
 	  (setq end-loc (compilation-assq end-line (cdr file))
 		end-loc (compilation-assq end-col end-loc))
@@ -597,44 +641,10 @@
 	    (setq end-loc (compilation-assq end-col loc))))
       (setq loc (compilation-assq col loc))
       ;; If they are new, make the loc(s) reference the file they point to.
-      (or (cdr loc) (setcdr loc (list line file)))
+      (or (cdr loc) (setcdr loc `(,line ,file ,@marker)))
       (if end-loc
-	  (or (cdr end-loc) (setcdr end-loc (list (or end-line line) file))))
-      ;; If we'd found a marker, ensure that the new locs also get markers
-      (when (and marker
-		 (not (or (cddr loc) (cddr end-loc))) ; maybe new node w/o marker
-		 (marker-buffer marker)) ; other marker still valid
-	(or line (setq line 1))		 ; normalize no linenumber to line 1
-	(catch 'marker		       ; find nearest loc, at least one exists
-	  (dolist (x (cddr file))
-	    (if (> (or (car x) 1) line)
-		(setq marker x)
-	      (if (eq (or (car x) 1) line)
-		  (if (cdr (cddr x))	; at least one other column
-		      (throw 'marker (setq marker x))
-		    (if marker (throw 'marker t)))
-		(throw 'marker (or marker (setq marker x)))))))
-	(setq marker (if (eq (car (cddr marker)) col)
-			 (nthcdr 3 marker)
-		       (cddr marker))
-	      file compilation-error-screen-columns)
-	(with-current-buffer (marker-buffer (cddr marker))
-	  (save-restriction
-	    (widen)
-	    (goto-char (marker-position (cddr marker)))
-	    (beginning-of-line (- line (car (cadr marker)) -1))
-	    (if file			; original c.-error-screen-columns
-		(move-to-column (car loc))
-	      (forward-char (car loc)))
-	    (setcdr (cdr loc) (point-marker))
-	    (when end-loc
-	      (beginning-of-line (- end-line line -1))
-	      (if (< end-col 0)
-		  (end-of-line)
-		(if file		; original c.-error-screen-columns
-		    (move-to-column (car end-loc))
-		  (forward-char (car end-loc))))
-	      (setcdr (cdr end-loc) (point-marker))))))
+	  (or (cdr end-loc) (setcdr end-loc `(,(or end-line line) ,file ,@end-marker))))
+
       ;; Must start with face
       `(face ,compilation-message-face
 	     message (,loc ,type ,end-loc)
@@ -686,9 +696,9 @@
 	      ;; error location.  Let's do our best.
 	      `(,(car item)
 		(0 (compilation-compat-error-properties
-		    (funcall ',line (list* (match-string ,file)
-					   default-directory
-					   ',(nthcdr 4 item))
+		    (funcall ',line (cons (match-string ,file)
+					  (cons default-directory
+						',(nthcdr 4 item)))
 			     ,(if col `(match-string ,col)))))
 		(,file compilation-error-face t))
 
@@ -729,7 +739,7 @@
 Runs COMMAND, a shell command, in a separate process asynchronously
 with output going to the buffer `*compilation*'.
 
-If optional second arg COMINT is t the buffer will be in comint mode with
+If optional second arg COMINT is t the buffer will be in Comint mode with
 `compilation-shell-minor-mode'.
 
 You can then use the command \\[next-error] to find the next error message
@@ -762,8 +772,8 @@
 ;; run compile with the default command line
 (defun recompile ()
   "Re-compile the program including the current buffer.
-If this is run in a compilation-mode buffer, re-use the arguments from the
-original use.  Otherwise, it recompiles using `compile-command'."
+If this is run in a Compilation mode buffer, re-use the arguments from the
+original use.  Otherwise, recompile using `compile-command'."
   (interactive)
   (save-some-buffers (not compilation-ask-about-save) nil)
   (let ((default-directory (or compilation-directory default-directory)))
@@ -773,9 +783,9 @@
 (defcustom compilation-scroll-output nil
   "*Non-nil to scroll the *compilation* buffer window as output appears.
 
-Setting it causes the compilation-mode commands to put point at the
+Setting it causes the Compilation mode commands to put point at the
 end of their output window so that the end of the output is always
-visible rather than the begining."
+visible rather than the beginning."
   :type 'boolean
   :version "20.3"
   :group 'compilation)
@@ -822,11 +832,11 @@
 The rest of the arguments are optional; for them, nil means use the default.
 
 MODE is the major mode to set in the compilation buffer.  Mode
-may also be `t' meaning `compilation-shell-minor-mode' under `comint-mode'.
+may also be t meaning use `compilation-shell-minor-mode' under `comint-mode'.
 NAME-FUNCTION is a function called to name the buffer.
 
 If HIGHLIGHT-REGEXP is non-nil, `next-error' will temporarily highlight
-matching section of the visited source line; the default is to use the
+the matching section of the visited source line; the default is to use the
 global value of `compilation-highlight-regexp'.
 
 Returns the compilation buffer created."
@@ -838,8 +848,8 @@
 	(process-environment
 	 (append
 	  compilation-environment
-	  (if (and (boundp 'system-uses-terminfo)
-		   system-uses-terminfo)
+	  (if (if (boundp 'system-uses-terminfo) ; `if' for compiler warning
+		  system-uses-terminfo)
 	      (list "TERM=dumb" "TERMCAP="
 		    (format "COLUMNS=%d" (window-width)))
 	    (list "TERM=emacs"
@@ -1136,7 +1146,9 @@
 (defconst compilation-turn-on-font-lock 'turn-on-font-lock)
 
 (defun compilation-setup (&optional minor)
-  "Prepare the buffer for the compilation parsing commands to work."
+  "Prepare the buffer for the compilation parsing commands to work.
+Optional argument MINOR indicates this is called from
+`compilation-minor-mode'."
   (make-local-variable 'compilation-current-error)
   (make-local-variable 'compilation-error-screen-columns)
   (make-local-variable 'overlay-arrow-position)
@@ -1145,7 +1157,7 @@
        '(directory message help-echo mouse-face debug))
   (set (make-local-variable 'compilation-locs)
        (make-hash-table :test 'equal :weakness 'value))
-  ;; lazy-lock would never find the message unless it's scrolled to
+  ;; lazy-lock would never find the message unless it's scrolled to.
   ;; jit-lock might fontify some things too late.
   (set (make-local-variable 'font-lock-support-mode) nil)
   (set (make-local-variable 'font-lock-maximum-size) nil)
@@ -1193,7 +1205,7 @@
     (font-lock-fontify-buffer)))
 
 (defun compilation-handle-exit (process-status exit-status msg)
-  "Write msg in the current buffer and hack its mode-line-process."
+  "Write MSG in the current buffer and hack its mode-line-process."
   (let ((buffer-read-only nil)
 	(status (if compilation-exit-message-function
 		    (funcall compilation-exit-message-function
@@ -1338,7 +1350,7 @@
   (pop-to-buffer compilation-last-buffer))
 
 (defun previous-error-no-select (n)
-  "Move point to the previous error in the compilation buffer and highlight match.
+  "Move point to previous error in compilation buffer and highlight match.
 Prefix arg N says how many error messages to move backwards (or
 forwards, if negative).
 Finds and highlights the source line like \\[previous-error], but does not
@@ -1449,7 +1461,7 @@
     ;; If loc contains no marker, no error in that file has been visited.  If
     ;; the marker is invalid the buffer has been killed.  So, recalculate all
     ;; markers for that file.
-    (unless (and (nthcdr 3 loc) (marker-buffer (nth 3 loc)))
+    (unless (and (nth 3 loc) (marker-buffer (nth 3 loc)))
       (with-current-buffer (compilation-find-file marker (caar (nth 2 loc))
 						  (or (cdar (nth 2 loc))
 						      default-directory))
@@ -1472,7 +1484,7 @@
 		      (forward-char (car col))))
 		(beginning-of-line)
 		(skip-chars-forward " \t"))
-	      (if (nthcdr 3 col)
+	      (if (nth 3 col)
 		  (set-marker (nth 3 col) (point))
 		(setcdr (nthcdr 2 col) `(,(point-marker)))))))))
     (compilation-goto-locus marker (nth 3 loc) (nth 3 end-loc))
@@ -1499,6 +1511,32 @@
   (setq compilation-current-error nil)
   (next-error n))
 
+(defun compilation-fake-loc (marker file &optional line col)
+  "Preassociate MARKER with FILE.
+This is useful when you compile temporary files, but want
+automatic translation of the messages to the real buffer from
+which the temporary file came.  This only works if done before a
+message about FILE appears!
+
+Optional args LINE and COL default to 1 and beginning of
+indentation respectively.  The marker is expected to reflect
+this.  In the simplest case the marker points to the first line
+of the region that was saved to the temp file.
+
+If you concatenate several regions into the temp file (e.g. a
+header with variable assignments and a code region), you must
+call this several times, once each for the last line of one
+region and the first line of the next region."
+  (or (consp file) (setq file (list file)))
+  (setq	file (or (gethash file compilation-locs)
+		 (puthash file (list file nil) compilation-locs)))
+  (let ((loc (compilation-assq (or line 1) (cdr file))))
+    (setq loc (compilation-assq col loc))
+    (if (cdr loc)
+	(setcdr (cddr loc) (list marker))
+      (setcdr loc (list (or line 1) file marker)))
+    loc))
+
 (defcustom compilation-context-lines next-screen-context-lines
   "*Display this many lines of leading context before message."
   :type 'integer
@@ -1506,7 +1544,7 @@
   :version "21.4")
 
 (defsubst compilation-set-window (w mk)
-  ;; Align the compilation output window W with marker MK near top.
+  "Align the compilation output window W with marker MK near top."
   (set-window-start w (save-excursion
 			(goto-char mk)
 			(beginning-of-line (- 1 compilation-context-lines))
@@ -1514,8 +1552,8 @@
   (set-window-point w mk))
 
 (defun compilation-goto-locus (msg mk end-mk)
-  "Jump to an error MESSAGE and SOURCE.
-All arguments are markers.  If SOURCE-END is non nil, mark is set there."
+  "Jump to an error corresponding to MSG at MK.
+All arguments are markers.  If END-MK is non nil, mark is set there."
   (if (eq (window-buffer (selected-window))
 	  (marker-buffer msg))
       ;; If the compilation buffer window is selected,
@@ -1623,7 +1661,7 @@
       buffer)))
 
 (defun compilation-normalize-filename (filename)
-  "Convert a filename string found in an error message to make it usable."
+  "Convert FILENAME string found in an error message to make it usable."
 
   ;; Check for a comint-file-name-prefix and prepend it if
   ;; appropriate.  (This is very useful for
@@ -1691,7 +1729,7 @@
 (defun compile-buffer-substring (n) (if n (match-string n)))
 
 (defun compilation-compat-error-properties (err)
-  ;; Map old-style ERROR to new-style MESSAGE.
+  "Map old-style error ERR to new-style message."
   (let* ((dst (cdr err))
 	 (loc (cond ((markerp dst) (list nil nil nil dst))
 		    ((consp dst)
@@ -1701,6 +1739,7 @@
     `(face nil
       message ,(list loc 2)
       help-echo "mouse-2: visit the source location"
+      keymap compilation-button-map
       mouse-face highlight)))
 
 (defun compilation-compat-parse-errors (limit)
--- a/lisp/progmodes/gdb-ui.el	Sun Apr 18 01:34:11 2004 +0000
+++ b/lisp/progmodes/gdb-ui.el	Sun Apr 18 01:40:02 2004 +0000
@@ -222,6 +222,7 @@
 (defun gdb-goto-info ()
   (interactive)
   (select-frame (make-frame))
+  (require 'info)
   (Info-goto-node "(emacs)GDB Graphical Interface"))
 
 (defconst gdb-var-create-regexp
@@ -688,9 +689,9 @@
 	 (string-to-int (match-string 2 args))))
   (setq gdb-current-address (match-string 3 args))
   (setq gdb-view-source t)
-;; cover for auto-display output which comes *before*
-;; stopped annotation
-    (if (eq (gdb-get-output-sink) 'inferior) (gdb-set-output-sink 'user)))
+  ;; cover for auto-display output which comes *before*
+  ;; stopped annotation
+  (if (eq (gdb-get-output-sink) 'inferior) (gdb-set-output-sink 'user)))
 
 (defun gdb-send-item (item)
   (if gdb-enable-debug-log (push (cons 'send item) gdb-debug-log))
@@ -1112,7 +1113,8 @@
 			  (save-excursion
 			    (goto-line (string-to-number line))
 			    (gdb-put-breakpoint-icon (eq flag ?y)))))))))
-	  (end-of-line))))))
+	  (end-of-line)))))
+  (if (gdb-get-buffer 'gdb-assembler-buffer) (gdb-assembler-custom)))
 
 (defun gdb-mouse-toggle-breakpoint (event)
   "Toggle breakpoint with mouse click in left margin."
@@ -1532,11 +1534,9 @@
 
 (defun gdb-display-source-buffer (buffer)
   (if (eq gdb-selected-view 'source)
-      (progn
 	(gdb-display-buffer buffer)
-	(get-buffer-window buffer))
-    (gdb-display-buffer (gdb-get-buffer 'gdb-assembler-buffer))
-    nil))
+    (gdb-display-buffer (gdb-get-buffer 'gdb-assembler-buffer)))
+    (get-buffer-window buffer))
 
 
 ;;; Shared keymap initialization:
@@ -1612,6 +1612,7 @@
 (defun gdb-view-assembler()
   (interactive)
   (gdb-display-buffer (gdb-get-create-buffer 'gdb-assembler-buffer))
+  (gdb-invalidate-assembler)
   (setq gdb-selected-view 'assembler))
 
 ;(defun gdb-view-both()
@@ -1964,7 +1965,7 @@
   (with-current-buffer (gdb-get-create-buffer 'gdb-partial-output-buffer)
     (goto-char (point-min))
     (forward-line)
-    (if (looking-at ".*=\\s-+0x\\(\\S-*\\)\\s-+in\\s-+\\(\\S-*\\)")
+    (if (looking-at ".*=\\s-+0x\\(\\S-*\\)\\s-+in\\s-+\\(\\S-*?\\);? ")
 	(progn
 	  (setq gdb-current-frame (match-string 2))
 	  (let ((address (match-string 1)))
--- a/lisp/progmodes/python.el	Sun Apr 18 01:34:11 2004 +0000
+++ b/lisp/progmodes/python.el	Sun Apr 18 01:40:02 2004 +0000
@@ -3,6 +3,7 @@
 ;; Copyright (C) 2003, 04  Free Software Foundation, Inc.
 
 ;; Author: Dave Love <fx@gnu.org>
+;; Maintainer: FSF
 ;; Created: Nov 2003
 ;; Keywords: languages
 
@@ -66,10 +67,8 @@
 (require 'comint)
 (eval-when-compile
   (require 'compile)
-  (autoload 'Info-last "info")
-  (autoload 'Info-exit "info")
   (autoload 'info-lookup-maybe-add-help "info-look"))
-(autoload 'compilation-start "compile")	; spurious compiler warning anyway
+(autoload 'compilation-start "compile")
 
 (defgroup python nil
   "Silly walks in the Python language"
@@ -829,7 +828,8 @@
 Makes nested Imenu menus from nested `class' and `def' statements.
 The nested menus are headed by an item referencing the outer
 definition; it has a space prepended to the name so that it sorts
-first with `imenu--sort-by-name'."
+first with `imenu--sort-by-name' (though, unfortunately, sub-menus
+precede it)."
   (unless (boundp 'python-recursing)		; dynamically bound below
     (goto-char (point-min)))		; normal call from Imenu
   (let (index-alist			; accumulated value to return
@@ -937,32 +937,37 @@
 et al.")
 
 (defvar python-buffer nil
-  "*The current python process buffer.
-To run multiple Python processes, start the first with \\[run-python].
-It will be in a buffer named *Python*.  Rename that with
-\\[rename-buffer].  Now start a new process with \\[run-python].  It
-will be in a new buffer, named *Python*.  Switch between the different
-process buffers with \\[switch-to-buffer].
+  "The current python process buffer."
+  ;; Fixme: a single process is currently assumed, so that this doc
+  ;; is misleading.
+
+;;   "*The current python process buffer.
+;; To run multiple Python processes, start the first with \\[run-python].
+;; It will be in a buffer named *Python*.  Rename that with
+;; \\[rename-buffer].  Now start a new process with \\[run-python].  It
+;; will be in a new buffer, named *Python*.  Switch between the different
+;; process buffers with \\[switch-to-buffer].
 
-Commands that send text from source buffers to Python processes have
-to choose a process to send to.  This is determined by global variable
-`python-buffer'.  Suppose you have three inferior Pythons running:
-    Buffer	Process
-    foo		python
-    bar		python<2>
-    *Python*    python<3>
-If you do a \\[python-send-region-and-go] command on some Python source
-code, what process does it go to?
+;; Commands that send text from source buffers to Python processes have
+;; to choose a process to send to.  This is determined by global variable
+;; `python-buffer'.  Suppose you have three inferior Pythons running:
+;;     Buffer	Process
+;;     foo		python
+;;     bar		python<2>
+;;     *Python*    python<3>
+;; If you do a \\[python-send-region-and-go] command on some Python source
+;; code, what process does it go to?
 
-- In a process buffer (foo, bar, or *Python*), send it to that process.
-- In some other buffer (e.g. a source file), send it to the process
-  attached to `python-buffer'.
-Process selection is done by function `python-proc'.
+;; - In a process buffer (foo, bar, or *Python*), send it to that process.
+;; - In some other buffer (e.g. a source file), send it to the process
+;;   attached to `python-buffer'.
+;; Process selection is done by function `python-proc'.
 
-Whenever \\[run-python] starts a new process, it resets `python-buffer'
-to be the new process's buffer.  If you only run one process, this will
-do the right thing.  If you run multiple processes, you can change
-`python-buffer' to another process buffer with \\[set-variable].")
+;; Whenever \\[run-python] starts a new process, it resets `python-buffer'
+;; to be the new process's buffer.  If you only run one process, this will
+;; do the right thing.  If you run multiple processes, you can change
+;; `python-buffer' to another process buffer with \\[set-variable]."
+  )
 
 (defconst python-compilation-regexp-alist
   `((,(rx (and line-start (1+ (any " \t")) "File \""
@@ -971,6 +976,9 @@
      1 python-compilation-line-number))
   "`compilation-error-regexp-alist' for inferior Python.")
 
+;; Fixme: This should inherit some stuff from python-mode, but I'm not
+;; sure how much: at least some keybindings, like C-c C-f; syntax?;
+;; font-locking, e.g. for triple-quoted strings?
 (define-derived-mode inferior-python-mode comint-mode "Inferior Python"
   "Major mode for interacting with an inferior Python process.
 A Python process can be started with \\[run-python].
@@ -997,7 +1005,8 @@
   (add-hook 'comint-input-filter-functions 'python-input-filter nil t)
   (add-hook 'comint-preoutput-filter-functions #'python-preoutput-filter
 	    nil t)
-  ;; Still required by `comint-redirect-send-command', for instance:
+  ;; Still required by `comint-redirect-send-command', for instance
+  ;; (and we need to match things like `>>> ... >>> '):
   (set (make-local-variable 'comint-prompt-regexp) "^\\([>.]\\{3\\} \\)+")
   (set (make-local-variable 'compilation-error-regexp-alist)
        python-compilation-regexp-alist)
@@ -1037,11 +1046,15 @@
     (cons (point-marker)
 	  (if (and (markerp python-orig-start)
 		   (marker-buffer python-orig-start))
-	      (with-current-buffer (marker-buffer python-orig-start)
-		(goto-char python-orig-start)
-		(forward-line (1- line)))
-	    (list (if (stringp python-orig-start) python-orig-start file)
-		  line nil)))))
+	      (let ((start python-orig-start))
+		(with-current-buffer (marker-buffer python-orig-start)
+		  (goto-char start)
+		  (forward-line (1- line))
+		  (point-marker)))
+	    (list (if (stringp python-orig-start)
+		      (list python-orig-start default-directory)
+		    file)
+		  line col)))))
 
 (defvar python-preoutput-result nil
   "Data from output line last `_emacs_out' line seen by the preoutput filter.")
@@ -1234,17 +1247,17 @@
 	;; (set (make-local-variable 'compilation-old-error-list) nil)
 	(let ((comint-input-filter-functions
 	       (delete 'python-input-filter comint-input-filter-functions)))
+	  (set (make-local-variable 'python-orig-start) nil)
+	  ;; Fixme: I'm not convinced by this logic from python-mode.el.
 	  (python-send-string
 	   (if (string-match "\\.py\\'" file-name)
 	       ;; Fixme: make sure the directory is in the path list
 	       (let ((module (file-name-sans-extension
 			      (file-name-nondirectory file-name))))
-		 (set (make-local-variable 'python-orig-start) nil)
 		 (format "\
 if globals().has_key(%S): reload(%s)
 else: import %s
 " module module module))
-	     (set (make-local-variable 'python-orig-start) file-name)
 	     (format "execfile('%s')" file-name))))
 	(set-marker compilation-parsing-end end)
 	(setq compilation-last-buffer (current-buffer))))))
@@ -1329,13 +1342,14 @@
 		    (string-match "^Python \\([0-9]+\\.[0-9]+\\>\\)" s)
 		    (match-string 1 s)))
 	 ;; Whether info files have a Python version suffix, e.g. in Debian.
-	 (versioned
+	 (versioned 
 	  (with-temp-buffer
-	    (Info-mode)
+	    (with-no-warnings (Info-mode))
 	    (condition-case ()
 		;; Don't use `info' because it would pop-up a *info* buffer.
-		(Info-goto-node (format "(python%s-lib)Miscellaneous Index"
-					version))
+		(with-no-warnings
+		 (Info-goto-node (format "(python%s-lib)Miscellaneous Index"
+					 version)))
 	      (error nil)))))
     (info-lookup-maybe-add-help
      :mode 'python-mode
--- a/lisp/url/url-dav.el	Sun Apr 18 01:34:11 2004 +0000
+++ b/lisp/url/url-dav.el	Sun Apr 18 01:40:02 2004 +0000
@@ -386,8 +386,7 @@
 	(overall-status nil))
     (when buffer
       (unwind-protect
-	  (save-excursion
-	    (set-buffer buffer)
+	  (with-current-buffer buffer
 	    (goto-char url-http-end-of-headers)
 	    (setq overall-status url-http-response-status)
 
@@ -396,13 +395,13 @@
 	    ;; them.
 	    (if (and
 		 url-http-content-type
-		 (or (string-match "^text/xml" url-http-content-type)
-		     (string-match "^application/xml" url-http-content-type)))
+		 (string-match "\\`\\(text\\|application\\)/xml"
+			       url-http-content-type))
 		(setq tree (xml-parse-region (point) (point-max)))))
 	;; Clean up after ourselves.
-	'(kill-buffer buffer)))
+	(kill-buffer buffer)))
 
-    ;; We should now be 
+    ;; We should now be
     (if (eq (xml-node-name (car tree)) 'DAV:multistatus)
 	(url-dav-dispatch-node (car tree))
       (url-debug 'dav "Got back singleton response for URL(%S)" url)
@@ -577,8 +576,7 @@
 	 (result nil))
     (when buffer
       (unwind-protect
-	  (save-excursion
-	    (set-buffer buffer)
+	  (with-current-buffer buffer
 	    (setq result (url-dav-http-success-p url-http-response-status)))
 	(kill-buffer buffer)))
     result))
@@ -627,7 +625,7 @@
 (autoload 'url-http-head-file-attributes "url-http")
 
 ;;;###autoload
-(defun url-dav-file-attributes (url)
+(defun url-dav-file-attributes (url &optional id-format)
   (let ((properties (cdar (url-dav-get-properties url)))
 	(attributes nil))
     (if (and properties
@@ -679,7 +677,7 @@
 	       ;; device number - meaningless
 	       nil))
       ;; Fall back to just the normal http way of doing things.
-      (setq attributes (url-http-head-file-attributes url)))
+      (setq attributes (url-http-head-file-attributes url id-format)))
     attributes))
 
 ;;;###autoload
@@ -695,8 +693,7 @@
 	(url-request-data
 	 (cond
 	  ((bufferp obj)
-	   (save-excursion
-	     (set-buffer obj)
+	   (with-current-buffer obj
 	     (buffer-string)))
 	  ((stringp obj)
 	   obj)
@@ -719,8 +716,7 @@
     ;; Sanity checking
     (when buffer
       (unwind-protect
-	  (save-excursion
-	    (set-buffer buffer)
+	  (with-current-buffer buffer
 	    (setq result (url-dav-http-success-p url-http-response-status)))
 	(kill-buffer buffer)))
     result))
@@ -849,8 +845,7 @@
 	 (result nil))
     (when buffer
       (unwind-protect
-	  (save-excursion
-	    (set-buffer buffer)
+	  (with-current-buffer buffer
 	    (case url-http-response-status
 	      (201			; Collection created in its entirety
 	       (setq result t))
--- a/lisp/url/url-file.el	Sun Apr 18 01:34:11 2004 +0000
+++ b/lisp/url/url-file.el	Sun Apr 18 01:40:02 2004 +0000
@@ -220,14 +220,14 @@
     buffer))
 
 (defmacro url-file-create-wrapper (method args)
-  (` (defalias (quote (, (intern (format "url-ftp-%s" method))))
-       (defun (, (intern (format "url-file-%s" method))) (, args)
-	 (, (format "FTP/FILE URL wrapper around `%s' call." method))
-	 (setq url (url-file-build-filename url))
-	 (and url ((, method) (,@ (remove '&rest (remove '&optional args)))))))))
+  `(defalias ',(intern (format "url-ftp-%s" method))
+     (defun ,(intern (format "url-file-%s" method)) ,args
+       ,(format "FTP/FILE URL wrapper around `%s' call." method)
+       (setq url (url-file-build-filename url))
+       (and url (,method ,@(remove '&rest (remove '&optional args)))))))
 
 (url-file-create-wrapper file-exists-p (url))
-(url-file-create-wrapper file-attributes (url))
+(url-file-create-wrapper file-attributes (url &optional id-format))
 (url-file-create-wrapper file-symlink-p (url))
 (url-file-create-wrapper file-readable-p (url))
 (url-file-create-wrapper file-writable-p (url))
--- a/lisp/url/url-handlers.el	Sun Apr 18 01:34:11 2004 +0000
+++ b/lisp/url/url-handlers.el	Sun Apr 18 01:40:02 2004 +0000
@@ -225,7 +225,7 @@
                 ,@(remove '&rest (remove '&optional args))))))
 
 (url-handlers-create-wrapper file-exists-p (url))
-(url-handlers-create-wrapper file-attributes (url))
+(url-handlers-create-wrapper file-attributes (url &optional id-format))
 (url-handlers-create-wrapper file-symlink-p (url))
 (url-handlers-create-wrapper file-writable-p (url))
 (url-handlers-create-wrapper file-directory-p (url))
@@ -244,7 +244,7 @@
   (url-handlers-create-wrapper
    file-truename (url &optional counter prev-dirs)))
 
-(add-hook 'find-file-hooks 'url-handlers-set-buffer-mode)
+(add-hook 'find-file-hook 'url-handlers-set-buffer-mode)
 
 (defun url-handlers-set-buffer-mode ()
   "Set correct modes for the current buffer if visiting a remote file."
--- a/lisp/url/url-http.el	Sun Apr 18 01:34:11 2004 +0000
+++ b/lisp/url/url-http.el	Sun Apr 18 01:40:02 2004 +0000
@@ -4,6 +4,7 @@
 
 ;; Author: Bill Perry <wmperry@gnu.org>
 ;; Keywords: comm, data, processes
+
 ;; This file is part of GNU Emacs.
 ;;
 ;; GNU Emacs is free software; you can redistribute it and/or modify
@@ -1120,7 +1121,7 @@
 ;;;###autoload
 (defalias 'url-http-file-readable-p 'url-http-file-exists-p)
 
-(defun url-http-head-file-attributes (url)
+(defun url-http-head-file-attributes (url &optional id-format)
   (let ((buffer (url-http-head url))
 	(attributes nil))
     (when buffer
@@ -1136,10 +1137,10 @@
     attributes))
 
 ;;;###autoload
-(defun url-http-file-attributes (url)
+(defun url-http-file-attributes (url &optional id-format)
   (if (url-dav-supported-p url)
-      (url-dav-file-attributes url)
-    (url-http-head-file-attributes url)))
+      (url-dav-file-attributes url id-format)
+    (url-http-head-file-attributes url id-format)))
 
 ;;;###autoload
 (defun url-http-options (url)
--- a/lisp/url/url-https.el	Sun Apr 18 01:34:11 2004 +0000
+++ b/lisp/url/url-https.el	Sun Apr 18 01:40:02 2004 +0000
@@ -1,26 +1,29 @@
 ;;; url-https.el --- HTTP over SSL routines
+
+;; Copyright (c) 1999, 2004 Free Software Foundation, Inc.
+
 ;; Keywords: comm, data, processes
 
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Copyright (c) 1999 Free Software Foundation, Inc.
-;;;
-;;; This file is part of GNU Emacs.
-;;;
-;;; GNU Emacs is free software; you can redistribute it and/or modify
-;;; it under the terms of the GNU General Public License as published by
-;;; the Free Software Foundation; either version 2, or (at your option)
-;;; any later version.
-;;;
-;;; GNU Emacs is distributed in the hope that it will be useful,
-;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-;;; GNU General Public License for more details.
-;;;
-;;; You should have received a copy of the GNU General Public License
-;;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;;; Boston, MA 02111-1307, USA.
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; This file is part of GNU Emacs.
+;;
+;; GNU Emacs is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2, or (at your option)
+;; any later version.
+;;
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Commentary:
+
+;;; Code:
 
 (require 'url-gw)
 (require 'url-util)
@@ -45,8 +48,9 @@
 (url-https-create-secure-wrapper nil (url callback cbargs))
 (url-https-create-secure-wrapper file-exists-p (url))
 (url-https-create-secure-wrapper file-readable-p (url))
-(url-https-create-secure-wrapper file-attributes (url))
+(url-https-create-secure-wrapper file-attributes (url &optional id-format))
 
 (provide 'url-https)
 
-;;; arch-tag: c3645ac5-c248-4d12-ad41-7c4b6f7b6d19
+;; arch-tag: c3645ac5-c248-4d12-ad41-7c4b6f7b6d19
+;;; url-https.el ends here
--- a/lisp/url/url-nfs.el	Sun Apr 18 01:34:11 2004 +0000
+++ b/lisp/url/url-nfs.el	Sun Apr 18 01:40:02 2004 +0000
@@ -1,27 +1,30 @@
 ;;; url-nfs.el --- NFS URL interface
+
+;; Copyright (c) 1996,97,98,1999,2004  Free Software Foundation, Inc.
+;; Copyright (c) 1996 by William M. Perry <wmperry@cs.indiana.edu>
+
 ;; Keywords: comm, data, processes
 
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Copyright (c) 1996 by William M. Perry <wmperry@cs.indiana.edu>
-;;; Copyright (c) 1996 - 1999 Free Software Foundation, Inc.
-;;;
-;;; This file is part of GNU Emacs.
-;;;
-;;; GNU Emacs is free software; you can redistribute it and/or modify
-;;; it under the terms of the GNU General Public License as published by
-;;; the Free Software Foundation; either version 2, or (at your option)
-;;; any later version.
-;;;
-;;; GNU Emacs is distributed in the hope that it will be useful,
-;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-;;; GNU General Public License for more details.
-;;;
-;;; You should have received a copy of the GNU General Public License
-;;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;;; Boston, MA 02111-1307, USA.
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; This file is part of GNU Emacs.
+;;
+;; GNU Emacs is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2, or (at your option)
+;; any later version.
+;;
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Commentary:
+
+;;; Code:
 
 (eval-when-compile (require 'cl))
 (require 'url-parse)
@@ -72,14 +75,14 @@
   (url-file (url-nfs-build-filename url) callback cbargs))
 
 (defmacro url-nfs-create-wrapper (method args)
-  (` (defun (, (intern (format "url-nfs-%s" method))) (, args)
-       (, (format "NFS URL wrapper around `%s' call." method))
-       (setq url (url-nfs-build-filename url))
-       (and url ((, (intern (format "url-file-%s" method)))
-		 (,@ (remove '&rest (remove '&optional args))))))))
+  `(defun ,(intern (format "url-nfs-%s" method)) ,args
+     ,(format "NFS URL wrapper around `%s' call." method)
+     (setq url (url-nfs-build-filename url))
+     (and url (,(intern (format "url-file-%s" method))
+	       ,@(remove '&rest (remove '&optional args))))))
 
 (url-nfs-create-wrapper file-exists-p (url))
-(url-nfs-create-wrapper file-attributes (url))
+(url-nfs-create-wrapper file-attributes (url &optional id-format))
 (url-nfs-create-wrapper file-symlink-p (url))
 (url-nfs-create-wrapper file-readable-p (url))
 (url-nfs-create-wrapper file-writable-p (url))
@@ -93,4 +96,5 @@
 
 (provide 'url-nfs)
 
-;;; arch-tag: cdf9c9ba-b7d2-4c29-8b48-7ae9bbc0d437
+;; arch-tag: cdf9c9ba-b7d2-4c29-8b48-7ae9bbc0d437
+;;; url-nfs.el ends here
--- a/lisp/url/url-util.el	Sun Apr 18 01:34:11 2004 +0000
+++ b/lisp/url/url-util.el	Sun Apr 18 01:40:02 2004 +0000
@@ -1,28 +1,31 @@
 ;;; url-util.el --- Miscellaneous helper routines for URL library
+
+;; Copyright (c) 1996,97,98,99,2001,2004  Free Software Foundation, Inc.
+;; Copyright (c) 1993 - 1996 by William M. Perry <wmperry@cs.indiana.edu>
+
 ;; Author: Bill Perry <wmperry@gnu.org>
 ;; Keywords: comm, data, processes
 
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Copyright (c) 1993 - 1996 by William M. Perry <wmperry@cs.indiana.edu>
-;;; Copyright (c) 1996, 97, 98, 99, 2001 Free Software Foundation, Inc.
-;;;
-;;; This file is part of GNU Emacs.
-;;;
-;;; GNU Emacs is free software; you can redistribute it and/or modify
-;;; it under the terms of the GNU General Public License as published by
-;;; the Free Software Foundation; either version 2, or (at your option)
-;;; any later version.
-;;;
-;;; GNU Emacs is distributed in the hope that it will be useful,
-;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-;;; GNU General Public License for more details.
-;;;
-;;; You should have received a copy of the GNU General Public License
-;;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;;; Boston, MA 02111-1307, USA.
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; This file is part of GNU Emacs.
+;;
+;; GNU Emacs is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2, or (at your option)
+;; any later version.
+;;
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Commentary:
+
+;;; Code:
 
 (require 'url-parse)
 (autoload 'timezone-parse-date "timezone")
@@ -63,8 +66,7 @@
   (if (or (eq url-debug t)
 	  (numberp url-debug)
 	  (and (listp url-debug) (memq tag url-debug)))
-      (save-excursion
-	(set-buffer (get-buffer-create "*URL-DEBUG*"))
+      (with-current-buffer (get-buffer-create "*URL-DEBUG*")
 	(goto-char (point-max))
 	(insert (symbol-name tag) " -> " (apply 'format args) "\n")
 	(if (numberp url-debug)
@@ -173,7 +175,7 @@
 ;;;###autoload
 (defun url-lazy-message (&rest args)
   "Just like `message', but is a no-op if called more than once a second.
-Will not do anything if url-show-status is nil."
+Will not do anything if `url-show-status' is nil."
   (if (or (null url-show-status)
 	  (active-minibuffer-window)
 	  (= url-lazy-message-time
@@ -502,4 +504,5 @@
 
 (provide 'url-util)
 
-;;; arch-tag: 24352abc-5a5a-412e-90cd-313b26bed5c9
+;; arch-tag: 24352abc-5a5a-412e-90cd-313b26bed5c9
+;;; url-util.el ends here
--- a/lisp/xml.el	Sun Apr 18 01:34:11 2004 +0000
+++ b/lisp/xml.el	Sun Apr 18 01:40:02 2004 +0000
@@ -27,13 +27,13 @@
 
 ;; This file contains a somewhat incomplete non-validating XML parser.  It
 ;; parses a file, and returns a list that can be used internally by
-;; any other lisp libraries.
+;; any other Lisp libraries.
 
 ;;; FILE FORMAT
 
 ;; The document type declaration may either be ignored or (optionally)
 ;; parsed, but currently the parsing will only accept element
-;; declarations.  The XML file is assumed to be well-formed. In case
+;; declarations.  The XML file is assumed to be well-formed.  In case
 ;; of error, the parsing stops and the XML file is shown where the
 ;; parsing stopped.
 ;;
@@ -44,7 +44,7 @@
 ;;       <node2 attr3="name3" attr4="name4">value2</node2>
 ;;       <node3 attr5="name5" attr6="name6">value3</node3>
 ;;    </node1>
-;; Of course, the name of the nodes and attributes can be anything. There can
+;; Of course, the name of the nodes and attributes can be anything.  There can
 ;; be any number of attributes (or none), as well as any number of children
 ;; below the nodes.
 ;;
@@ -86,7 +86,18 @@
 
 (defsubst xml-node-name (node)
   "Return the tag associated with NODE.
-The tag is a lower-case symbol."
+Without namespace-aware parsing, the tag is a symbol.
+
+With namespace-aware parsing, the tag is a cons of a string
+representing the uri of the namespace with the local name of the
+tag.  For example,
+
+    <foo>
+
+would be represented by
+
+    '(\"\" . \"foo\")."
+
   (car node))
 
 (defsubst xml-node-attributes (node)
@@ -101,17 +112,17 @@
 
 (defun xml-get-children (node child-name)
   "Return the children of NODE whose tag is CHILD-NAME.
-CHILD-NAME should be a lower case symbol."
+CHILD-NAME should match the value returned by `xml-node-name'."
   (let ((match ()))
     (dolist (child (xml-node-children node))
-      (if child
-	  (if (equal (xml-node-name child) child-name)
-	      (push child match))))
+      (if (and (listp child)
+               (equal (xml-node-name child) child-name))
+          (push child match)))
     (nreverse match)))
 
 (defun xml-get-attribute-or-nil (node attribute)
   "Get from NODE the value of ATTRIBUTE.
-Return `nil' if the attribute was not found.
+Return nil if the attribute was not found.
 
 See also `xml-get-attribute'."
   (cdr (assoc attribute (xml-node-attributes node))))
@@ -236,7 +247,8 @@
 	    (nreverse xml)))))))
 
 (defun xml-maybe-do-ns (name default xml-ns)
-  "Perform any namespace expansion.  NAME is the name to perform the expansion on.
+  "Perform any namespace expansion.
+NAME is the name to perform the expansion on.
 DEFAULT is the default namespace.  XML-NS is a cons of namespace
 names to uris.  When namespace-aware parsing is off, then XML-NS
 is nil.
@@ -325,10 +337,8 @@
 	      (push (cons (cdar attr) (intern (concat ":" (cdr attr))))
 		    xml-ns))))
 
-        ;; expand element names
-        (setq node-name (list (xml-maybe-do-ns node-name "" xml-ns)))
+        (setq children (list attrs (xml-maybe-do-ns node-name "" xml-ns)))
 
-        (setq children (list attrs node-name))
 	;; is this an empty element ?
 	(if (looking-at "/>")
 	(progn
@@ -383,8 +393,8 @@
       (error "XML: Invalid character")))))
 
 (defun xml-parse-attlist (&optional xml-ns)
-  "Return the attribute-list after point.  Leave point at the
-first non-blank character after the tag."
+  "Return the attribute-list after point.
+Leave point at the first non-blank character after the tag."
   (let ((attlist ())
 	end-pos name)
     (skip-syntax-forward " ")
@@ -575,7 +585,7 @@
 
 ;; Fixme:  Take declared entities from the DTD when they're available.
 (defun xml-substitute-entity (match)
-  "Subroutine of xml-substitute-special."
+  "Subroutine of `xml-substitute-special'."
   (save-match-data
     (let ((match1 (match-string 1 str)))
       (cond ((string= match1 "lt") "<")
--- a/lispref/ChangeLog	Sun Apr 18 01:34:11 2004 +0000
+++ b/lispref/ChangeLog	Sun Apr 18 01:40:02 2004 +0000
@@ -1,3 +1,7 @@
+2004-04-16  Luc Teirlinck  <teirllm@auburn.edu>
+
+	* sequences.texi: Various clarifications.
+
 2004-04-14  Luc Teirlinck  <teirllm@auburn.edu>
 
 	* buffers.texi (Read Only Buffers): Mention optional ARG to
--- a/lispref/keymaps.texi	Sun Apr 18 01:34:11 2004 +0000
+++ b/lispref/keymaps.texi	Sun Apr 18 01:40:02 2004 +0000
@@ -1864,7 +1864,7 @@
 @cindex menu separators
 
   A menu separator is a kind of menu item that doesn't display any
-text--instead, it divides the menu into subparts with a horizontal line.
+text---instead, it divides the menu into subparts with a horizontal line.
 A separator looks like this in the menu keymap:
 
 @example
--- a/lispref/lists.texi	Sun Apr 18 01:34:11 2004 +0000
+++ b/lispref/lists.texi	Sun Apr 18 01:40:02 2004 +0000
@@ -327,6 +327,7 @@
 @end example
 @end defmac
 
+@anchor{Definition of nth}
 @defun nth n list
 This function returns the @var{n}th element of @var{list}.  Elements
 are numbered starting with zero, so the @sc{car} of @var{list} is
@@ -391,6 +392,7 @@
 if @var{n} is bigger than @var{list}'s length.
 @end defun
 
+@anchor{Definition of safe-length}
 @defun safe-length list
 This function returns the length of @var{list}, with no risk
 of either an error or an infinite loop.
@@ -565,7 +567,7 @@
 @sc{cdr} of the last cons cell in the new list.  If the final argument
 is itself a list, then its elements become in effect elements of the
 result list.  If the final element is not a list, the result is a
-``dotted list'' since its final @sc{cdr} is not @code{nil} as required
+dotted list since its final @sc{cdr} is not @code{nil} as required
 in a true list.
 
 In Emacs 20 and before, the @code{append} function also allowed
@@ -708,7 +710,7 @@
 @end defun
 
 @defun copy-tree tree &optional vecp
-This function returns a copy the tree @code{tree}.  If @var{tree} is a
+This function returns a copy of the tree @code{tree}.  If @var{tree} is a
 cons cell, this makes a new cons cell with the same @sc{car} and
 @sc{cdr}, then recursively copies the @sc{car} and @sc{cdr} in the
 same way.
@@ -732,7 +734,7 @@
 floating point arguments can be tricky, because floating point
 arithmetic is inexact.  For instance, depending on the machine, it may
 quite well happen that @code{(number-sequence 0.4 0.6 0.2)} returns
-the one element list @code{(0.4)}, whereas 
+the one element list @code{(0.4)}, whereas
 @code{(number-sequence 0.4 0.8 0.2)} returns a list with three
 elements.  The @var{n}th element of the list is computed by the exact
 formula @code{(+ @var{from} (* @var{n} @var{separation}))}.  Thus, if
--- a/lispref/processes.texi	Sun Apr 18 01:34:11 2004 +0000
+++ b/lispref/processes.texi	Sun Apr 18 01:40:02 2004 +0000
@@ -933,7 +933,7 @@
 streams of the subprocess, because Emacs normally spawns the subprocess
 inside a pseudo-TTY, and a pseudo-TTY has only one output channel.  If
 you want to keep the output to those streams separate, you should
-redirect one of them to a file--for example, by using an appropriate
+redirect one of them to a file---for example, by using an appropriate
 shell command.
 
 @menu
--- a/lispref/sequences.texi	Sun Apr 18 01:34:11 2004 +0000
+++ b/lispref/sequences.texi	Sun Apr 18 01:40:02 2004 +0000
@@ -69,8 +69,8 @@
 sequence.
 
 @defun sequencep object
-Returns @code{t} if @var{object} is a list, vector,
-string, bool-vector, or char-table, @code{nil} otherwise.
+Returns @code{t} if @var{object} is a list, vector, string,
+bool-vector, or char-table, @code{nil} otherwise.
 @end defun
 
 @defun length sequence
@@ -80,12 +80,12 @@
 @cindex sequence length
 @cindex char-table length
 This function returns the number of elements in @var{sequence}.  If
-@var{sequence} is a cons cell that is not a list (because the final
-@sc{cdr} is not @code{nil}), a @code{wrong-type-argument} error is
-signaled.  For a char-table, the value returned is always one more
-than the maximum Emacs character code.
+@var{sequence} is a dotted list, a @code{wrong-type-argument} error is
+signaled.  Circular lists may cause an infinite loop.  For a
+char-table, the value returned is always one more than the maximum
+Emacs character code.
 
-@xref{List Elements}, for the related function @code{safe-length}.
+@xref{Definition of safe-length}, for the related function @code{safe-length}.
 
 @example
 @group
@@ -121,10 +121,11 @@
 @defun elt sequence index
 @cindex elements of sequences
 This function returns the element of @var{sequence} indexed by
-@var{index}.  Legitimate values of @var{index} are integers ranging from
-0 up to one less than the length of @var{sequence}.  If @var{sequence}
-is a list, then out-of-range values of @var{index} return @code{nil};
-otherwise, they trigger an @code{args-out-of-range} error.
+@var{index}.  Legitimate values of @var{index} are integers ranging
+from 0 up to one less than the length of @var{sequence}.  If
+@var{sequence} is a list, out-of-range values behave as for
+@code{nth}.  @xref{Definition of nth}.  Otherwise, out-of-range values
+trigger an @code{args-out-of-range} error.
 
 @example
 @group
@@ -151,7 +152,7 @@
 @end example
 
 This function generalizes @code{aref} (@pxref{Array Functions}) and
-@code{nth} (@pxref{List Elements}).
+@code{nth} (@pxref{Definition of nth}).
 @end defun
 
 @defun copy-sequence sequence
@@ -171,6 +172,9 @@
 list.  However, the actual values of the properties are shared.
 @xref{Text Properties}.
 
+This function does not work for dotted lists.  Trying to copy a
+circular list may cause an infinite loop.
+
 See also @code{append} in @ref{Building Lists}, @code{concat} in
 @ref{Creating Strings}, and @code{vconcat} in @ref{Vector Functions},
 for other ways to copy sequences.
@@ -472,9 +476,9 @@
 @defun vconcat &rest sequences
 @cindex copying vectors
 This function returns a new vector containing all the elements of the
-@var{sequences}.  The arguments @var{sequences} may be any kind of
-arrays, including lists, vectors, or strings.  If no @var{sequences} are
-given, an empty vector is returned.
+@var{sequences}.  The arguments @var{sequences} may be true lists,
+vectors, strings or bool-vectors.  If no @var{sequences} are given, an
+empty vector is returned.
 
 The value is a newly constructed vector that is not @code{eq} to any
 existing vector.
--- a/lispref/text.texi	Sun Apr 18 01:34:11 2004 +0000
+++ b/lispref/text.texi	Sun Apr 18 01:40:02 2004 +0000
@@ -3875,7 +3875,7 @@
 If an error (or other nonlocal exit) occurs inside the body of
 @code{atomic-change-group}, it unmakes all the changes in that buffer
 that were during the execution of the body.  This kind of change group
-has no effect on any other buffers--any such changes remain.
+has no effect on any other buffers---any such changes remain.
 
   If you need something more sophisticated, such as to make changes in
 various buffers constitute one atomic group, you must directly call
--- a/src/ChangeLog	Sun Apr 18 01:34:11 2004 +0000
+++ b/src/ChangeLog	Sun Apr 18 01:40:02 2004 +0000
@@ -1,3 +1,39 @@
+2004-04-16  Luc Teirlinck  <teirllm@auburn.edu>
+
+	* buffer.c (Fbuffer_base_buffer): Doc fix.
+
+2004-04-17  Kim F. Storm  <storm@cua.dk>
+
+	* keymap.c (Fkey_description): Add optional PREFIX arg.
+	Combine prefix with KEYS to make up the full key sequence to describe.
+	Correlate meta_prefix_char and following (simple) key to describe
+	as meta modifier.  All callers changed.
+	(describe_map): Rename arg `keys' to `prefix'.  Remove local
+	`elt_prefix' var.  Use Fkey_description with prefix instead of
+	elt_prefix combined with Fsingle_key_description.
+	(describe_vector): Declare static.  Replace arg `elt_prefix' with
+	`prefix'.  Add KEYMAP_P arg.  Add local var `elt_prefix'; use it
+	if !KEYMAP_P. Use Fkey_description with prefix instead of
+	Fsingle_key_description.
+
+	* keymap.h (Fkey_description): Fix prototype.
+	(describe_vector): Remove prototype.
+
+	* xdisp.c (update_overlay_arrows): Fix handling of up_to_date < 0.
+
+	* image.c (PNG_BG_COLOR_SHIFT): Remove.
+	(png_load): Fix calculation of transparent background color on X
+	and W32 platforms.
+
+2004-04-16  Juanma Barranquero  <lektu@terra.es>
+
+	* xdisp.c (try_scrolling): Make sure `scroll-conservatively' is
+	not too large before computing how much to scroll.
+
+2004-04-15  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* dired.c (Ffile_attributes): Don't pass extra nil arg to file-handler.
+
 2004-04-14  Luc Teirlinck  <teirllm@auburn.edu>
 
 	* fileio.c (Fverify_visited_file_modtime, Fvisited_file_modtime):
@@ -30,6 +66,11 @@
 	centering_position = 0.
 	Clear desired matrix before retrying with centering_position = 0.
 
+2004-04-13  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* syntax.c (scan_lists): Simplify backward string scan.
+	Fix off-by-one boundary check for string and comment fences.
+
 2004-04-13  Joe Buehler  <jbuehler@hekimian.com>
 
 	* sheap.c, unexcw.c: New files.
--- a/src/buffer.c	Sun Apr 18 01:34:11 2004 +0000
+++ b/src/buffer.c	Sun Apr 18 01:40:02 2004 +0000
@@ -832,7 +832,8 @@
 DEFUN ("buffer-base-buffer", Fbuffer_base_buffer, Sbuffer_base_buffer,
        0, 1, 0,
        doc: /* Return the base buffer of indirect buffer BUFFER.
-If BUFFER is not indirect, return nil.  */)
+If BUFFER is not indirect, return nil.
+BUFFER defaults to the current buffer.  */)
      (buffer)
      register Lisp_Object buffer;
 {
--- a/src/callint.c	Sun Apr 18 01:34:11 2004 +0000
+++ b/src/callint.c	Sun Apr 18 01:40:02 2004 +0000
@@ -612,7 +612,7 @@
 					  Qnil, Qnil, Qnil, Qnil);
 	    unbind_to (speccount1, Qnil);
 	    teml = args[i];
-	    visargs[i] = Fkey_description (teml);
+	    visargs[i] = Fkey_description (teml, Qnil);
 
 	    /* If the key sequence ends with a down-event,
 	       discard the following up-event.  */
@@ -639,7 +639,7 @@
 	    args[i] = Fread_key_sequence (build_string (callint_message),
 					  Qnil, Qt, Qnil, Qnil);
 	    teml = args[i];
-	    visargs[i] = Fkey_description (teml);
+	    visargs[i] = Fkey_description (teml, Qnil);
 	    unbind_to (speccount1, Qnil);
 
 	    /* If the key sequence ends with a down-event,
--- a/src/doc.c	Sun Apr 18 01:34:11 2004 +0000
+++ b/src/doc.c	Sun Apr 18 01:40:02 2004 +0000
@@ -808,7 +808,7 @@
 	    }
 	  else
 	    {			/* function is on a key */
-	      tem = Fkey_description (tem);
+	      tem = Fkey_description (tem, Qnil);
 	      goto subst_string;
 	    }
 	}
--- a/src/image.c	Sun Apr 18 01:34:11 2004 +0000
+++ b/src/image.c	Sun Apr 18 01:40:02 2004 +0000
@@ -51,7 +51,6 @@
 typedef struct x_bitmap_record Bitmap_Record;
 #define GET_PIXEL(ximg, x, y) XGetPixel(ximg, x, y)
 #define NO_PIXMAP None
-#define PNG_BG_COLOR_SHIFT 0
 
 #define RGB_PIXEL_COLOR unsigned long
 
@@ -69,7 +68,6 @@
 typedef struct w32_bitmap_record Bitmap_Record;
 #define GET_PIXEL(ximg, x, y) GetPixel(ximg, x, y)
 #define NO_PIXMAP 0
-#define PNG_BG_COLOR_SHIFT 0
 
 #define RGB_PIXEL_COLOR COLORREF
 
@@ -104,7 +102,6 @@
 
 #define GET_PIXEL(ximg, x, y) XGetPixel(ximg, x, y)
 #define NO_PIXMAP 0
-#define PNG_BG_COLOR_SHIFT 8
 
 #define RGB_PIXEL_COLOR unsigned long
 
@@ -1172,7 +1169,7 @@
 /* Return the `background' field of IMG.  If IMG doesn't have one yet,
    it is guessed heuristically.  If non-zero, XIMG is an existing
    XImage object (or device context with the image selected on W32) to
-   use for the heuristic.  */ 
+   use for the heuristic.  */
 
 RGB_PIXEL_COLOR
 image_background (img, f, ximg)
@@ -1205,7 +1202,7 @@
 
       if (free_ximg)
 	Destroy_Image (ximg, prev);
-      
+
       img->background_valid = 1;
     }
 
@@ -2990,7 +2987,7 @@
 	  non_default_colors = 1;
 	}
 
-      Create_Pixmap_From_Bitmap_Data (f, img, data, 
+      Create_Pixmap_From_Bitmap_Data (f, img, data,
 				      foreground, background,
 				      non_default_colors);
       xfree (data);
@@ -3857,7 +3854,7 @@
       /* Assemble the pixel color.  */
       return pr | pg | pb;
     }
-  
+
   for (p = ct_table[i]; p; p = p->next)
     if (p->r == r && p->g == g && p->b == b)
       break;
@@ -4968,7 +4965,7 @@
   x_destroy_x_image (ximg);
 
   /* X and W32 versions did it here, MAC version above.  ++kfs
-     img->width = width;   
+     img->width = width;
      img->height = height; */
 
   UNGCPRO;
@@ -5412,9 +5409,9 @@
 	      png_color_16 user_bg;
 
 	      bzero (&user_bg, sizeof user_bg);
-	      user_bg.red = color.red >> PNG_BG_COLOR_SHIFT;
-	      user_bg.green = color.green >> PNG_BG_COLOR_SHIFT;
-	      user_bg.blue = color.blue >> PNG_BG_COLOR_SHIFT;
+	      user_bg.red = color.red >> 8;
+	      user_bg.green = color.green >> 8;
+	      user_bg.blue = color.blue >> 8;
 
 	      fn_png_set_background (png_ptr, &user_bg,
 				     PNG_BACKGROUND_GAMMA_SCREEN, 0, 1.0);
@@ -5438,9 +5435,9 @@
 	  x_query_color (f, &color);
 
 	  bzero (&frame_background, sizeof frame_background);
-	  frame_background.red = color.red;
-	  frame_background.green = color.green;
-	  frame_background.blue = color.blue;
+	  frame_background.red = color.red >> 8;
+	  frame_background.green = color.green >> 8;
+	  frame_background.blue = color.blue >> 8;
 #endif /* HAVE_X_WINDOWS */
 
 #ifdef HAVE_NTGUI
@@ -5451,9 +5448,9 @@
 	  x_query_color (f, &color);
 #endif
 	  bzero (&frame_background, sizeof frame_background);
-	  frame_background.red = 256 * GetRValue (color);
-	  frame_background.green = 256 * GetGValue (color);
-	  frame_background.blue = 256 * GetBValue (color);
+	  frame_background.red = GetRValue (color);
+	  frame_background.green = GetGValue (color);
+	  frame_background.blue = GetBValue (color);
 #endif /* HAVE_NTGUI */
 
 #ifdef MAC_OS
--- a/src/keyboard.c	Sun Apr 18 01:34:11 2004 +0000
+++ b/src/keyboard.c	Sun Apr 18 01:40:02 2004 +0000
@@ -7479,7 +7479,7 @@
       newcache = chkcache;
       if (chkcache)
 	{
-	  tem = Fkey_description (tem);
+	  tem = Fkey_description (tem, Qnil);
 	  if (CONSP (prefix))
 	    {
 	      if (STRINGP (XCAR (prefix)))
@@ -9878,7 +9878,7 @@
 	  int count = SPECPDL_INDEX ();
 
 	  record_unwind_protect (pop_message_unwind, Qnil);
-	  binding = Fkey_description (bindings);
+	  binding = Fkey_description (bindings, Qnil);
 
 	  newmessage
 	    = (char *) alloca (SCHARS (SYMBOL_NAME (function))
--- a/src/keymap.c	Sun Apr 18 01:34:11 2004 +0000
+++ b/src/keymap.c	Sun Apr 18 01:40:02 2004 +0000
@@ -122,6 +122,9 @@
 static void describe_map P_ ((Lisp_Object, Lisp_Object,
 			      void (*) P_ ((Lisp_Object, Lisp_Object)),
 			      int, Lisp_Object, Lisp_Object*, int));
+static void describe_vector P_ ((Lisp_Object, Lisp_Object, Lisp_Object,
+				 void (*) (Lisp_Object, Lisp_Object), int,
+				 Lisp_Object, Lisp_Object, int *, int, int));
 static void silly_event_symbol_error P_ ((Lisp_Object));
 
 /* Keymap object support - constructors and predicates.			*/
@@ -688,7 +691,7 @@
        tail = XCDR (tail))
     {
       Lisp_Object binding = XCAR (tail);
-      
+
       if (CONSP (binding))
 	map_keymap_item (fun, args, XCAR (binding), XCDR (binding), data);
       else if (VECTORP (binding))
@@ -1161,7 +1164,7 @@
 	/* We must use Fkey_description rather than just passing key to
 	   error; key might be a vector, not a string.  */
 	error ("Key sequence %s uses invalid prefix characters",
-	       SDATA (Fkey_description (key)));
+	       SDATA (Fkey_description (key, Qnil)));
     }
 }
 
@@ -1792,9 +1795,9 @@
       int meta_bit = meta_modifier;
       Lisp_Object last = make_number (XINT (Flength (thisseq)) - 1);
       tem = Fcopy_sequence (thisseq);
-      
+
       Faset (tem, last, make_number (XINT (key) | meta_bit));
-      
+
       /* This new sequence is the same length as
 	 thisseq, so stick it in the list right
 	 after this one.  */
@@ -1945,78 +1948,109 @@
 
 /* This function cannot GC.  */
 
-DEFUN ("key-description", Fkey_description, Skey_description, 1, 1, 0,
+DEFUN ("key-description", Fkey_description, Skey_description, 1, 2, 0,
        doc: /* Return a pretty description of key-sequence KEYS.
+Optional arg PREFIX is the sequence of keys leading up to KEYS.
 Control characters turn into "C-foo" sequences, meta into "M-foo"
 spaces are put between sequence elements, etc.  */)
-     (keys)
-     Lisp_Object keys;
+  (keys, prefix)
+     Lisp_Object keys, prefix;
 {
   int len = 0;
   int i, i_byte;
-  Lisp_Object sep;
-  Lisp_Object *args = NULL;
-
-  if (STRINGP (keys))
+  Lisp_Object *args;
+  int size = Flength (keys);
+  Lisp_Object list;
+  Lisp_Object sep = build_string (" ");
+  Lisp_Object key;
+  int add_meta = 0;
+
+  if (!NILP (prefix))
+    size += Flength (prefix);
+
+  /* This has one extra element at the end that we don't pass to Fconcat.  */
+  args = (Lisp_Object *) alloca (size * 4 * sizeof (Lisp_Object));
+
+  /* In effect, this computes
+     (mapconcat 'single-key-description keys " ")
+     but we shouldn't use mapconcat because it can do GC.  */
+
+ next_list:
+  if (!NILP (prefix))
+    list = prefix, prefix = Qnil;
+  else if (!NILP (keys))
+    list = keys, keys = Qnil;
+  else
     {
-      Lisp_Object vector;
-      vector = Fmake_vector (Flength (keys), Qnil);
-      for (i = 0, i_byte = 0; i < SCHARS (keys); )
+      if (add_meta)
+	{
+	  args[len] = Fsingle_key_description (meta_prefix_char, Qnil);
+	  len += 2;
+	}
+      else if (len == 0)
+	return empty_string;
+      return Fconcat (len - 1, args);
+    }
+
+  if (STRINGP (list))
+    size = SCHARS (list);
+  else if (VECTORP (list))
+    size = XVECTOR (list)->size;
+  else if (CONSP (list))
+    size = Flength (list);
+  else
+    wrong_type_argument (Qarrayp, list);
+
+  i = i_byte = 0;
+
+  while (i < size)
+    {
+      if (STRINGP (list))
 	{
 	  int c;
-	  int i_before = i;
-
-	  FETCH_STRING_CHAR_ADVANCE (c, keys, i, i_byte);
+	  FETCH_STRING_CHAR_ADVANCE (c, list, i, i_byte);
 	  if (SINGLE_BYTE_CHAR_P (c) && (c & 0200))
 	    c ^= 0200 | meta_modifier;
-	  XSETFASTINT (AREF (vector, i_before), c);
+	  XSETFASTINT (key, c);
+	}
+      else if (VECTORP (list))
+	{
+	  key = AREF (list, i++);
+	}
+      else
+	{
+	  key = XCAR (list);
+	  list = XCDR (list);
+	  i++;
 	}
-      keys = vector;
-    }
-
-  if (VECTORP (keys))
-    {
-      /* In effect, this computes
-	 (mapconcat 'single-key-description keys " ")
-	 but we shouldn't use mapconcat because it can do GC.  */
-
-      len = XVECTOR (keys)->size;
-      sep = build_string (" ");
-      /* This has one extra element at the end that we don't pass to Fconcat.  */
-      args = (Lisp_Object *) alloca (len * 2 * sizeof (Lisp_Object));
-
-      for (i = 0; i < len; i++)
+
+      if (add_meta)
 	{
-	  args[i * 2] = Fsingle_key_description (AREF (keys, i), Qnil);
-	  args[i * 2 + 1] = sep;
+	  if (!INTEGERP (key)
+	      || EQ (key, meta_prefix_char)
+	      || (XINT (key) & meta_modifier))
+	    {
+	      args[len++] = Fsingle_key_description (meta_prefix_char, Qnil);
+	      args[len++] = sep;
+	      if (EQ (key, meta_prefix_char))
+		continue;
+	    }
+	  else
+	    XSETINT (key, (XINT (key) | meta_modifier) & ~0x80);
+	  add_meta = 0;
 	}
+      else if (EQ (key, meta_prefix_char))
+	{
+	  add_meta = 1;
+	  continue;
+	}
+      args[len++] = Fsingle_key_description (key, Qnil);
+      args[len++] = sep;
     }
-  else if (CONSP (keys))
-    {
-      /* In effect, this computes
-	 (mapconcat 'single-key-description keys " ")
-	 but we shouldn't use mapconcat because it can do GC.  */
-
-      len = XFASTINT (Flength (keys));
-      sep = build_string (" ");
-      /* This has one extra element at the end that we don't pass to Fconcat.  */
-      args = (Lisp_Object *) alloca (len * 2 * sizeof (Lisp_Object));
-
-      for (i = 0; i < len; i++)
-	{
-	  args[i * 2] = Fsingle_key_description (XCAR (keys), Qnil);
-	  args[i * 2 + 1] = sep;
-	  keys = XCDR (keys);
-	}
-    }
-  else
-    keys = wrong_type_argument (Qarrayp, keys);
-
-  if (len == 0)
-    return empty_string;
-  return Fconcat (len * 2 - 1, args);
+  goto next_list;
 }
 
+
 char *
 push_key_description (c, p, force_multibyte)
      register unsigned int c;
@@ -2938,7 +2972,7 @@
 	  if (!NILP (prefix))
 	    {
 	      insert_string (" Starting With ");
-	      insert1 (Fkey_description (prefix));
+	      insert1 (Fkey_description (prefix, Qnil));
 	    }
 	  insert_string (":\n");
 	}
@@ -3063,7 +3097,7 @@
     }
   else if (STRINGP (definition) || VECTORP (definition))
     {
-      insert1 (Fkey_description (definition));
+      insert1 (Fkey_description (definition, Qnil));
       insert_string ("\n");
     }
   else if (KEYMAPP (definition))
@@ -3073,20 +3107,19 @@
 }
 
 /* Describe the contents of map MAP, assuming that this map itself is
-   reached by the sequence of prefix keys KEYS (a string or vector).
+   reached by the sequence of prefix keys PREFIX (a string or vector).
    PARTIAL, SHADOW, NOMENU are as in `describe_map_tree' above.  */
 
 static void
-describe_map (map, keys, elt_describer, partial, shadow, seen, nomenu)
+describe_map (map, prefix, elt_describer, partial, shadow, seen, nomenu)
      register Lisp_Object map;
-     Lisp_Object keys;
+     Lisp_Object prefix;
      void (*elt_describer) P_ ((Lisp_Object, Lisp_Object));
      int partial;
      Lisp_Object shadow;
      Lisp_Object *seen;
      int nomenu;
 {
-  Lisp_Object elt_prefix;
   Lisp_Object tail, definition, event;
   Lisp_Object tem;
   Lisp_Object suppress;
@@ -3096,15 +3129,6 @@
 
   suppress = Qnil;
 
-  if (!NILP (keys) && XFASTINT (Flength (keys)) > 0)
-    {
-      /* Call Fkey_description first, to avoid GC bug for the other string.  */
-      tem = Fkey_description (keys);
-      elt_prefix = concat2 (tem, build_string (" "));
-    }
-  else
-    elt_prefix = Qnil;
-
   if (partial)
     suppress = intern ("suppress-keymap");
 
@@ -3114,7 +3138,7 @@
   kludge = Fmake_vector (make_number (1), Qnil);
   definition = Qnil;
 
-  GCPRO3 (elt_prefix, definition, kludge);
+  GCPRO3 (prefix, definition, kludge);
 
   for (tail = map; CONSP (tail); tail = XCDR (tail))
     {
@@ -3123,13 +3147,13 @@
       if (VECTORP (XCAR (tail))
 	  || CHAR_TABLE_P (XCAR (tail)))
 	describe_vector (XCAR (tail),
-			 elt_prefix, Qnil, elt_describer, partial, shadow, map,
-			 (int *)0, 0);
+			 prefix, Qnil, elt_describer, partial, shadow, map,
+			 (int *)0, 0, 1);
       else if (CONSP (XCAR (tail)))
 	{
 	  event = XCAR (XCAR (tail));
 
-	  /* Ignore bindings whose "keys" are not really valid events.
+	  /* Ignore bindings whose "prefix" are not really valid events.
 	     (We get these in the frames and buffers menu.)  */
 	  if (!(SYMBOLP (event) || INTEGERP (event)))
 	    continue;
@@ -3168,11 +3192,8 @@
 	      first = 0;
 	    }
 
-	  if (!NILP (elt_prefix))
-	    insert1 (elt_prefix);
-
 	  /* THIS gets the string to describe the character EVENT.  */
-	  insert1 (Fsingle_key_description (event, Qnil));
+	  insert1 (Fkey_description (kludge, prefix));
 
 	  /* Print a description of the definition of this character.
 	     elt_describer will take care of spacing out far enough
@@ -3185,9 +3206,9 @@
 	     using an inherited keymap.  So skip anything we've already
 	     encountered.  */
 	  tem = Fassq (tail, *seen);
-	  if (CONSP (tem) && !NILP (Fequal (XCAR (tem), keys)))
+	  if (CONSP (tem) && !NILP (Fequal (XCAR (tem), prefix)))
 	    break;
-	  *seen = Fcons (Fcons (tail, keys), *seen);
+	  *seen = Fcons (Fcons (tail, prefix), *seen);
 	}
     }
 
@@ -3215,7 +3236,7 @@
   specbind (Qstandard_output, Fcurrent_buffer ());
   CHECK_VECTOR_OR_CHAR_TABLE (vector);
   describe_vector (vector, Qnil, describer, describe_vector_princ, 0,
-		   Qnil, Qnil, (int *)0, 0);
+		   Qnil, Qnil, (int *)0, 0, 0);
 
   return unbind_to (count, Qnil);
 }
@@ -3250,28 +3271,32 @@
    indices at higher levels in this char-table,
    and CHAR_TABLE_DEPTH says how many levels down we have gone.
 
+   KEYMAP_P is 1 if vector is known to be a keymap, so map ESC to M-.
+
    ARGS is simply passed as the second argument to ELT_DESCRIBER.  */
 
-void
-describe_vector (vector, elt_prefix, args, elt_describer,
+static void
+describe_vector (vector, prefix, args, elt_describer,
 		 partial, shadow, entire_map,
-		 indices, char_table_depth)
+		 indices, char_table_depth, keymap_p)
      register Lisp_Object vector;
-     Lisp_Object elt_prefix, args;
+     Lisp_Object prefix, args;
      void (*elt_describer) P_ ((Lisp_Object, Lisp_Object));
      int partial;
      Lisp_Object shadow;
      Lisp_Object entire_map;
      int *indices;
      int char_table_depth;
+     int keymap_p;
 {
   Lisp_Object definition;
   Lisp_Object tem2;
+  Lisp_Object elt_prefix = Qnil;
   register int i;
   Lisp_Object suppress;
   Lisp_Object kludge;
   int first = 1;
-  struct gcpro gcpro1, gcpro2, gcpro3;
+  struct gcpro gcpro1, gcpro2, gcpro3, gcpro4;
   /* Range of elements to be handled.  */
   int from, to;
   /* A flag to tell if a leaf in this level of char-table is not a
@@ -3287,11 +3312,23 @@
 
   definition = Qnil;
 
+  if (!keymap_p)
+    {
+      /* Call Fkey_description first, to avoid GC bug for the other string.  */
+      if (!NILP (prefix) && XFASTINT (Flength (prefix)) > 0)
+	{
+	  Lisp_Object tem;
+	  tem = Fkey_description (prefix, Qnil);
+	  elt_prefix = concat2 (tem, build_string (" "));
+	}
+      prefix = Qnil;
+    }
+
   /* This vector gets used to present single keys to Flookup_key.  Since
      that is done once per vector element, we don't want to cons up a
      fresh vector every time.  */
   kludge = Fmake_vector (make_number (1), Qnil);
-  GCPRO3 (elt_prefix, definition, kludge);
+  GCPRO4 (elt_prefix, prefix, definition, kludge);
 
   if (partial)
     suppress = intern ("suppress-keymap");
@@ -3384,12 +3421,13 @@
       else
 	character = i;
 
+      ASET (kludge, 0, make_number (character));
+
       /* If this binding is shadowed by some other map, ignore it.  */
       if (!NILP (shadow) && complete_char)
 	{
 	  Lisp_Object tem;
 
-	  ASET (kludge, 0, make_number (character));
 	  tem = shadow_lookup (shadow, kludge, Qt);
 
 	  if (!NILP (tem)) continue;
@@ -3401,7 +3439,6 @@
 	{
 	  Lisp_Object tem;
 
-	  ASET (kludge, 0, make_number (character));
 	  tem = Flookup_key (entire_map, kludge, Qt);
 
 	  if (!EQ (tem, definition))
@@ -3442,7 +3479,7 @@
       else if (CHAR_TABLE_P (vector))
 	{
 	  if (complete_char)
-	    insert1 (Fsingle_key_description (make_number (character), Qnil));
+	    insert1 (Fkey_description (kludge, prefix));
 	  else
 	    {
 	      /* Print the information for this character set.  */
@@ -3458,7 +3495,7 @@
 	}
       else
 	{
-	  insert1 (Fsingle_key_description (make_number (character), Qnil));
+	  insert1 (Fkey_description (kludge, prefix));
 	}
 
       /* If we find a sub char-table within a char-table,
@@ -3467,9 +3504,9 @@
       if (CHAR_TABLE_P (vector) && SUB_CHAR_TABLE_P (definition))
 	{
 	  insert ("\n", 1);
-	  describe_vector (definition, elt_prefix, args, elt_describer,
+	  describe_vector (definition, prefix, args, elt_describer,
 			   partial, shadow, entire_map,
-			   indices, char_table_depth + 1);
+			   indices, char_table_depth + 1, keymap_p);
 	  continue;
 	}
 
@@ -3507,6 +3544,8 @@
 	{
 	  insert (" .. ", 4);
 
+	  ASET (kludge, 0, make_number (i));
+
 	  if (!NILP (elt_prefix))
 	    insert1 (elt_prefix);
 
@@ -3514,7 +3553,7 @@
 	    {
 	      if (char_table_depth == 0)
 		{
-		  insert1 (Fsingle_key_description (make_number (i), Qnil));
+		  insert1 (Fkey_description (kludge, prefix));
 		}
 	      else if (complete_char)
 		{
@@ -3533,7 +3572,7 @@
 	    }
 	  else
 	    {
-	      insert1 (Fsingle_key_description (make_number (i), Qnil));
+	      insert1 (Fkey_description (kludge, prefix));
 	    }
 	}
 
--- a/src/keymap.h	Sun Apr 18 01:34:11 2004 +0000
+++ b/src/keymap.h	Sun Apr 18 01:40:02 2004 +0000
@@ -30,15 +30,12 @@
 EXFUN (Flookup_key, 3);
 EXFUN (Fcommand_remapping, 1);
 EXFUN (Fkey_binding, 3);
-EXFUN (Fkey_description, 1);
+EXFUN (Fkey_description, 2);
 EXFUN (Fsingle_key_description, 2);
 EXFUN (Fwhere_is_internal, 5);
 extern Lisp_Object access_keymap P_ ((Lisp_Object, Lisp_Object, int, int, int));
 extern Lisp_Object get_keyelt P_ ((Lisp_Object, int));
 extern Lisp_Object get_keymap P_ ((Lisp_Object, int, int));
-extern void describe_vector P_ ((Lisp_Object, Lisp_Object, Lisp_Object,
-				 void (*) (Lisp_Object, Lisp_Object), int,
-				 Lisp_Object, Lisp_Object, int *, int));
 extern void describe_map_tree P_ ((Lisp_Object, int, Lisp_Object, Lisp_Object,
 				   char *, int, int, int));
 extern int current_minor_maps P_ ((Lisp_Object **, Lisp_Object **));
--- a/src/xdisp.c	Sun Apr 18 01:34:11 2004 +0000
+++ b/src/xdisp.c	Sun Apr 18 01:40:02 2004 +0000
@@ -9424,7 +9424,7 @@
       if (!SYMBOLP (var))
 	continue;
 
-      if (up_to_date)
+      if (up_to_date > 0)
 	{
 	  Lisp_Object val = find_symbol_value (var);
 	  Fput (var, Qlast_arrow_position,
@@ -10875,6 +10875,12 @@
   else
     this_scroll_margin = 0;
 
+  /* Force scroll_conservatively to have a reasonable value so it doesn't
+     cause an overflow while computing how much to scroll.  */
+  if (scroll_conservatively)
+    scroll_conservatively = min (scroll_conservatively,
+                                 MOST_POSITIVE_FIXNUM / FRAME_LINE_HEIGHT (f));
+
   /* Compute how much we should try to scroll maximally to bring point
      into view.  */
   if (scroll_step || scroll_conservatively || temp_scroll_step)