emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r102642: Merge from emacs-23


From: Stefan Monnier
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r102642: Merge from emacs-23
Date: Mon, 13 Dec 2010 10:27:36 -0500
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 102642 [merge]
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Mon 2010-12-13 10:27:36 -0500
message:
  Merge from emacs-23
modified:
  doc/emacs/ChangeLog
  doc/emacs/custom.texi
  doc/emacs/display.texi
  doc/emacs/emacs.texi
  doc/emacs/msdog.texi
  doc/emacs/search.texi
  doc/emacs/text.texi
  doc/emacs/trouble.texi
  doc/lispref/ChangeLog
  doc/lispref/backups.texi
  doc/lispref/display.texi
  doc/lispref/modes.texi
  doc/lispref/processes.texi
  doc/lispref/strings.texi
  doc/lispref/text.texi
  doc/misc/ChangeLog
  doc/misc/cl.texi
  etc/ChangeLog
  etc/schema/schemas.xml
  lisp/ChangeLog
  lisp/calendar/diary-lib.el
  lisp/comint.el
  lisp/cus-edit.el
  lisp/dired-aux.el
  lisp/dired.el
  lisp/files.el
  lisp/format.el
  lisp/frame.el
  lisp/ido.el
  lisp/image-dired.el
  lisp/mail/rmail.el
  lisp/mail/rmailmm.el
  lisp/mail/smtpmail.el
  lisp/mouse.el
  lisp/net/tramp-sh.el
  lisp/net/tramp.el
  lisp/ps-print.el
  lisp/subr.el
  lisp/url/ChangeLog
  lisp/url/url-cookie.el
  lisp/vc/diff-mode.el
  lisp/vc/log-edit.el
  src/ChangeLog
  src/buffer.c
  src/config.in
  src/dispextern.h
  src/fileio.c
  src/keyboard.c
  src/nsterm.m
  src/xdisp.c
  src/xsmfns.c
=== modified file 'doc/emacs/ChangeLog'
--- a/doc/emacs/ChangeLog       2010-11-27 20:04:57 +0000
+++ b/doc/emacs/ChangeLog       2010-12-13 15:27:36 +0000
@@ -1,3 +1,32 @@
+2010-12-13  Eli Zaretskii  <address@hidden>
+
+       * custom.texi (Init Syntax): Add index entries for "character syntax".
+       (Bug#7576)
+
+2010-12-13  Karel Klíč  <address@hidden>
+
+       * text.texi (HTML Mode): Small fixes.  (Bug#7607)
+
+2010-12-13  Glenn Morris  <address@hidden>
+
+       * trouble.texi (Checklist): Fix typo in newsgroup name.
+
+2010-12-13  Chong Yidong  <address@hidden>
+
+       * search.texi (Word Search): Note that the lazy highlight always
+       matches to whole words (Bug#7470).
+
+2010-12-13  Eli Zaretskii  <address@hidden>
+
+       * display.texi (Optional Mode Line): Make the description of
+       load-average more accurate.
+
+       * msdog.texi (Windows HOME): Mention that HOME can also be set in the
+       registry, with a cross-reference.
+       (Windows Startup): New node.  Move the stuff about the current
+       directory from "Windows HOME".
+
+2010-12-13  Bob Rogers  <address@hidden>
 2010-11-27  Bob Rogers  <address@hidden>
 
        * maintaining.texi (VC With A Locking VCS, VC Directory Commands):

=== modified file 'doc/emacs/custom.texi'
--- a/doc/emacs/custom.texi     2010-06-23 02:46:43 +0000
+++ b/doc/emacs/custom.texi     2010-12-11 09:11:32 +0000
@@ -2234,6 +2234,8 @@
 address@hidden in your init file.
 
 @item Characters:
address@hidden Lisp character syntax
address@hidden character syntax
 Lisp character constant syntax consists of a @samp{?} followed by
 either a character or an escape sequence starting with @samp{\}.
 Examples: @code{?x}, @code{?\n}, @code{?\"}, @code{?\)}.  Note that
@@ -2250,6 +2252,7 @@
 @code{nil} stands for `false'.
 
 @item Other Lisp objects:
address@hidden Lisp object syntax
 Write a single-quote (@code{'}) followed by the Lisp object you want.
 @end table
 

=== modified file 'doc/emacs/display.texi'
--- a/doc/emacs/display.texi    2010-11-13 13:29:31 +0000
+++ b/doc/emacs/display.texi    2010-12-13 15:27:36 +0000
@@ -1010,11 +1010,12 @@
 @noindent
 @vindex display-time-24hr-format
 Here @var{hh} and @var{mm} are the hour and minute, followed always by
address@hidden or @samp{pm}.  @var{l.ll} is the average number of running
-processes in the whole system recently.  (Some fields may be missing if
-your operating system cannot support them.)  If you prefer time display
-in 24-hour format, set the variable @code{display-time-24hr-format}
-to @code{t}.
address@hidden or @samp{pm}.  @var{l.ll} is the average number, collected
+for the last few minutes, of processes in the whole system that were
+either running or ready to run (i.e.@: were waiting for an available
+processor).  (Some fields may be missing if your operating system
+cannot support them.)  If you prefer time display in 24-hour format,
+set the variable @code{display-time-24hr-format} to @code{t}.
 
 @cindex mail (on mode line)
 @vindex display-time-use-mail-icon

=== modified file 'doc/emacs/emacs.texi'
--- a/doc/emacs/emacs.texi      2010-11-27 20:04:57 +0000
+++ b/doc/emacs/emacs.texi      2010-12-13 15:27:36 +0000
@@ -1192,6 +1192,7 @@
 
 Emacs and Microsoft Windows/MS-DOS
 
+* Windows Startup::     How to start Emacs on Windows.
 * Text and Binary::     Text files use CRLF to terminate lines.
 * Windows Files::       File-name conventions on Windows.
 * ls in Lisp::          Emulation of @code{ls} for Dired.

=== modified file 'doc/emacs/msdog.texi'
--- a/doc/emacs/msdog.texi      2010-11-11 08:41:30 +0000
+++ b/doc/emacs/msdog.texi      2010-12-13 15:27:36 +0000
@@ -28,6 +28,7 @@
 here.
 
 @menu
+* Windows Startup::     How to start Emacs on Windows.
 * Text and Binary::     Text files use CRLF to terminate lines.
 * Windows Files::       File-name conventions on Windows.
 * ls in Lisp::          Emulation of @code{ls} for Dired.
@@ -44,6 +45,68 @@
 @end ifnottex
 @end menu
 
address@hidden Windows Startup
address@hidden How to Start Emacs on MS-Windows
address@hidden starting Emacs on MS-Windows
+
+  There are several ways of starting Emacs on MS-Windows:
+
address@hidden
address@hidden
address@hidden runemacs.exe
address@hidden desktop shortcut, MS-Windows
address@hidden start directory, MS-Windows
address@hidden directory where Emacs starts on MS-Windows
+From the desktop shortcut icon: either double-click the left mouse
+button on the icon, or click once, then press @key{RET}.  The desktop
+shortcut should specify as its ``Target'' (in the ``Properties'' of
+the shortcut) the full absolute file name of @file{runemacs.exe},
address@hidden of @file{emacs.exe}.  This is because @file{runemacs.exe}
+hides the console window that would have been created if the target of
+the shortcut were @file{emacs.exe} (which is a console program, as far
+as Windows is concerned).  If you use this method, Emacs starts in the
+directory specified by the shortcut.  To control where that is,
+right-click on the shortcut, select ``Properties'', and in the
+``Shortcut'' tab modify the ``Start in'' field to your liking.
+
address@hidden
+From the Command Prompt window, by typing @kbd{emacs @key{RET}} at the
+prompt.  The Command Prompt window where you did that will not be
+available for invoking other commands until Emacs exits.  In this
+case, Emacs will start in the current directory of the Windows shell.
+
address@hidden
+From the Command Prompt window, by typing @kbd{runemacs @key{RET}} at
+the prompt.  The Command Prompt window where you did that will be
+immediately available for invoking other commands.  In this case,
+Emacs will start in the current directory of the Windows shell.
+
address@hidden
address@hidden invoking Emacs from Windows Explorer
address@hidden emacsclient.exe
address@hidden emacsclientw.exe
+Via the Emacs client program, @file{emacsclient.exe} or
address@hidden  This allows to invoke Emacs from other
+programs, and to reuse a running Emacs process for serving editing
+jobs required by other programs.  @xref{Emacs Server}.  The difference
+between @file{emacsclient.exe} and @file{emacsclientw.exe} is that the
+former waits for Emacs to signal that the editing job is finished,
+while the latter does not wait.  Which one of them to use in each case
+depends on the expectations of the program that needs editing
+services.  If the program will use the edited files, it needs to wait
+for Emacs, so you should use @file{emacsclient.exe}.  By contrast, if
+the results of editing are not needed by the invoking program, you
+will be better off using @file{emacsclientw.exe}.  A notable situation
+where you would want @file{emacsclientw.exe} is when you right-click
+on a file in the Windows Explorer and select ``Open With'' from the
+pop-up menu.  Use the @samp{--alternate-editor=} or @samp{-a} options
+if Emacs might not be running (or not running as a server) when
address@hidden is invoked---that will always give you an
+editor.  When invoked via @command{emacsclient}, Emacs will start in
+the current directory of the program that invoked
address@hidden
address@hidden enumerate
+
 @node Text and Binary
 @section Text Files and Binary Files
 @cindex text and binary files on MS-DOS/MS-Windows
@@ -342,6 +405,9 @@
 or @file{C:address@hidden Data} on the
 older Windows 9X/ME systems.
 
+  @code{HOME} can also be set in the system registry, for details see
address@hidden Registry}.
+
 @cindex init file @file{.emacs} on MS-Windows
   The home directory is where your init file @file{.emacs} is stored.
 When Emacs starts, it first checks whether the environment variable
@@ -373,13 +439,6 @@
 @file{_emacs} as a fallback, if such a file exists in the home
 directory, whereas @file{.emacs} does not.
 
address@hidden start directory, MS-Windows
address@hidden directory where Emacs starts on MS-Windows
-  If you use a Windows desktop shortcut to start Emacs, it starts in
-the directory specified by the shortcut.  To control where that is,
-right-click on the shortcut, select ``Properties'', and in the
-``Shortcut'' tab modify the ``Start in'' field to your liking.
-
 @node Windows Keyboard
 @section Keyboard Usage on MS-Windows
 @cindex keyboard, MS-Windows

=== modified file 'doc/emacs/search.texi'
--- a/doc/emacs/search.texi     2010-07-10 18:52:53 +0000
+++ b/doc/emacs/search.texi     2010-12-13 15:27:36 +0000
@@ -459,11 +459,13 @@
 These run the commands @code{word-search-forward} and
 @code{word-search-backward} respectively.
 
-  A nonincremental word search differs slightly from the incremental
-version in the way it finds a match: the last word in the search
-string must be an exact match for a whole word.  In an incremental
-word search, the last word in the search string can match part of a
-word; this allows the matching to proceed incrementally as you type.
+  Incremental and nonincremental word searches differ slightly in the
+way they find a match.  In a nonincremental word search, the last word
+in the search string must exactly match a whole word.  In an
+incremental word search, the matching is more lax: the last word in
+the search string can match part of a word, so that the matching
+proceeds incrementally as you type.  This additional laxity does not
+apply to the lazy highlight, which always matches whole words.
 
 @node Regexp Search
 @section Regular Expression Search

=== modified file 'doc/emacs/text.texi'
--- a/doc/emacs/text.texi       2010-06-23 02:46:43 +0000
+++ b/doc/emacs/text.texi       2010-12-11 02:37:16 +0000
@@ -1765,7 +1765,7 @@
 @kindex C-c C-n @r{(SGML mode)}
 @findex sgml-name-char
 Interactively specify a special character and insert the SGML
address@hidden&}-command for that character.
address@hidden&}-command for that character (@code{sgml-name-char}).
 
 @item C-c C-t
 @kindex C-c C-t @r{(SGML mode)}
@@ -1799,7 +1799,7 @@
 @findex sgml-skip-tag-backward
 Skip backward across a balanced tag group (which extends from an
 opening tag through its corresponding closing tag)
-(@code{sgml-skip-tag-forward}).  A numeric argument acts as a repeat
+(@code{sgml-skip-tag-backward}).  A numeric argument acts as a repeat
 count.
 
 @item C-c C-d
@@ -1841,7 +1841,7 @@
 @kindex C-c TAB @r{(SGML mode)}
 @findex sgml-tags-invisible
 Toggle the visibility of existing tags in the buffer.  This can be
-used as a cheap preview.
+used as a cheap preview (@code{sgml-tags-invisible}).
 @end table
 
 @cindex nXML mode

=== modified file 'doc/emacs/trouble.texi'
--- a/doc/emacs/trouble.texi    2010-09-12 00:31:47 +0000
+++ b/doc/emacs/trouble.texi    2010-12-10 03:33:51 +0000
@@ -629,7 +629,7 @@
 you can use.
 
 All mail sent to the @samp{bug-gnu-emacs} mailing list is also
-gatewayed to the @samp{bug.gnu.emacs} newsgroup.  The reverse is also
+gatewayed to the @samp{gnu.emacs.bug} newsgroup.  The reverse is also
 true, but we ask you not to post bug reports via the newsgroup.  It
 can make it much harder to contact you if we need to ask for more
 information, and it does not integrate well with the bug tracker.
@@ -1127,6 +1127,3 @@
 @lowersections
 @end ifnottex
 
address@hidden
-   arch-tag: c9cba76d-b2cb-4e0c-ae3f-19d5ef35817c
address@hidden ignore

=== modified file 'doc/lispref/ChangeLog'
--- a/doc/lispref/ChangeLog     2010-12-08 03:45:45 +0000
+++ b/doc/lispref/ChangeLog     2010-12-13 15:27:36 +0000
@@ -1,3 +1,36 @@
+2010-12-13  Eli Zaretskii  <address@hidden>
+
+       * processes.texi (Shell Arguments):
+       * strings.texi (Creating Strings): Don't mention "shell commands";
+       make it explicit that `split-string-and-unquote' and
+       `combine-and-quote-strings' are mainly for working with arguments
+       to call-process and start-process.
+
+       * processes.texi (Shell Arguments): Fix documentation of
+       `split-string-and-unquote'.  Add indexing.  (Bug#7563)
+
+2010-12-13  Stefan Monnier  <address@hidden>
+
+       * modes.texi (Auto-Indentation): New section to document SMIE.
+       (Major Mode Conventions):
+       * text.texi (Mode-Specific Indent): Refer to it.
+
+2010-12-13  Eli Zaretskii  <address@hidden>
+
+       * display.texi (Other Display Specs): Document left-fringe and
+       right-fringe display specs.
+
+2010-12-13  Stefan Monnier  <address@hidden>
+
+       * backups.texi (Making Backups):
+       * modes.texi (Example Major Modes): Use recommended coding style.
+       (Major Mode Basics, Derived Modes): Encourge more strongly use of
+       define-derived-mode.  Mention completion-at-point-functions.
+
+2010-12-13  Chong Yidong  <address@hidden>
+
+       * nonascii.texi (Converting Representations):
+       Document byte-to-string.
 2010-12-08  Glenn Morris  <address@hidden>
 
        * buffers.texi (Modification Time):
@@ -42,8 +75,8 @@
 
        * customize.texi (Composite Types): Lower-case index entry.
 
-       * loading.texi (How Programs Do Loading): Document
-       load-file-name.  (Bug#7346)
+       * loading.texi (How Programs Do Loading):
+       Document load-file-name.  (Bug#7346)
 
 2010-11-17  Glenn Morris  <address@hidden>
 
@@ -484,8 +517,8 @@
        * minibuf.texi (Basic Completion): 4th arg to all-completions is
        obsolete.
 
-       * processes.texi (Process Buffers): Document
-       process-kill-buffer-query-function.
+       * processes.texi (Process Buffers):
+       Document process-kill-buffer-query-function.
 
 2009-12-05  Glenn Morris  <address@hidden>
 
@@ -932,8 +965,8 @@
        (Suspending Emacs): Mark suspend-emacs as a command.
        (Processor Run Time): Mark emacs-uptime and emacs-init-time as
        commands.
-       (Terminal Output): Remove obsolete function baud-rate.  Document
-       TERMINAL arg for send-string-to-terminal.
+       (Terminal Output): Remove obsolete function baud-rate.
+       Document TERMINAL arg for send-string-to-terminal.
 
        * nonascii.texi (Terminal I/O Encoding): Document TERMINAL arg for
        terminal-coding-system and set-terminal-coding-system.
@@ -1037,8 +1070,8 @@
 2009-05-09  Eli Zaretskii  <address@hidden>
 
        * nonascii.texi (Default Coding Systems): Document
-       find-auto-coding, set-auto-coding, and auto-coding-alist.  Add
-       indexing.
+       find-auto-coding, set-auto-coding, and auto-coding-alist.
+       Add indexing.
        (Lisp and Coding Systems): Add index entries.
 
 2009-05-09  Martin Rudalics  <address@hidden>
@@ -1080,8 +1113,8 @@
 
 2009-04-22  Chong Yidong  <address@hidden>
 
-       * os.texi (Command-Line Arguments): Document
-       command-line-args-left.
+       * os.texi (Command-Line Arguments):
+       Document command-line-args-left.
        (Suspending Emacs): Adapt text to multi-tty case.  Document use of
        terminal objects for tty arguments.
        (Startup Summary): Add xref to Session Management.
@@ -1157,13 +1190,13 @@
 2009-04-09  Chong Yidong  <address@hidden>
 
        * text.texi (Yank Commands): Note that yank uses push-mark.
-       (Filling): Clarify REGION argument of fill-paragraph.  Document
-       fill-forward-paragraph-function.
+       (Filling): Clarify REGION argument of fill-paragraph.
+       Document fill-forward-paragraph-function.
        (Special Properties): Remove "new in Emacs 22" declaration.
        (Clickable Text): Merge with Links and Mouse-1 node.
 
-       * display.texi (Button Properties, Button Buffer Commands): Change
-       xref to Clickable Text.
+       * display.texi (Button Properties, Button Buffer Commands):
+       Change xref to Clickable Text.
 
        * tips.texi (Key Binding Conventions): Change xref to Clickable
        Text.
@@ -1225,8 +1258,8 @@
 
 2009-03-29  Chong Yidong  <address@hidden>
 
-       * help.texi (Accessing Documentation, Help Functions): Remove
-       information about long-obsolete Emacs versions.
+       * help.texi (Accessing Documentation, Help Functions):
+       Remove information about long-obsolete Emacs versions.
 
        * modes.texi (Mode Line Variables): The default values of the mode
        line variables are now more complicated.
@@ -1269,8 +1302,8 @@
 2009-03-23  Chong Yidong  <address@hidden>
 
        * minibuf.texi (Intro to Minibuffers): Remove long-obsolete info
-       about minibuffers in old Emacs versions.  Copyedits.  Emphasize
-       that enable-recursive-minibuffers defaults to nil.
+       about minibuffers in old Emacs versions.  Copyedits.
+       Emphasize that enable-recursive-minibuffers defaults to nil.
        (Text from Minibuffer): Simplify introduction.
 
 2009-03-22  Alan Mackenzie  <address@hidden>
@@ -1324,8 +1357,8 @@
        * customize.texi (Common Keywords): It's not necessary to use :tag
        to remove hyphens, as custom-unlispify-tag-name does it
        automatically.
-       (Variable Definitions): Link to File Local Variables.  Document
-       customized-value symbol property.
+       (Variable Definitions): Link to File Local Variables.
+       Document customized-value symbol property.
        (Customization Types): Move menu to end of node.
 
 2009-03-10  Chong Yidong  <address@hidden>
@@ -1436,8 +1469,8 @@
        * text.texi (Commands for Insertion):
        * commands.texi (Event Mod):
        * keymaps.texi (Searching Keymaps):
-       * nonascii.texi (Translation of Characters): Reinstate
-       documentation of translation-table-for-input.
+       * nonascii.texi (Translation of Characters):
+       Reinstate documentation of translation-table-for-input.
        (Explicit Encoding): Document the `charset' text property produced
        by decode-coding-region and decode-coding-string.
 
@@ -1466,8 +1499,8 @@
 2009-01-22  Chong Yidong  <address@hidden>
 
        * files.texi (Format Conversion Piecemeal): Clarify behavior of
-       write-region-annotate-functions.  Document
-       write-region-post-annotation-function.
+       write-region-annotate-functions.
+       Document write-region-post-annotation-function.
 
 2009-01-19  Chong Yidong  <address@hidden>
 
@@ -1534,8 +1567,8 @@
 
        * processes.texi (Serial Ports): Improve wording, suggested by RMS.
 
-       * nonascii.texi (Lisp and Coding Systems): Document
-       inhibit-null-byte-detection and inhibit-iso-escape-detection.
+       * nonascii.texi (Lisp and Coding Systems):
+       Document inhibit-null-byte-detection and inhibit-iso-escape-detection.
        (Character Properties): Improve wording.
 
 2009-01-09  Chong Yidong  <address@hidden>
@@ -1543,8 +1576,8 @@
        * display.texi (Font Lookup): Remove obsolete function
        x-font-family-list.  x-list-fonts accepts Fontconfig/GTK syntax.
        (Low-Level Font): Rename from Fonts, move to end of Faces section.
-       (Font Selection): Reorder order of variable descriptions.  Minor
-       clarifications.
+       (Font Selection): Reorder order of variable descriptions.
+       Minor clarifications.
 
        * elisp.texi (Top): Update node listing.
 
@@ -1565,8 +1598,8 @@
        * elisp.texi: Update node listing.
 
        * display.texi (Faces): Put Font Selection node after Auto Faces.
-       (Face Attributes): Don't link to Font Lookup.  Document
-       font-family-list.
+       (Face Attributes): Don't link to Font Lookup.
+       Document font-family-list.
        (Fonts): New node.
 
 2009-01-08  Jason Rumney  <address@hidden>
@@ -1794,8 +1827,8 @@
        * windows.texi (Window Hooks): Remove *-end-trigger-functions
        vars, which are obsolete.  Mention jit-lock-register.
 
-       * modes.texi (Other Font Lock Variables): Document
-       jit-lock-register and jit-lock-unregister.
+       * modes.texi (Other Font Lock Variables):
+       Document jit-lock-register and jit-lock-unregister.
 
        * frames.texi (Color Parameters): Document alpha parameter.
 
@@ -1867,8 +1900,8 @@
 2008-11-01  Eli Zaretskii  <address@hidden>
 
        * nonascii.texi (Text Representations): Rewrite to make consistent
-       with Emacs 23 internal representation of characters.  Document
-       `unibyte-string'.
+       with Emacs 23 internal representation of characters.
+       Document `unibyte-string'.
 
 2008-10-28  Chong Yidong  <address@hidden>
 
@@ -1981,8 +2014,8 @@
 
        * processes.texi (Synchronous Processes): Document `process-lines'.
 
-       * customize.texi (Variable Definitions): Document
-       `custom-reevaluate-setting'.
+       * customize.texi (Variable Definitions):
+       Document `custom-reevaluate-setting'.
 
 2008-10-18  Martin Rudalics  <address@hidden>
 
@@ -1998,13 +2031,13 @@
        * maps.texi (Standard Keymaps): Document `multi-query-replace-map'
        and `search-map'.
 
-       * searching.texi (Search and Replace): Document
-       `replace-search-function' and `replace-re-search-function'.
+       * searching.texi (Search and Replace):
+       Document `replace-search-function' and `replace-re-search-function'.
        Document `multi-query-replace-map'.
 
        * minibuf.texi (Text from Minibuffer): Document `read-regexp'.
-       (Completion Commands, Reading File Names): Rename
-       `minibuffer-local-must-match-filename-map' to
+       (Completion Commands, Reading File Names):
+       Rename `minibuffer-local-must-match-filename-map' to
        `minibuffer-local-filename-must-match-map'.
        (Minibuffer Completion): The `require-match' argument to
        `completing-read' can now have the value `confirm-only'.
@@ -2349,7 +2382,7 @@
 
 2007-12-30  Richard Stallman  <address@hidden>
 
-       * commands.texi (Accessing Mouse): Renamed from Accessing Events.
+       * commands.texi (Accessing Mouse): Rename from Accessing Events.
        (Accessing Scroll): New node broken out of Accessing Mouse.
 
 2007-12-28  Richard Stallman  <address@hidden>
@@ -2393,8 +2426,8 @@
 
 2007-11-29  Glenn Morris  <address@hidden>
 
-       * functions.texi (Declaring Functions): Add findex.  Mention
-       `external' files.
+       * functions.texi (Declaring Functions): Add findex.
+       Mention `external' files.
 
 2007-11-26  Juanma Barranquero  <address@hidden>
 
@@ -2521,8 +2554,8 @@
        * display.texi (Display Property): Explain some display specs
        don't let you move point in.
 
-       * frames.texi (Cursor Parameters): Describe
-       cursor-in-non-selected-windows here.  Explain more values.
+       * frames.texi (Cursor Parameters):
+       Describe cursor-in-non-selected-windows here.  Explain more values.
 
        * windows.texi (Basic Windows): Don't describe
        cursor-in-non-selected-windows here.
@@ -2601,8 +2634,8 @@
 
 2007-08-16  Richard Stallman  <address@hidden>
 
-       * processes.texi (Asynchronous Processes): Clarify
-       doc of start-file-process.
+       * processes.texi (Asynchronous Processes):
+       Clarify doc of start-file-process.
 
 2007-08-08  Martin Rudalics  <address@hidden>
 
@@ -2669,8 +2702,8 @@
 
 2007-06-27  Richard Stallman  <address@hidden>
 
-       * files.texi (Format Conversion Piecemeal): Clarify
-       `after-insert-file-functions' calling convention.
+       * files.texi (Format Conversion Piecemeal):
+       Clarify `after-insert-file-functions' calling convention.
 
 2007-06-27  Michael Albinus  <address@hidden>
 
@@ -2725,8 +2758,8 @@
 
 2007-05-30  Nick Roberts  <address@hidden>
 
-       * commands.texi (Click Events): Layout more logically.  Describe
-       width and height.
+       * commands.texi (Click Events): Layout more logically.
+       Describe width and height.
        (Drag Events, Motion Events): Update to new format for position.
 
 2007-06-02  Richard Stallman  <address@hidden>
@@ -3132,8 +3165,8 @@
 
 2007-03-05  Richard Stallman  <address@hidden>
 
-       * variables.texi (File Local Variables): Update
-       enable-local-variables values.
+       * variables.texi (File Local Variables):
+       Update enable-local-variables values.
 
 2007-03-04  Richard Stallman  <address@hidden>
 
@@ -3204,8 +3237,8 @@
 2007-02-03  Eli Zaretskii  <address@hidden>
 
        * elisp.texi (Top): Make the detailed menu headers compliant with
-       Texinfo guidelines and with what texnfo-upd.el expects.  Add
-       comments to prevent people from inadvertently modifying the key
+       Texinfo guidelines and with what texnfo-upd.el expects.
+       Add comments to prevent people from inadvertently modifying the key
        parts needed by `texinfo-multiple-files-update'.
 
 2007-02-02  Eli Zaretskii  <address@hidden>
@@ -3292,8 +3325,8 @@
 
 2006-12-24  Richard Stallman  <address@hidden>
 
-       * customize.texi (Variable Definitions): Document
-       new name custom-add-frequent-value.
+       * customize.texi (Variable Definitions):
+       Document new name custom-add-frequent-value.
 
 2006-12-19  Kim F. Storm  <address@hidden>
 
@@ -3592,8 +3625,8 @@
 
 2006-09-01  Chong Yidong  <address@hidden>
 
-       * buffers.texi (Buffer Modification): Document
-       buffer-chars-modified-tick.
+       * buffers.texi (Buffer Modification):
+       Document buffer-chars-modified-tick.
 
 2006-08-31  Richard Stallman  <address@hidden>
 
@@ -3655,7 +3688,7 @@
 2006-08-12  Chong Yidong  <address@hidden>
 
        * text.texi (Near Point): Say "cursor" not "terminal cursor".
-       (Commands for Insertion): Removed split-line since it's not
+       (Commands for Insertion): Remove split-line since it's not
        relevant for Lisp programming.
        (Yank Commands): Rewrite introduction.
        (Undo): Clarify.
@@ -3686,7 +3719,7 @@
        (Major Mode Basics): Mention define-derived-mode explicitly.
        (Major Mode Conventions): Rebinding RET is OK for some modes.
        Mention change-major-mode-hook and after-change-major-mode-hook.
-       (Example Major Modes): Moved to end of Modes section.
+       (Example Major Modes): Move to end of Modes section.
        (Mode Line Basics): Clarify.
        (Mode Line Data): Mention help-echo and local-map in strings.
        Explain reason for treatment of non-risky variables.
@@ -4185,7 +4218,7 @@
 
 2006-05-25  Chong Yidong  <address@hidden>
 
-       * keymaps.texi (Key Sequences): Renamed from Keymap Terminology.
+       * keymaps.texi (Key Sequences): Rename from Keymap Terminology.
        Explain string and vector representations of key sequences.
 
        * keymaps.texi (Changing Key Bindings):
@@ -4234,8 +4267,8 @@
 
 2006-05-15  Oliver Scholz  <address@hidden>  (tiny change)
 
-       * nonascii.texi (Explicit Encoding): Fix
-       typo (encoding<->decoding).
+       * nonascii.texi (Explicit Encoding):
+       Fix typo (encoding<->decoding).
 
 2006-05-14  Richard Stallman  <address@hidden>
 
@@ -4285,8 +4318,8 @@
 
 2006-05-09  Richard Stallman  <address@hidden>
 
-       * variables.texi (File Local Variables): Document
-       safe-local-eval-forms and safe-local-eval-function.
+       * variables.texi (File Local Variables):
+       Document safe-local-eval-forms and safe-local-eval-function.
 
 2006-05-07  Kim F. Storm  <address@hidden>
 
@@ -4770,8 +4803,8 @@
 
 2005-12-03  Eli Zaretskii  <address@hidden>
 
-       * hooks.texi (Standard Hooks): Add index entries.  Mention
-       `compilation-finish-functions'.
+       * hooks.texi (Standard Hooks): Add index entries.
+       Mention `compilation-finish-functions'.
 
 2005-11-27  Richard M. Stallman  <address@hidden>
 
@@ -4994,8 +5027,8 @@
        buffer-local.
        (Undo): Note that buffer-undo-list is buffer-local.
 
-       * windows.texi (Buffers and Windows): Document
-       buffer-display-count.
+       * windows.texi (Buffers and Windows):
+       Document buffer-display-count.
 
 2005-09-06  Richard M. Stallman  <address@hidden>
 
@@ -5236,7 +5269,7 @@
 
        * display.texi (Displaying Messages): New node, with most
        of what was in The Echo Area.
-       (Progress): Moved under The Echo Area.
+       (Progress): Move under The Echo Area.
        (Logging Messages): New node with new text.
        (Echo Area Customization): New node, the rest of what was
        in The Echo Area.  Document message-truncate-lines with @defvar.
@@ -6551,8 +6584,8 @@
        (Scroll Bars): Add scroll-bar-mode and scroll-bar-width.
        (Usual Display): Move tab-width up.
 
-       * customize.texi (Variable Definitions): Replace
-       show-paren-mode example with tooltip-mode.
+       * customize.texi (Variable Definitions):
+       Replace show-paren-mode example with tooltip-mode.
        (Simple Types, Composite Types, Defining New Types):
        Minor cleanups.
 
@@ -6788,8 +6821,8 @@
        (Display Fringe Bitmaps): New node.
        (Images): Add 'Image Slices' to menu.
        (Image Descriptors): Add `:pointer' and `:map' properties.
-       (Showing Images): Add slice arg to `insert-image'.  Add
-       'insert-sliced-image'.
+       (Showing Images): Add slice arg to `insert-image'.
+       Add 'insert-sliced-image'.
 
 2004-09-20  Richard M. Stallman  <address@hidden>
 
@@ -6802,8 +6835,8 @@
 
 2004-09-07  Luc Teirlinck  <address@hidden>
 
-       * locals.texi (Standard Buffer-Local Variables): Add
-       `buffer-auto-save-file-format'.
+       * locals.texi (Standard Buffer-Local Variables):
+       Add `buffer-auto-save-file-format'.
        * internals.texi (Buffer Internals): Describe new
        auto_save_file_format field of the buffer structure.
        * files.texi (Format Conversion): `auto-save-file-format' has been
@@ -7191,8 +7224,8 @@
 
 2004-04-05  Jesper Harder  <address@hidden>
 
-       * variables.texi (Variable Aliases): Mention
-       cyclic-variable-indirection.
+       * variables.texi (Variable Aliases):
+       Mention cyclic-variable-indirection.
 
        * errors.texi (Standard Errors): Ditto.
 
@@ -7371,7 +7404,7 @@
 
 2004-02-07  Jan Djärv  <address@hidden>
 
-       * positions.texi (Text Lines): Added missing end defun.
+       * positions.texi (Text Lines): Add missing end defun.
 
 2004-02-07  Kim F. Storm  <address@hidden>
 
@@ -7394,12 +7427,12 @@
        read-minibuffer.
        (Minibuffer History): Clarify description of cons values for
        HISTORY arguments.
-       (Basic Completion): Various corrections and clarifications.  Add
-       completion-regexp-list.
+       (Basic Completion): Various corrections and clarifications.
+       Add completion-regexp-list.
        (Minibuffer Completion): Correct and clarify description of
        completing-read.
-       (Completion Commands): Mention Partial Completion mode.  Various
-       other minor changes.
+       (Completion Commands): Mention Partial Completion mode.
+       Various other minor changes.
        (High-Level Completion): Various corrections and clarifications.
        (Reading File Names): Ditto.
        (Minibuffer Misc): Ditto.
@@ -7474,8 +7507,8 @@
 
        * functions.texi: Various small changes in addition to the
        following.
-       (What Is a Function): `functionp' returns nil for macros.  Clarify
-       behavior of this and following functions for symbol arguments.
+       (What Is a Function): `functionp' returns nil for macros.
+       Clarify behavior of this and following functions for symbol arguments.
        (Function Documentation): Add `\' in front of (fn @var{arglist})
        and explain why.
        (Defining Functions): Mention DOCSTRING argument to `defalias'.
@@ -8271,7 +8304,7 @@
 
 2003-01-31  Joe Buehler  <address@hidden>
 
-       * os.texi (System Environment): Added cygwin system-type.
+       * os.texi (System Environment): Add cygwin system-type.
 
 2003-01-25  Richard M. Stallman  <address@hidden>
 
@@ -8304,7 +8337,7 @@
 
        * README: Target for Info file is `make info'.
 
-       * files.texi (File Name Components): Fixed typos in
+       * files.texi (File Name Components): Fix typos in
        `file-name-sans-extension'.
        (Magic File Names): Complete list of operations for magic file
        name handlers.
@@ -8320,7 +8353,7 @@
 
 2002-08-05  Per Abrahamsen  <address@hidden>
 
-       * customize.texi (Splicing into Lists): Fixed example.
+       * customize.texi (Splicing into Lists): Fix example.
        Reported by Fabrice Bauzac <address@hidden>.
 
 2002-06-17  Juanma Barranquero  <address@hidden>
@@ -8360,8 +8393,8 @@
 
 2001-11-17  Eli Zaretskii  <address@hidden>
 
-       * permute-index: Don't depend on csh-specific features.  Replace
-       the interpreter name with /bin/sh.
+       * permute-index: Don't depend on csh-specific features.
+       Replace the interpreter name with /bin/sh.
 
        * two-volume-cross-refs.txt: New file.
        * two.el: New file.
@@ -8499,8 +8532,8 @@
        * numbers.texi (Integer Basics): Document CL style read syntax for
        integers in bases other than 10.
 
-       * positions.texi (List Motion): Document
-       open-paren-in-column-0-is-defun-start.
+       * positions.texi (List Motion):
+       Document open-paren-in-column-0-is-defun-start.
 
        * lists.texi (Sets And Lists): Document member-ignore-case.
 
@@ -8695,7 +8728,7 @@
 1995-06-19  Richard Stallman  <address@hidden>
 
        * Makefile (VERSION): Update version number.
-       (maintainer-clean): Renamed from realclean.
+       (maintainer-clean): Rename from realclean.
 
 1995-06-07  Karl Heuer  <address@hidden>
 
@@ -8767,11 +8800,11 @@
 
 1991-11-26  Richard Stallman  (address@hidden)
 
-       * Makefile (srcs): Added index.perm.
+       * Makefile (srcs): Add index.perm.
        (elisp.dvi): Remove erroneous shell comment.
        Expect output of permute-index in permuted.fns.
        Save old elisp.aux in elisp.oaux.
-       (clean): Added index.texi to be deleted.
+       (clean): Add index.texi to be deleted.
 
 1990-08-11  Richard Stallman  (address@hidden)
 

=== modified file 'doc/lispref/backups.texi'
--- a/doc/lispref/backups.texi  2010-01-13 08:35:10 +0000
+++ b/doc/lispref/backups.texi  2010-12-01 22:42:36 +0000
@@ -88,10 +88,8 @@
 @smallexample
 @group
 (add-hook 'rmail-mode-hook
-          (function (lambda ()
-                      (make-local-variable
-                       'make-backup-files)
-                      (setq make-backup-files nil))))
+          (lambda ()
+            (set (make-local-variable 'make-backup-files) nil)))
 @end group
 @end smallexample
 @end defopt

=== modified file 'doc/lispref/display.texi'
--- a/doc/lispref/display.texi  2010-11-13 13:29:31 +0000
+++ b/doc/lispref/display.texi  2010-12-13 15:27:36 +0000
@@ -3892,6 +3892,13 @@
 but it is done as a special case of marginal display (@pxref{Display
 Margins}).
 
address@hidden (left-fringe @var{bitmap} @address@hidden@r{]})
address@hidden (right-fringe @var{bitmap} @address@hidden@r{]})
+This display specification on any character of a line of text causes
+the specified @var{bitmap} be displayed in the left or right fringes
+for that line.  The optional @var{face} specifies the colors to be
+used for the bitmap.  @xref{Fringe Bitmaps}, for the details.
+
 @item (space-width @var{factor})
 This display specification affects all the space characters within the
 text that has the specification.  It displays all of these spaces

=== modified file 'doc/lispref/modes.texi'
--- a/doc/lispref/modes.texi    2010-08-22 19:30:26 +0000
+++ b/doc/lispref/modes.texi    2010-12-13 15:27:36 +0000
@@ -20,14 +20,15 @@
 @ref{Keymaps}, and @ref{Syntax Tables}.
 
 @menu
-* Hooks::              How to use hooks; how to write code that provides hooks.
-* Major Modes::        Defining major modes.
-* Minor Modes::        Defining minor modes.
-* Mode Line Format::   Customizing the text that appears in the mode line.
-* Imenu::              How a mode can provide a menu
+* Hooks::                       How to use hooks; how to write code that 
provides hooks.
+* Major Modes::                 Defining major modes.
+* Minor Modes::                 Defining minor modes.
+* Mode Line Format::            Customizing the text that appears in the mode 
line.
+* Imenu::                       How a mode can provide a menu
                          of definitions in the buffer.
-* Font Lock Mode::     How modes can highlight text according to syntax.
-* Desktop Save Mode::  How modes can have buffer state saved between
+* Font Lock Mode::              How modes can highlight text according to 
syntax.
+* Auto-Indentation::            How to teach Emacs to indent for a major mode.
+* Desktop Save Mode::           How modes can have buffer state saved between
                          Emacs sessions.
 @end menu
 
@@ -78,8 +79,8 @@
 its value is just a single function, not a list of functions.
 
 @menu
-* Running Hooks::      How to run a hook.
-* Setting Hooks::      How to put functions on a hook, or remove them.
+* Running Hooks::               How to run a hook.
+* Setting Hooks::               How to put functions on a hook, or remove them.
 @end menu
 
 @node Running Hooks
@@ -199,16 +200,16 @@
 to another major mode in the same buffer.
 
 @menu
-* Major Mode Basics::
-* Major Mode Conventions::  Coding conventions for keymaps, etc.
-* Auto Major Mode::         How Emacs chooses the major mode automatically.
-* Mode Help::               Finding out how to use a mode.
-* Derived Modes::           Defining a new major mode based on another major
+* Major Mode Basics::           
+* Major Mode Conventions::      Coding conventions for keymaps, etc.
+* Auto Major Mode::             How Emacs chooses the major mode automatically.
+* Mode Help::                   Finding out how to use a mode.
+* Derived Modes::               Defining a new major mode based on another 
major
                               mode.
-* Generic Modes::           Defining a simple major mode that supports
+* Generic Modes::               Defining a simple major mode that supports
                               comment syntax and Font Lock mode.
-* Mode Hooks::              Hooks run at the end of major mode functions.
-* Example Major Modes::     Text mode and Lisp modes.
+* Mode Hooks::                  Hooks run at the end of major mode functions.
+* Example Major Modes::         Text mode and Lisp modes.
 @end menu
 
 @node Major Mode Basics
@@ -238,9 +239,8 @@
 is distinct from that of Text mode, but uses that of Text mode.
 
   Even if the new mode is not an obvious derivative of any other mode,
-it is convenient to use @code{define-derived-mode} with a @code{nil}
-parent argument, since it automatically enforces the most important
-coding conventions for you.
+we recommend to use @code{define-derived-mode}, since it automatically
+enforces the most important coding conventions for you.
 
   For a very simple programming language major mode that handles
 comments and fontification, you can use @code{define-generic-mode}.
@@ -333,7 +333,7 @@
 programming language, indentation of text according to structure is
 probably useful.  So the mode should set @code{indent-line-function}
 to a suitable function, and probably customize other variables
-for indentation.
+for indentation.  @xref{Auto-Indentation}.
 
 @item
 @cindex keymaps in modes
@@ -429,6 +429,10 @@
 this mode.
 
 @item
+The mode can specify how to complete various keywords by adding
+to the special hook @code{completion-at-point-functions}.
+
address@hidden
 Use @code{defvar} or @code{defcustom} to set mode-related variables, so
 that they are not reinitialized if they already have a value.  (Such
 reinitialization could discard customizations made by the user.)
@@ -492,7 +496,7 @@
 mode as special if the parent mode is special.  The special mode
 @code{special-mode} provides a convenient parent for other special
 modes to inherit from; it sets @code{buffer-read-only} to @code{t},
-and does nothing else.
+and does little else.
 
 @item
 If you want to make the new mode the default for files with certain
@@ -737,8 +741,10 @@
 @subsection Defining Derived Modes
 @cindex derived mode
 
-  It's often useful to define a new major mode in terms of an existing
-one.  An easy way to do this is to use @code{define-derived-mode}.
+  The recommended way to define a new major mode is to derive it
+from an existing one using @code{define-derived-mode}.  If there is no
+closely related mode, you can inherit from @code{text-mode},
address@hidden, or in the worst case @code{fundamental-mode}.
 
 @defmac define-derived-mode variant parent name docstring address@hidden 
address@hidden
 This macro defines @var{variant} as a major mode command, using
@@ -979,8 +985,7 @@
 Turning on Text mode runs the normal hook `text-mode-hook'."
 @end group
 @group
-  (make-local-variable 'text-mode-variant)
-  (setq text-mode-variant t)
+  (set (make-local-variable 'text-mode-variant) t)
   ;; @r{These two lines are a feature added recently.}
   (set (make-local-variable 'require-final-newline)
        mode-require-final-newline)
@@ -998,9 +1003,8 @@
 @smallexample
 @group
 ;; @r{This isn't needed nowadays, since @code{define-derived-mode} does it.}
-(defvar text-mode-abbrev-table nil
+(define-abbrev-table 'text-mode-abbrev-table ()
   "Abbrev table used while in text mode.")
-(define-abbrev-table 'text-mode-abbrev-table ())
 @end group
 
 @group
@@ -1022,12 +1026,10 @@
   ;; @r{These four lines are absent from the current version}
   ;; @r{not because this is done some other way, but rather}
   ;; @r{because nowadays Text mode uses the normal definition of paragraphs.}
-  (make-local-variable 'paragraph-start)
-  (setq paragraph-start (concat "[ \t]*$\\|" page-delimiter))
-  (make-local-variable 'paragraph-separate)
-  (setq paragraph-separate paragraph-start)
-  (make-local-variable 'indent-line-function)
-  (setq indent-line-function 'indent-relative-maybe)
+  (set (make-local-variable 'paragraph-start)
+       (concat "[ \t]*$\\|" page-delimiter))
+  (set (make-local-variable 'paragraph-separate) paragraph-start)
+  (set (make-local-variable 'indent-line-function) 'indent-relative-maybe)
 @end group
 @group
   (setq mode-name "Text")
@@ -1115,15 +1117,12 @@
 
 @smallexample
 @group
-  (make-local-variable 'paragraph-start)
-  (setq paragraph-start (concat page-delimiter "\\|$" ))
-  (make-local-variable 'paragraph-separate)
-  (setq paragraph-separate paragraph-start)
+  (set (make-local-variable 'paragraph-start) (concat page-delimiter "\\|$" ))
+  (set (make-local-variable 'paragraph-separate) paragraph-start)
   @dots{}
 @end group
 @group
-  (make-local-variable 'comment-indent-function)
-  (setq comment-indent-function 'lisp-comment-indent))
+  (set (make-local-variable 'comment-indent-function) 'lisp-comment-indent))
   @dots{}
 @end group
 @end smallexample
@@ -1135,16 +1134,13 @@
 
 @smallexample
 @group
-(defvar shared-lisp-mode-map ()
+(defvar shared-lisp-mode-map
+  (let ((map (make-sparse-keymap)))
+    (define-key shared-lisp-mode-map "\e\C-q" 'indent-sexp)
+    (define-key shared-lisp-mode-map "\177"
+                'backward-delete-char-untabify)
+    map)
   "Keymap for commands shared by all sorts of Lisp modes.")
-
-;; @r{Putting this @code{if} after the @code{defvar} is an older style.}
-(if shared-lisp-mode-map
-    ()
-   (setq shared-lisp-mode-map (make-sparse-keymap))
-   (define-key shared-lisp-mode-map "\e\C-q" 'indent-sexp)
-   (define-key shared-lisp-mode-map "\177"
-               'backward-delete-char-untabify))
 @end group
 @end smallexample
 
@@ -1153,15 +1149,13 @@
 
 @smallexample
 @group
-(defvar lisp-mode-map ()
+(defvar lisp-mode-map
+  (let ((map (make-sparse-keymap)))
+    (set-keymap-parent map shared-lisp-mode-map)
+    (define-key map "\e\C-x" 'lisp-eval-defun)
+    (define-key map "\C-c\C-z" 'run-lisp)
+    map)
   "Keymap for ordinary Lisp mode...")
-
-(if lisp-mode-map
-    ()
-  (setq lisp-mode-map (make-sparse-keymap))
-  (set-keymap-parent lisp-mode-map shared-lisp-mode-map)
-  (define-key lisp-mode-map "\e\C-x" 'lisp-eval-defun)
-  (define-key lisp-mode-map "\C-c\C-z" 'run-lisp))
 @end group
 @end smallexample
 
@@ -1192,11 +1186,9 @@
                                          ;   @r{finds out what to describe.}
   (setq mode-name "Lisp")                ; @r{This goes into the mode line.}
   (lisp-mode-variables t)                ; @r{This defines various variables.}
-  (make-local-variable 'comment-start-skip)
-  (setq comment-start-skip
-        "\\(\\(^\\|[^\\\\\n]\\)\\(\\\\\\\\\\)*\\)\\(;+\\|#|\\) *")
-  (make-local-variable 'font-lock-keywords-case-fold-search)
-  (setq font-lock-keywords-case-fold-search t)
+  (set (make-local-variable 'comment-start-skip)
+       "\\(\\(^\\|[^\\\\\n]\\)\\(\\\\\\\\\\)*\\)\\(;+\\|#|\\) *")
+  (set (make-local-variable 'font-lock-keywords-case-fold-search) t)
 @end group
 @group
   (setq imenu-case-fold-search t)
@@ -1580,14 +1572,14 @@
 minor modes.
 
 @menu
-* Base: Mode Line Basics. Basic ideas of mode line control.
-* Data: Mode Line Data.   The data structure that controls the mode line.
-* Top: Mode Line Top.     The top level variable, mode-line-format.
-* Mode Line Variables::   Variables used in that data structure.
-* %-Constructs::          Putting information into a mode line.
-* Properties in Mode::    Using text properties in the mode line.
-* Header Lines::          Like a mode line, but at the top.
-* Emulating Mode Line::   Formatting text as the mode line would.
+* Base: Mode Line Basics.       Basic ideas of mode line control.
+* Data: Mode Line Data.         The data structure that controls the mode line.
+* Top: Mode Line Top.           The top level variable, mode-line-format.
+* Mode Line Variables::         Variables used in that data structure.
+* %-Constructs::                Putting information into a mode line.
+* Properties in Mode::          Using text properties in the mode line.
+* Header Lines::                Like a mode line, but at the top.
+* Emulating Mode Line::         Formatting text as the mode line would.
 @end menu
 
 @node Mode Line Basics
@@ -2361,7 +2353,7 @@
 * Other Font Lock Variables::   Additional customization facilities.
 * Levels of Font Lock::         Each mode can define alternative levels
                                   so that the user can select more or less.
-* Precalculated Fontification:: How Lisp programs that produce the buffer
+* Precalculated Fontification::  How Lisp programs that produce the buffer
                                   contents can also specify how to fontify it.
 * Faces for Font Lock::         Special faces specifically for Font Lock.
 * Syntactic Font Lock::         Fontification based on syntax tables.
@@ -3223,6 +3215,659 @@
 reasonably fast.
 @end defvar
 
address@hidden Auto-Indentation
address@hidden Auto-indention of code
+
+For programming languages, an important feature of a major mode is to
+provide automatic indentation.  This is controlled in Emacs by
address@hidden (@pxref{Mode-Specific Indent}).
+Writing a good indentation function can be difficult and to a large
+extent it is still a black art.
+
+Many major mode authors will start by writing a simple indentation
+function that works for simple cases, for example by comparing with the
+indentation of the previous text line.  For most programming languages
+that are not really line-based, this tends to scale very poorly:
+improving such a function to let it handle more diverse situations tends
+to become more and more difficult, resulting in the end with a large,
+complex, unmaintainable indentation function which nobody dares to touch.
+
+A good indentation function will usually need to actually parse the
+text, according to the syntax of the language.  Luckily, it is not
+necessary to parse the text in as much detail as would be needed
+for a compiler, but on the other hand, the parser embedded in the
+indentation code will want to be somewhat friendly to syntactically
+incorrect code.
+
+Good maintainable indentation functions usually fall into 2 categories:
+either parsing forward from some ``safe'' starting point until the
+position of interest, or parsing backward from the position of interest.
+Neither of the two is a clearly better choice than the other: parsing
+backward is often more difficult than parsing forward because
+programming languages are designed to be parsed forward, but for the
+purpose of indentation it has the advantage of not needing to
+guess a ``safe'' starting point, and it generally enjoys the property
+that only a minimum of text will be analyzed to decide the indentation
+of a line, so indentation will tend to be unaffected by syntax errors in
+some earlier unrelated piece of code.  Parsing forward on the other hand
+is usually easier and has the advantage of making it possible to
+reindent efficiently a whole region at a time, with a single parse.
+
+Rather than write your own indentation function from scratch, it is
+often preferable to try and reuse some existing ones or to rely
+on a generic indentation engine.  There are sadly few such
+engines.  The CC-mode indentation code (used with C, C++, Java, Awk
+and a few other such modes) has been made more generic over the years,
+so if your language seems somewhat similar to one of those languages,
+you might try to use that engine.  @c FIXME: documentation?
+Another one is SMIE which takes an approach in the spirit
+of Lisp sexps and adapts it to non-Lisp languages.
+
address@hidden
+* SMIE::                        A simple minded indentation engine
address@hidden menu
+
address@hidden SMIE
address@hidden Simple Minded Indentation Engine
+
+SMIE is a package that provides a generic navigation and indentation
+engine.  Based on a very simple parser using an ``operator precedence
+grammar'', it lets major modes extend the sexp-based navigation of Lisp
+to non-Lisp languages as well as provide a simple to use but reliable
+auto-indentation.
+
+Operator precedence grammar is a very primitive technology for parsing
+compared to some of the more common techniques used in compilers.
+It has the following characteristics: its parsing power is very limited,
+and it is largely unable to detect syntax errors, but it has the
+advantage of being algorithmically efficient and able to parse forward
+just as well as backward.  In practice that means that SMIE can use it
+for indentation based on backward parsing, that it can provide both
address@hidden and @code{backward-sexp} functionality, and that it
+will naturally work on syntactically incorrect code without any extra
+effort.  The downside is that it also means that most programming
+languages cannot be parsed correctly using SMIE, at least not without
+resorting to some special tricks (@pxref{SMIE Tricks}).
+
address@hidden
+* SMIE setup::                  SMIE setup and features
+* Operator Precedence Grammars::  A very simple parsing technique
+* SMIE Grammar::                Defining the grammar of a language
+* SMIE Lexer::                  Defining tokens
+* SMIE Tricks::                 Working around the parser's limitations
+* SMIE Indentation::            Specifying indentation rules
+* SMIE Indentation Helpers::    Helper functions for indentation rules
+* SMIE Indentation Example::    Sample indentation rules
address@hidden menu
+
address@hidden SMIE setup
address@hidden SMIE Setup and Features
+
+SMIE is meant to be a one-stop shop for structural navigation and
+various other features which rely on the syntactic structure of code, in
+particular automatic indentation.  The main entry point is
address@hidden which is a function typically called while setting
+up a major mode.
+
address@hidden smie-setup grammar rules-function &rest keywords
+Setup SMIE navigation and indentation.
address@hidden is a grammar table generated by @code{smie-prec2->grammar}.
address@hidden is a set of indentation rules for use on
address@hidden
address@hidden are additional arguments, which can include the following
+keywords:
address@hidden
address@hidden
address@hidden:forward-token} @var{fun}: Specify the forward lexer to use.
address@hidden
address@hidden:backward-token} @var{fun}: Specify the backward lexer to use.
address@hidden itemize
address@hidden defun
+
+Calling this function is sufficient to make commands such as
address@hidden, @code{backward-sexp}, and @code{transpose-sexps} be
+able to properly handle structural elements other than just the paired
+parentheses already handled by syntax tables.  For example, if the
+provided grammar is precise enough, @code{transpose-sexps} can correctly
+transpose the two arguments of a @code{+} operator, taking into account
+the precedence rules of the language.
+
+Calling `smie-setup' is also sufficient to make TAB indentation work in
+the expected way, extends @code{blink-matching-paren} to apply to
+elements like @code{begin...end}, and provides some commands that you
+can bind in the major mode keymap.
+
address@hidden Command smie-close-block
+This command closes the most recently opened (and not yet closed) block.
address@hidden deffn
+
address@hidden Command smie-down-list &optional arg
+This command is like @code{down-list} but it also pays attention to
+nesting of tokens other than parentheses, such as @code{begin...end}.
address@hidden deffn
+
address@hidden Operator Precedence Grammars
address@hidden Operator Precedence Grammars
+
+SMIE's precedence grammars simply give to each token a pair of
+precedences: the left-precedence and the right-precedence.  We say
address@hidden < T2} if the right-precedence of token @code{T1} is less than
+the left-precedence of token @code{T2}.  A good way to read this
address@hidden<} is as a kind of parenthesis: if we find @code{... T1 something
+T2 ...}  then that should be parsed as @code{... T1 (something T2 ...}
+rather than as @code{... T1 something) T2 ...}.  The latter
+interpretation would be the case if we had @code{T1 > T2}.  If we have
address@hidden = T2}, it means that token T2 follows token T1 in the same
+syntactic construction, so typically we have @code{"begin" = "end"}.
+Such pairs of precedences are sufficient to express left-associativity
+or right-associativity of infix operators, nesting of tokens like
+parentheses and many other cases.
+
address@hidden ¡Let's leave this undocumented to leave it more open for change!
address@hidden @defvar smie-grammar
address@hidden The value of this variable is an alist specifying the left and 
right
address@hidden precedence of each token.  It is meant to be initialized by 
using one of
address@hidden the functions below.
address@hidden @end defvar
+
address@hidden smie-prec2->grammar table
+This function takes a @emph{prec2} grammar @var{table} and returns an
+alist suitable for use in @code{smie-setup}.  The @emph{prec2}
address@hidden is itself meant to be built by one of the functions below.
address@hidden defun
+
address@hidden smie-merge-prec2s &rest tables
+This function takes several @emph{prec2} @var{tables} and merges them
+into a new @emph{prec2} table.
address@hidden defun
+
address@hidden smie-precs->prec2 precs
+This function builds a @emph{prec2} table from a table of precedences
address@hidden  @var{precs} should be a list, sorted by precedence (for
+example @code{"+"} will come before @code{"*"}), of elements of the form
address@hidden(@var{assoc} @var{op} ...)}, where each @var{op} is a token that
+acts as an operator; @var{assoc} is their associativity, which can be
+either @code{left}, @code{right}, @code{assoc}, or @code{nonassoc}.
+All operators in a given element share the same precedence level
+and associativity.
address@hidden defun
+
address@hidden smie-bnf->prec2 bnf &rest resolvers
+This function lets you specify the grammar using a BNF notation.
+It accepts a @var{bnf} description of the grammar along with a set of
+conflict resolution rules @var{resolvers}, and
+returns a @emph{prec2} table.
+
address@hidden is a list of nonterminal definitions of the form
address@hidden(@var{nonterm} @var{rhs1} @var{rhs2} ...)} where each @var{rhs}
+is a (non-empty) list of terminals (aka tokens) or non-terminals.
+
+Not all grammars are accepted:
address@hidden
address@hidden
+An @var{rhs} cannot be an empty list (an empty list is never needed,
+since SMIE allows all non-terminals to match the empty string anyway).
address@hidden
+An @var{rhs} cannot have 2 consecutive non-terminals: each pair of
+non-terminals needs to be separated by a terminal (aka token).
+This is a fundamental limitation of operator precedence grammars.
address@hidden itemize
+
+Additionally, conflicts can occur:
address@hidden
address@hidden
+The returned @emph{prec2} table holds constraints between pairs of tokens, and
+for any given pair only one constraint can be present: T1 < T2,
+T1 = T2, or T1 > T2.
address@hidden
+A token can be an @code{opener} (something similar to an open-paren),
+a @code{closer} (like a close-paren), or @code{neither} of the two
+(e.g. an infix operator, or an inner token like @code{"else"}).
address@hidden itemize
+
+Precedence conflicts can be resolved via @var{resolvers}, which
+is a list of @emph{precs} tables (see @code{smie-precs->prec2}): for
+each precedence conflict, if those @code{precs} tables
+specify a particular constraint, then the conflict is resolved by using
+this constraint instead, else a conflict is reported and one of the
+conflicting constraints is picked arbitrarily and the others are
+simply ignored.
address@hidden defun
+
address@hidden SMIE Grammar
address@hidden Defining the Grammar of a Language
+
+The usual way to define the SMIE grammar of a language is by
+defining a new global variable that holds the precedence table by
+giving a set of BNF rules.
+For example, the grammar definition for a small Pascal-like language
+could look like:
address@hidden
address@hidden
+(require 'smie)
+(defvar sample-smie-grammar
+  (smie-prec2->grammar
+   (smie-bnf->prec2
address@hidden group
address@hidden
+    '((id)
+      (inst ("begin" insts "end")
+            ("if" exp "then" inst "else" inst)
+            (id ":=" exp)
+            (exp))
+      (insts (insts ";" insts) (inst))
+      (exp (exp "+" exp)
+           (exp "*" exp)
+           ("(" exps ")"))
+      (exps (exps "," exps) (exp)))
address@hidden group
address@hidden
+    '((assoc ";"))
+    '((assoc ","))
+    '((assoc "+") (assoc "*")))))
address@hidden group
address@hidden example
+
address@hidden
+A few things to note:
+
address@hidden
address@hidden
+The above grammar does not explicitly mention the syntax of function
+calls: SMIE will automatically allow any sequence of sexps, such as
+identifiers, balanced parentheses, or @code{begin ... end} blocks
+to appear anywhere anyway.
address@hidden
+The grammar category @code{id} has no right hand side: this does not
+mean that it can match only the empty string, since as mentioned any
+sequence of sexps can appear anywhere anyway.
address@hidden
+Because non terminals cannot appear consecutively in the BNF grammar, it
+is difficult to correctly handle tokens that act as terminators, so the
+above grammar treats @code{";"} as a statement @emph{separator} instead,
+which SMIE can handle very well.
address@hidden
+Separators used in sequences (such as @code{","} and @code{";"} above)
+are best defined with BNF rules such as @code{(foo (foo "separator" foo) ...)}
+which generate precedence conflicts which are then resolved by giving
+them an explicit @code{(assoc "separator")}.
address@hidden
+The @code{("(" exps ")")} rule was not needed to pair up parens, since
+SMIE will pair up any characters that are marked as having paren syntax
+in the syntax table.  What this rule does instead (together with the
+definition of @code{exps}) is to make it clear that @code{","} should
+not appear outside of parentheses.
address@hidden
+Rather than have a single @emph{precs} table to resolve conflicts, it is
+preferable to have several tables, so as to let the BNF part of the
+grammar specify relative precedences where possible.
address@hidden
+Unless there is a very good reason to prefer @code{left} or
address@hidden, it is usually preferable to mark operators as associative,
+using @code{assoc}.  For that reason @code{"+"} and @code{"*"} are
+defined above as @code{assoc}, although the language defines them
+formally as left associative.
address@hidden itemize
+
address@hidden SMIE Lexer
address@hidden Defining Tokens
+
+SMIE comes with a predefined lexical analyzer which uses syntax tables
+in the following way: any sequence of characters that have word or
+symbol syntax is considered a token, and so is any sequence of
+characters that have punctuation syntax.  This default lexer is
+often a good starting point but is rarely actually correct for any given
+language.  For example, it will consider @code{"2,+3"} to be composed
+of 3 tokens: @code{"2"}, @code{",+"}, and @code{"3"}.
+
+To describe the lexing rules of your language to SMIE, you need
+2 functions, one to fetch the next token, and another to fetch the
+previous token.  Those functions will usually first skip whitespace and
+comments and then look at the next chunk of text to see if it
+is a special token.  If so it should skip the token and
+return a description of this token.  Usually this is simply the string
+extracted from the buffer, but it can be anything you want.
+For example:
address@hidden
address@hidden
+(defvar sample-keywords-regexp
+  (regexp-opt '("+" "*" "," ";" ">" ">=" "<" "<=" ":=" "=")))
address@hidden group
address@hidden
+(defun sample-smie-forward-token ()
+  (forward-comment (point-max))
+  (cond
+   ((looking-at sample-keywords-regexp)
+    (goto-char (match-end 0))
+    (match-string-no-properties 0))
+   (t (buffer-substring-no-properties
+       (point)
+       (progn (skip-syntax-forward "w_")
+              (point))))))
address@hidden group
address@hidden
+(defun sample-smie-backward-token ()
+  (forward-comment (- (point)))
+  (cond
+   ((looking-back sample-keywords-regexp (- (point) 2) t)
+    (goto-char (match-beginning 0))
+    (match-string-no-properties 0))
+   (t (buffer-substring-no-properties
+       (point)
+       (progn (skip-syntax-backward "w_")
+              (point))))))
address@hidden group
address@hidden example
+
+Notice how those lexers return the empty string when in front of
+parentheses.  This is because SMIE automatically takes care of the
+parentheses defined in the syntax table.  More specifically if the lexer
+returns nil or an empty string, SMIE tries to handle the corresponding
+text as a sexp according to syntax tables.
+
address@hidden SMIE Tricks
address@hidden Living With a Weak Parser
+
+The parsing technique used by SMIE does not allow tokens to behave
+differently in different contexts.  For most programming languages, this
+manifests itself by precedence conflicts when converting the
+BNF grammar.
+
+Sometimes, those conflicts can be worked around by expressing the
+grammar slightly differently.  For example, for Modula-2 it might seem
+natural to have a BNF grammar that looks like this:
+
address@hidden
+  ...
+  (inst ("IF" exp "THEN" insts "ELSE" insts "END")
+        ("CASE" exp "OF" cases "END")
+        ...)
+  (cases (cases "|" cases) (caselabel ":" insts) ("ELSE" insts))
+  ...
address@hidden example
+
+But this will create conflicts for @code{"ELSE"}: on the one hand, the
+IF rule implies (among many other things) that @code{"ELSE" = "END"};
+but on the other hand, since @code{"ELSE"} appears within @code{cases},
+which appears left of @code{"END"}, we also have @code{"ELSE" > "END"}.
+We can solve the conflict either by using:
address@hidden
+  ...
+  (inst ("IF" exp "THEN" insts "ELSE" insts "END")
+        ("CASE" exp "OF" cases "END")
+        ("CASE" exp "OF" cases "ELSE" insts "END")
+        ...)
+  (cases (cases "|" cases) (caselabel ":" insts))
+  ...
address@hidden example
+or
address@hidden
+  ...
+  (inst ("IF" exp "THEN" else "END")
+        ("CASE" exp "OF" cases "END")
+        ...)
+  (else (insts "ELSE" insts))
+  (cases (cases "|" cases) (caselabel ":" insts) (else))
+  ...
address@hidden example
+
+Reworking the grammar to try and solve conflicts has its downsides, tho,
+because SMIE assumes that the grammar reflects the logical structure of
+the code, so it is preferable to keep the BNF closer to the intended
+abstract syntax tree.
+
+Other times, after careful consideration you may conclude that those
+conflicts are not serious and simply resolve them via the
address@hidden argument of @code{smie-bnf->prec2}.  Usually this is
+because the grammar is simply ambiguous: the conflict does not affect
+the set of programs described by the grammar, but only the way those
+programs are parsed.  This is typically the case for separators and
+associative infix operators, where you want to add a resolver like
address@hidden'((assoc "|"))}.  Another case where this can happen is for the
+classic @emph{dangling else} problem, where you will use @code{'((assoc
+"else" "then"))}.  It can also happen for cases where the conflict is
+real and cannot really be resolved, but it is unlikely to pose a problem
+in practice.
+
+Finally, in many cases some conflicts will remain despite all efforts to
+restructure the grammar.  Do not despair: while the parser cannot be
+made more clever, you can make the lexer as smart as you want.  So, the
+solution is then to look at the tokens involved in the conflict and to
+split one of those tokens into 2 (or more) different tokens.  E.g. if
+the grammar needs to distinguish between two incompatible uses of the
+token @code{"begin"}, make the lexer return different tokens (say
address@hidden"begin-fun"} and @code{"begin-plain"}) depending on which kind of
address@hidden"begin"} it finds.  This pushes the work of distinguishing the
+different cases to the lexer, which will thus have to look at the
+surrounding text to find ad-hoc clues.
+
address@hidden SMIE Indentation
address@hidden Specifying Indentation Rules
+
+Based on the provided grammar, SMIE will be able to provide automatic
+indentation without any extra effort.  But in practice, this default
+indentation style will probably not be good enough.  You will want to
+tweak it in many different cases.
+
+SMIE indentation is based on the idea that indentation rules should be
+as local as possible.  To this end, it relies on the idea of
address@hidden indentation, which is the indentation that a particular
+program point would have if it were at the beginning of a line.
+Of course, if that program point is indeed at the beginning of a line,
+its virtual indentation is its current indentation.  But if not, then
+SMIE uses the indentation algorithm to compute the virtual indentation
+of that point.  Now in practice, the virtual indentation of a program
+point does not have to be identical to the indentation it would have if
+we inserted a newline before it.  To see how this works, the SMIE rule
+for indentation after a @address@hidden in C does not care whether the
address@hidden@{} is standing on a line of its own or is at the end of the
+preceding line.  Instead, these different cases are handled in the
+indentation rule that decides how to indent before a @address@hidden
+
+Another important concept is the notion of @emph{parent}: The
address@hidden of a token, is the head token of the nearest enclosing
+syntactic construct.  For example, the parent of an @code{else} is the
address@hidden to which it belongs, and the parent of an @code{if}, in turn,
+is the lead token of the surrounding construct.  The command
address@hidden jumps from a token to its parent, but there are
+some caveats: for @emph{openers} (tokens which start a construct, like
address@hidden), you need to start with point before the token, while for
+others you need to start with point after the token.
address@hidden stops with point before the parent token if that is
+the @emph{opener} of the token of interest, and otherwise it stops with
+point after the parent token.
+
+SMIE indentation rules are specified using a function that takes two
+arguments @var{method} and @var{arg} where the meaning of @var{arg} and the
+expected return value depend on @var{method}.
+
address@hidden can be:
address@hidden
address@hidden
address@hidden:after}, in which case @var{arg} is a token and the function
+should return the @var{offset} to use for indentation after @var{arg}.
address@hidden
address@hidden:before}, in which case @var{arg} is a token and the function
+should return the @var{offset} to use to indent @var{arg} itself.
address@hidden
address@hidden:elem}, in which case the function should return either the offset
+to use to indent function arguments (if @var{arg} is the symbol
address@hidden) or the basic indentation step (if @var{arg} is the symbol
address@hidden).
address@hidden
address@hidden:list-intro}, in which case @var{arg} is a token and the function
+should return address@hidden if the token is followed by a list of
+expressions (not separated by any token) rather than an expression.
address@hidden itemize
+
+When @var{arg} is a token, the function is called with point just before
+that token.  A return value of nil always means to fallback on the
+default behavior, so the function should return nil for arguments it
+does not expect.
+
address@hidden can be:
address@hidden
address@hidden
address@hidden: use the default indentation rule.
address@hidden
address@hidden(column . @var{column})}: indent to column @var{column}.
address@hidden
address@hidden: offset by @var{number}, relative to a base token which is
+the current token for @code{:after} and its parent for @code{:before}.
address@hidden itemize
+
address@hidden SMIE Indentation Helpers
address@hidden Helper Functions for Indentation Rules
+
+SMIE provides various functions designed specifically for use in the
+indentation rules function (several of those functions break if used in
+another context).  These functions all start with the prefix
address@hidden
+
address@hidden smie-rule-bolp
+Return address@hidden if the current token is the first on the line.
address@hidden defun
+
address@hidden smie-rule-hanging-p
+Return address@hidden if the current token is @emph{hanging}.
+A token is @emph{hanging} if it is the last token on the line
+and if it is preceded by other tokens: a lone token on a line is not
+hanging.
address@hidden defun
+
address@hidden smie-rule-next-p &rest tokens
+Return address@hidden if the next token is among @var{tokens}.
address@hidden defun
+
address@hidden smie-rule-prev-p &rest tokens
+Return address@hidden if the previous token is among @var{tokens}.
address@hidden defun
+
address@hidden smie-rule-parent-p &rest parents
+Return address@hidden if the current token's parent is among @var{parents}.
address@hidden defun
+
address@hidden smie-rule-sibling-p
+Return non-nil if the current token's parent is actually a sibling.
+This is the case for example when the parent of a @code{","} is just the
+previous @code{","}.
address@hidden defun
+
address@hidden smie-rule-parent &optional offset
+Return the proper offset to align the current token with the parent.
+If address@hidden, @var{offset} should be an integer giving an
+additional offset to apply.
address@hidden defun
+
address@hidden smie-rule-separator method
+Indent current token as a @emph{separator}.
+
+By @emph{separator}, we mean here a token whose sole purpose is to
+separate various elements within some enclosing syntactic construct, and
+which does not have any semantic significance in itself (i.e. it would
+typically not exist as a node in an abstract syntax tree).
+
+Such a token is expected to have an associative syntax and be closely
+tied to its syntactic parent.  Typical examples are @code{","} in lists
+of arguments (enclosed inside parentheses), or @code{";"} in sequences
+of instructions (enclosed in a @address@hidden@}} or @code{begin...end}
+block).
+
address@hidden should be the method name that was passed to
+`smie-rules-function'.
address@hidden defun
+
address@hidden SMIE Indentation Example
address@hidden Sample Indentation Rules
+
+Here is an example of an indentation function:
+
address@hidden
+(defun sample-smie-rules (kind token)
+  (pcase (cons kind token)
+    (`(:elem . basic) sample-indent-basic)
+    (`(,_ . ",") (smie-rule-separator kind))
+    (`(:after . ":=") sample-indent-basic)
+    (`(:before . ,(or `"begin" `"(" `"@{")))
+     (if (smie-rule-hanging-p) (smie-rule-parent)))
+    (`(:before . "if")
+     (and (not (smie-rule-bolp)) (smie-rule-prev-p "else")
+          (smie-rule-parent)))))
address@hidden example
+
address@hidden
+A few things to note:
+
address@hidden
address@hidden
+The first case indicates the basic indentation increment to use.
+If @code{sample-indent-basic} is nil, then SMIE uses the global
+setting @code{smie-indent-basic}.  The major mode could have set
address@hidden buffer-locally instead, but that
+is discouraged.
+
address@hidden
+The rule for the token @code{","} make SMIE try to be more clever when
+the comma separator is placed at the beginning of lines.  It tries to
+outdent the separator so as to align the code after the comma; for
+example:
+
address@hidden
+x = longfunctionname (
+        arg1
+      , arg2
+    );
address@hidden example
+
address@hidden
+The rule for indentation after @code{":="} exists because otherwise
+SMIE would treat @code{":="} as an infix operator and would align the
+right argument with the left one.
+
address@hidden
+The rule for indentation before @code{"begin"} is an example of the use
+of virtual indentation:  This rule is used only when @code{"begin"} is
+hanging, which can happen only when @code{"begin"} is not at the
+beginning of a line.  So this is not used when indenting
address@hidden"begin"} itself but only when indenting something relative to this
address@hidden"begin"}.  Concretely, this rule changes the indentation from:
+
address@hidden
+    if x > 0 then begin
+            dosomething(x);
+        end
address@hidden example
+to
address@hidden
+    if x > 0 then begin
+        dosomething(x);
+    end
address@hidden example
+
address@hidden
+The rule for indentation before @code{"if"} is similar to the one for
address@hidden"begin"}, but where the purpose is to treat @code{"else if"}
+as a single unit, so as to align a sequence of tests rather than indent
+each test further to the right.  This function does this only in the
+case where the @code{"if"} is not placed on a separate line, hence the
address@hidden test.
+
+If we know that the @code{"else"} is always aligned with its @code{"if"}
+and is always at the beginning of a line, we can use a more efficient
+rule:
address@hidden
+((equal token "if")
+ (and (not (smie-rule-bolp)) (smie-rule-prev-p "else")
+      (save-excursion
+        (sample-smie-backward-token)  ;Jump before the "else".
+        (cons 'column (current-column)))))
address@hidden example
+
+The advantage of this formulation is that it reuses the indentation of
+the previous @code{"else"}, rather than going all the way back to the
+first @code{"if"} of the sequence.
address@hidden itemize
+
 @node Desktop Save Mode
 @section Desktop Save Mode
 @cindex desktop save mode
@@ -3276,5 +3921,7 @@
 @end defvar
 
 @ignore
-   arch-tag: 4c7bff41-36e6-4da6-9e7f-9b9289e27c8e
+   Local Variables:
+   fill-column: 72
+   End:
 @end ignore

=== modified file 'doc/lispref/processes.texi'
--- a/doc/lispref/processes.texi        2010-08-25 05:23:47 +0000
+++ b/doc/lispref/processes.texi        2010-12-13 15:27:36 +0000
@@ -195,10 +195,18 @@
 @end example
 @end defun
 
address@hidden quoting and unquoting shell command line
-  The following two functions are useful for creating shell commands
-from individual argument strings, and taking shell command lines apart
-into individual arguments.
address@hidden quoting and unquoting command-line arguments
address@hidden minibuffer input, and command-line arguments
address@hidden @code{call-process}, command-line arguments from minibuffer
address@hidden @code{start-process}, command-line arguments from minibuffer
+  The following two functions are useful for combining a list of
+individual command-line argument strings into a single string, and
+taking a string apart into a list of individual command-line
+arguments.  These functions are mainly intended to be used for
+converting user input in the minibuffer, a Lisp string, into a list of
+string arguments to be passed to @code{call-process} or
address@hidden, or for the converting such lists of arguments in
+a single Lisp string to be presented in the minibuffer or echo area.
 
 @defun split-string-and-unquote string &optional separators
 This function splits @var{string} into substrings at matches for the
@@ -210,7 +218,7 @@
 @code{"\\s-+"}, which is a regular expression that matches one or more
 characters with whitespace syntax (@pxref{Syntax Class Table}).
 
-This function performs two types of quoting: enclosing a whole string
+This function supports two types of quoting: enclosing a whole string
 in double quotes @code{"@dots{}"}, and quoting individual characters
 with a backslash escape @samp{\}.  The latter is also used in Lisp
 strings, so this function can handle those as well.
@@ -226,9 +234,8 @@
 The strings in @var{list-of-strings} that need quoting are those that
 include @var{separator} as their substring.  Quoting a string encloses
 it in double quotes @code{"@dots{}"}.  In the simplest case, if you
-are consing a shell command from the individual command-line
-arguments, every argument that includes embedded blanks will be
-quoted.
+are consing a command from the individual command-line arguments,
+every argument that includes embedded blanks will be quoted.
 @end defun
 
 @node Synchronous Processes

=== modified file 'doc/lispref/strings.texi'
--- a/doc/lispref/strings.texi  2010-11-21 18:07:47 +0000
+++ b/doc/lispref/strings.texi  2010-12-11 18:45:53 +0000
@@ -348,9 +348,9 @@
      @result{} ("o" "o" "o")
 @end example
 
-If you need to split a string that is a shell command, where
-individual arguments could be quoted, see @ref{Shell Arguments,
-split-string-and-unquote}.
+If you need to split a string into a list of individual command-line
+arguments suitable for @code{call-process} or @code{start-process},
+see @ref{Shell Arguments, split-string-and-unquote}.
 @end defun
 
 @defvar split-string-default-separators

=== modified file 'doc/lispref/text.texi'
--- a/doc/lispref/text.texi     2010-11-27 20:04:57 +0000
+++ b/doc/lispref/text.texi     2010-12-13 15:27:36 +0000
@@ -2203,11 +2203,11 @@
 @defvar indent-line-function
 This variable's value is the function to be used by @key{TAB} (and
 various commands) to indent the current line.  The command
address@hidden does no more than call this function.
address@hidden does little more than call this function.
 
 In Lisp mode, the value is the symbol @code{lisp-indent-line}; in C
 mode, @code{c-indent-line}; in Fortran mode, @code{fortran-indent-line}.
-The default value is @code{indent-relative}.
+The default value is @code{indent-relative}.  @xref{Auto-Indentation}.
 @end defvar
 
 @deffn Command indent-according-to-mode

=== modified file 'doc/misc/ChangeLog'
--- a/doc/misc/ChangeLog        2010-12-11 16:42:53 +0000
+++ b/doc/misc/ChangeLog        2010-12-13 15:27:36 +0000
@@ -1,3 +1,8 @@
+2010-12-13  Glenn Morris  <address@hidden>
+
+       * cl.texi (For Clauses): Small fixes for frames and windows.
+
+2010-12-13  Glenn Morris  <address@hidden>
 2010-12-11  Carsten Dominik  <address@hidden>
 
        * org.texi (Using capture): Document using prefix arguments for

=== modified file 'doc/misc/cl.texi'
--- a/doc/misc/cl.texi  2010-10-08 10:14:47 +0000
+++ b/doc/misc/cl.texi  2010-12-13 15:27:36 +0000
@@ -2494,15 +2494,18 @@
 @code{of} term may specify either a buffer or a string.
 
 @item for @var{var} being the frames
-This clause iterates over all frames, i.e., X window system windows
-open on Emacs files.  The
-clause @code{screens} is a synonym for @code{frames}.  The frames
-are visited in @code{next-frame} order starting from
address@hidden
+This clause iterates over all Emacs frames. The clause @code{screens} is
+a synonym for @code{frames}.  The frames are visited in
address@hidden order starting from @code{selected-frame}.
 
 @item for @var{var} being the windows [of @var{frame}]
 This clause iterates over the windows (in the Emacs sense) of
-the current frame, or of the specified @var{frame}.
+the current frame, or of the specified @var{frame}.  It visits windows
+in @code{next-window} order starting from @code{selected-window}
+(or @code{frame-selected-window} if you specify @var{frame}).
+This clause treats the minibuffer window in the same way as
address@hidden does.  For greater flexibility, consider using
address@hidden instead.
 
 @item for @var{var} being the buffers
 This clause iterates over all buffers in Emacs.  It is equivalent
@@ -5322,6 +5325,3 @@
 
 @bye
 
address@hidden
-   arch-tag: b61e7200-3bfa-4a70-a9d3-095e152696f8
address@hidden ignore

=== modified file 'etc/ChangeLog'
--- a/etc/ChangeLog     2010-12-11 16:42:53 +0000
+++ b/etc/ChangeLog     2010-12-13 15:27:36 +0000
@@ -1,3 +1,8 @@
+2010-12-13  W. Martin Borgert <address@hidden>  (tiny change)
+
+       * schema/schemas.xml: Add DocBook (Bug#7491).
+
+2010-12-13  Ulrich Mueller  <address@hidden>
 2010-12-11  Carsten Dominik  <address@hidden>
 
        * refcards/orgcard.tex: Cleanup.

=== modified file 'etc/schema/schemas.xml'
--- a/etc/schema/schemas.xml    2010-11-05 19:30:18 +0000
+++ b/etc/schema/schemas.xml    2010-12-13 15:27:36 +0000
@@ -22,6 +22,7 @@
   <uri pattern="*.html" typeId="XHTML"/>
   <uri pattern="*.rng" typeId="RELAX NG"/>
   <uri pattern="*.rdf" typeId="RDF"/>
+  <uri pattern="*.dbk" typeId="DocBook"/>
 
   <namespace ns="http://www.w3.org/1999/XSL/Transform"; typeId="XSLT"/>
   <namespace ns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"; typeId="RDF"/>

=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2010-12-12 16:53:24 +0000
+++ b/lisp/ChangeLog    2010-12-13 15:27:36 +0000
@@ -1,3 +1,137 @@
+2010-12-13  Eli Zaretskii  <address@hidden>
+
+       * subr.el (posn-col-row): Evaluate header-line-format in the
+       context of the POSITION window's buffer.
+
+2010-12-13  Glenn Morris  <address@hidden>
+
+       * subr.el (member-ignore-case, run-mode-hooks, insert-for-yank-1)
+       (with-silent-modifications): Doc fixes.
+
+2010-12-13  Michael Albinus  <address@hidden>
+
+       * net/tramp.el (tramp-action-password, tramp-process-actions):
+       Revert patch from 2010-12-08.  Use `save-restriction'.
+
+2010-12-13  Stephen Berman  <address@hidden>
+
+       * calendar/diary-lib.el (diary-list-sexp-entries):
+       Handle case of no newline at end of file.  (Bug#7536)
+
+2010-12-13  Glenn Morris  <address@hidden>
+
+       * mail/smtpmail.el (smtpmail-send-it): Revert previous change.
+
+2010-12-13  Michael Albinus  <address@hidden>
+
+       * net/tramp.el (tramp-action-password): Delete region, do not narrow.
+       (tramp-process-actions): Do not widen.
+       * net/tramp-sh.el (tramp-sh-handle-start-file-process):
+       Protect buffer-modified value.  (Bug#7557)
+
+2010-12-13   Jan Moringen  <address@hidden>
+
+       * log-edit.el (log-edit-changelog-entries):
+       Regexp quote filename.  (Bug#7505)
+
+2010-12-13  Tom Breton  <address@hidden>
+
+       * cus-edit.el (custom-save-all):
+       Bind print-length and print-level to nil.  (Bug#7581)
+
+2010-12-13  Glenn Morris  <address@hidden>
+
+       * mouse.el (mouse-menu-major-mode-map, mouse-menu-bar-map):
+       Run hooks to update menu contents.  (Bug#7586)
+
+       * mail/smtpmail.el (smtpmail-send-it): Avoid colons in the queued
+       file names, for the sake of MS Windows.  (Bug#7588)
+
+2010-12-13  Stefan Monnier  <address@hidden>
+
+       * diff-mode.el (diff-refine-hunk): Make it work when the hunk contains
+       empty lines without a leading space.
+
+2010-12-13  Leo  <address@hidden>
+
+       * dired-aux.el (dired-do-redisplay): Postpone dired-after-readin-hook
+       while mapping over marks (Bug#6810).
+
+2010-12-13  Chong Yidong  <address@hidden>
+
+       * image-dired.el (image-dired-db-file)
+       (image-dired-temp-image-file, image-dired-gallery-dir)
+       (image-dired-temp-rotate-image-file): Set default values relative
+       to image-dired-dir (Bug#7518).
+
+2010-12-13  Lawrence Mitchell  <address@hidden>
+
+       * format.el (format-decode-run-method): Pass args FROM and TO, not
+       point-min and point-max, to shell-command-on-region (Bug#7488).
+
+2010-12-13  Jan Djärv  <address@hidden>
+
+       * frame.el (blink-cursor-mode): Make default t for ns.
+
+2010-12-13  Bob Rogers  <address@hidden>
+
+       * vc-dir.el (vc-dir-query-replace-regexp): Doc fix (Bug#7501).
+
+2010-12-13  Chong Yidong  <address@hidden>
+
+       * comint.el (comint-dynamic-list-input-ring)
+       (comint-dynamic-complete-filename)
+       (comint-replace-by-expanded-filename)
+       (comint-dynamic-simple-complete)
+       (comint-dynamic-list-filename-completions)
+       (comint-dynamic-list-completions): Doc fix (Bug#7499).
+
+       * subr.el (posn-x-y, posn-object-x-y, posn-object-width-height):
+       Doc fix (Bug#7471).
+
+2010-12-13  Martin Rudalics  <address@hidden>
+
+       * dired.el (dired-pop-to-buffer): Bind pop-up-frames to nil
+       (Bug#7533).
+
+2010-12-13  W. Martin Borgert <address@hidden>  (tiny change)
+
+       * files.el (auto-mode-alist): Handle .dbk (DocBook) with xml-mode.
+       (Bug#7491).
+
+2010-12-13  Eli Zaretskii  <address@hidden>
+
+       * files.el (file-relative-name): Handle UNC file names on
+       DOS/Windows.  (Bug#4674)
+
+2010-12-13  Daiki Ueno  <address@hidden>
+
+       * epg.el (epg-digest-algorithm-alist): Replace "RMD160" with
+       "RIPEMD160" (Bug#7490).  Reported by Daniel Kahn Gillmor.
+       (epg-context-set-passphrase-callback): Mention that the callback
+       is not called when used with GnuPG 2.x.
+
+2010-12-13  Glenn Morris  <address@hidden>
+
+       * ps-print.el (ps-line-lengths-internal, ps-nb-pages):
+       Ensure ps-footer-font-size-internal is initialized.
+       Call ps-get-page-dimensions before trying to use ps-font-for-text.
+
+2010-12-13  Kenichi Handa  <address@hidden>
+
+       * mail/rmailmm.el (rmail-mime-parse): Call rmail-mime-process
+       within condition-case.
+       (rmail-show-mime): Don't use condition-case.
+       (rmail-search-mime-message): New function.
+       (rmail-search-mime-message-function): Set to
+       rmail-search-mime-message.
+
+2010-12-13  Leo  <address@hidden>
+
+       * ido.el (ido-common-initialization): New function.  (bug#3274)
+       (ido-mode): Use it.
+       (ido-completing-read): Call it.
+
 2010-12-12  Karl Fogel  <address@hidden>
 
        * bookmark.el (bookmark-name-from-full-record): Rename back to
@@ -437,17 +571,15 @@
        (rmail-mime-save): Handle the case that the button's `data' is a
        MIME entity.
        (rmail-mime-insert-text): New function.
-       (rmail-mime-insert-image): Handle the case that DATA is a MIME
-       entity.
+       (rmail-mime-insert-image): Handle the case that DATA is a MIME entity.
        (rmail-mime-bulk-handler): Just call rmail-mime-insert-bulk.
        (rmail-mime-insert-bulk): New function mostly copied from the old
        rmail-mime-bulk-handler.
-       (rmail-mime-multipart-handler): Just call
-       rmail-mime-process-multipart.
-       (rmail-mime-process-multipart): New funciton mostly copied from
+       (rmail-mime-multipart-handler): Just call rmail-mime-process-multipart.
+       (rmail-mime-process-multipart): New function mostly copied from
        the old rmail-mime-multipart-handler.
        (rmail-mime-show): Just call rmail-mime-process.
-       (rmail-mime-process): New funciton mostly copied from the old
+       (rmail-mime-process): New function mostly copied from the old
        rmail-mime-show.
        (rmail-mime-insert-multipart, rmail-mime-parse)
        (rmail-mime-insert, rmail-show-mime)
@@ -5911,7 +6043,7 @@
 2010-07-20  Michael R. Mauger  <address@hidden>
 
        * progmodes/sql.el: Version 2.3.
-       (sql-connection-alist): Changed keys from symbols to strings;
+       (sql-connection-alist): Change keys from symbols to strings;
        enhanced the widget definition.
        (sql-mode-menu): Add submenu to select connections.
        (sql-interactive-mode-menu): Add "Save Connection" item.

=== modified file 'lisp/calendar/diary-lib.el'
--- a/lisp/calendar/diary-lib.el        2010-11-26 03:22:49 +0000
+++ b/lisp/calendar/diary-lib.el        2010-12-13 15:27:36 +0000
@@ -1764,7 +1764,7 @@
         (forward-line 1)
         (while (looking-at "[ \t]")
           (forward-line 1))
-        (backward-char 1)
+        (if (bolp) (backward-char 1))
         (setq entry (buffer-substring-no-properties entry-start (point))))
       (setq diary-entry (diary-sexp-entry sexp entry date)
             literal entry               ; before evaluation

=== modified file 'lisp/comint.el'
--- a/lisp/comint.el    2010-12-10 03:36:46 +0000
+++ b/lisp/comint.el    2010-12-13 15:27:36 +0000
@@ -1009,7 +1009,7 @@
     (choose-completion-string completion buffer)))
 
 (defun comint-dynamic-list-input-ring ()
-  "List in help buffer the buffer's input history."
+  "Display a list of recent inputs entered into the current buffer."
   (interactive)
   (if (or (not (ring-p comint-input-ring))
          (ring-empty-p comint-input-ring))
@@ -3003,7 +3003,7 @@
 This function is similar to `comint-replace-by-expanded-filename', except that
 it won't change parts of the filename already entered in the buffer; it just
 adds completion characters to the end of the filename.  A completions listing
-may be shown in a help buffer if completion is ambiguous.
+may be shown in a separate buffer if completion is ambiguous.
 
 Completion is dependent on the value of `comint-completion-addsuffix',
 `comint-completion-recexact' and `comint-completion-fignore', and the timing of
@@ -3090,11 +3090,11 @@
 
 (defun comint-replace-by-expanded-filename ()
   "Dynamically expand and complete the filename at point.
-Replace the filename with an expanded, canonicalized and completed replacement.
-\"Expanded\" means environment variables (e.g., $HOME) and `~'s are replaced
-with the corresponding directories.  \"Canonicalized\" means `..'  and `.' are
-removed, and the filename is made absolute instead of relative.  For expansion
-see `expand-file-name' and `substitute-in-file-name'.  For completion see
+Replace the filename with an expanded, canonicalized and
+completed replacement, i.e. substituting environment
+variables (e.g. $HOME), `~'s, `..', and `.', and making the
+filename absolute.  For expansion see `expand-file-name' and
+`substitute-in-file-name'.  For completion see
 `comint-dynamic-complete-filename'."
   (interactive)
   (let ((filename (comint-match-partial-filename)))
@@ -3105,15 +3105,16 @@
 
 (defun comint-dynamic-simple-complete (stub candidates)
   "Dynamically complete STUB from CANDIDATES list.
-This function inserts completion characters at point by completing STUB from
-the strings in CANDIDATES.  A completions listing may be shown in a help buffer
-if completion is ambiguous.
+This function inserts completion characters at point by
+completing STUB from the strings in CANDIDATES.  If completion is
+ambiguous, possibly show a completions listing in a separate
+buffer.
 
-Returns nil if no completion was inserted.
-Returns `sole' if completed with the only completion match.
-Returns `shortest' if completed with the shortest of the completion matches.
-Returns `partial' if completed as far as possible with the completion matches.
-Returns `listed' if a completion listing was shown.
+Return nil if no completion was inserted.
+Return `sole' if completed with the only completion match.
+Return `shortest' if completed with the shortest match.
+Return `partial' if completed as far as possible.
+Return `listed' if a completion listing was shown.
 
 See also `comint-dynamic-complete-filename'."
   (let* ((completion-ignore-case (memq system-type '(ms-dos windows-nt 
cygwin)))
@@ -3161,7 +3162,7 @@
 
 
 (defun comint-dynamic-list-filename-completions ()
-  "List in help buffer possible completions of the filename at point."
+  "Display a list of possible completions for the filename at point."
   (interactive)
   (let* ((completion-ignore-case read-file-name-completion-ignore-case)
         ;; If we bind this, it breaks remote directory tracking in rlogin.el.
@@ -3190,9 +3191,9 @@
 (defvar comint-dynamic-list-completions-config nil)
 
 (defun comint-dynamic-list-completions (completions &optional common-substring)
-  "List in help buffer sorted COMPLETIONS.
+  "Display a list of sorted COMPLETIONS.
 The meaning of COMMON-SUBSTRING is the same as in `display-completion-list'.
-Typing SPC flushes the help buffer."
+Typing SPC flushes the completions buffer."
   (let ((window (get-buffer-window "*Completions*" 0)))
     (setq completions (sort completions 'string-lessp))
     (if (and (eq last-command this-command)

=== modified file 'lisp/cus-edit.el'
--- a/lisp/cus-edit.el  2010-10-17 00:00:34 +0000
+++ b/lisp/cus-edit.el  2010-12-13 15:27:36 +0000
@@ -4426,7 +4426,9 @@
 
       (unless (eq major-mode 'emacs-lisp-mode)
        (emacs-lisp-mode))
-      (let ((inhibit-read-only t))
+      (let ((inhibit-read-only t)
+           (print-length nil)
+           (print-level nil))
        (custom-save-variables)
        (custom-save-faces))
       (let ((file-precious-flag t))

=== modified file 'lisp/dired-aux.el'
--- a/lisp/dired-aux.el 2010-11-09 05:33:07 +0000
+++ b/lisp/dired-aux.el 2010-12-13 15:27:36 +0000
@@ -1019,10 +1019,14 @@
     ;; message much faster than making dired-map-over-marks show progress
     (dired-uncache
      (if (consp dired-directory) (car dired-directory) dired-directory))
-    (dired-map-over-marks (let ((fname (dired-get-filename)))
+    (dired-map-over-marks (let ((fname (dired-get-filename))
+                               ;; Postphone readin hook till we map
+                               ;; over all marked files (Bug#6810).
+                               (dired-after-readin-hook nil))
                            (message "Redisplaying... %s" fname)
                            (dired-update-file-line fname))
                          arg)
+    (run-hooks 'dired-after-readin-hook)
     (dired-move-to-filename)
     (message "Redisplaying...done")))
 

=== modified file 'lisp/dired.el'
--- a/lisp/dired.el     2010-12-04 22:10:12 +0000
+++ b/lisp/dired.el     2010-12-13 15:27:36 +0000
@@ -2775,7 +2775,8 @@
                    ;; that's possible.  (Bug#1806)
                    (split-window-vertically))
               ;; Otherwise, try to split WINDOW sensibly.
-              (split-window-sensibly window)))))
+              (split-window-sensibly window))))
+       pop-up-frames)
     (pop-to-buffer (get-buffer-create buf)))
   ;; If dired-shrink-to-fit is t, make its window fit its contents.
   (when dired-shrink-to-fit
@@ -3557,7 +3558,7 @@
 ;;;;;;  dired-run-shell-command dired-do-shell-command 
dired-do-async-shell-command
 ;;;;;;  dired-clean-directory dired-do-print dired-do-touch dired-do-chown
 ;;;;;;  dired-do-chgrp dired-do-chmod dired-compare-directories 
dired-backup-diff
-;;;;;;  dired-diff) "dired-aux" "dired-aux.el" 
"1628b7a7d379fb4da8ae4bf29faad4b5")
+;;;;;;  dired-diff) "dired-aux" "dired-aux.el" 
"2e8658304f56098052e312d01c8763a2")
 ;;; Generated autoloads from dired-aux.el
 
 (autoload 'dired-diff "dired-aux" "\

=== modified file 'lisp/files.el'
--- a/lisp/files.el     2010-12-11 02:48:23 +0000
+++ b/lisp/files.el     2010-12-13 15:27:36 +0000
@@ -2337,6 +2337,7 @@
      ("\\.oak\\'" . scheme-mode)
      ("\\.sgml?\\'" . sgml-mode)
      ("\\.x[ms]l\\'" . xml-mode)
+     ("\\.dbk\\'" . xml-mode)
      ("\\.dtd\\'" . sgml-mode)
      ("\\.ds\\(ss\\)?l\\'" . dsssl-mode)
      ("\\.js\\'" . js-mode)            ; javascript-mode would be better
@@ -4167,11 +4168,29 @@
           (dremote (file-remote-p directory)))
       (if ;; Conditions for separate trees
          (or
-          ;; Test for different drives on DOS/Windows
+          ;; Test for different filesystems on DOS/Windows
           (and
            ;; Should `cygwin' really be included here?  --stef
            (memq system-type '(ms-dos cygwin windows-nt))
-           (not (eq t (compare-strings filename 0 2 directory 0 2))))
+           (or
+            ;; Test for different drive letters
+            (not (eq t (compare-strings filename 0 2 directory 0 2)))
+            ;; Test for UNCs on different servers
+            (not (eq t (compare-strings
+                        (progn
+                          (if (string-match "\\`//\\([^:/]+\\)/" filename)
+                              (match-string 1 filename)
+                            ;; Windows file names cannot have ? in
+                            ;; them, so use that to detect when
+                            ;; neither FILENAME nor DIRECTORY is a
+                            ;; UNC.
+                            "?"))
+                        0 nil
+                        (progn
+                          (if (string-match "\\`//\\([^:/]+\\)/" directory)
+                              (match-string 1 directory)
+                            "?"))
+                        0 nil t)))))
           ;; Test for different remote file system identification
           (not (equal fremote dremote)))
          filename

=== modified file 'lisp/format.el'
--- a/lisp/format.el    2010-08-29 16:17:13 +0000
+++ b/lisp/format.el    2010-12-13 15:27:36 +0000
@@ -181,8 +181,7 @@
        ;; We should perhaps go via a temporary buffer and copy it
        ;; back, in case of errors.
        (if (and (zerop (save-window-excursion
-                         (shell-command-on-region (point-min) (point-max)
-                                                  method t t
+                         (shell-command-on-region from to method t t
                                                   error-buff)))
                 ;; gzip gives zero exit status with bad args, for instance.
                 (zerop (with-current-buffer error-buff

=== modified file 'lisp/frame.el'
--- a/lisp/frame.el     2010-11-13 18:34:02 +0000
+++ b/lisp/frame.el     2010-12-13 15:27:36 +0000
@@ -1545,7 +1545,7 @@
   :init-value (not (or noninteractive
                       no-blinking-cursor
                       (eq system-type 'ms-dos)
-                      (not (memq window-system '(x w32)))))
+                      (not (memq window-system '(x w32 ns)))))
   :initialize 'custom-initialize-delay
   :group 'cursor
   :global t

=== modified file 'lisp/ido.el'
--- a/lisp/ido.el       2010-09-16 22:32:54 +0000
+++ b/lisp/ido.el       2010-12-13 15:27:36 +0000
@@ -1467,6 +1467,11 @@
   ;; ido kill emacs hook
   (ido-save-history))
 
+(defun ido-common-initialization ()
+  (ido-init-completion-maps)
+  (add-hook 'minibuffer-setup-hook 'ido-minibuffer-setup)
+  (add-hook 'choose-completion-string-functions 'ido-choose-completion-string))
+
 (define-minor-mode ido-everywhere
   "Toggle using ido speed-ups everywhere file and directory names are read.
 With ARG, turn ido speed-up on if arg is positive, off otherwise."
@@ -1510,12 +1515,9 @@
         (t nil)))
 
   (ido-everywhere (if ido-everywhere 1 -1))
-  (when ido-mode
-    (ido-init-completion-maps))
 
   (when ido-mode
-    (add-hook 'minibuffer-setup-hook 'ido-minibuffer-setup)
-    (add-hook 'choose-completion-string-functions 
'ido-choose-completion-string)
+    (ido-common-initialization)
     (ido-load-history)
 
     (add-hook 'kill-emacs-hook 'ido-kill-emacs-hook)
@@ -4759,6 +4761,8 @@
        (ido-directory-too-big nil)
        (ido-context-switch-command 'ignore)
        (ido-choice-list choices))
+    ;; Initialize ido before invoking ido-read-internal
+    (ido-common-initialization)
     (ido-read-internal 'list prompt hist def require-match initial-input)))
 
 (defun ido-unload-function ()

=== modified file 'lisp/image-dired.el'
--- a/lisp/image-dired.el       2010-05-28 19:18:47 +0000
+++ b/lisp/image-dired.el       2010-12-13 15:27:36 +0000
@@ -187,19 +187,19 @@
   :group 'image-dired)
 
 (defcustom image-dired-db-file
-  (locate-user-emacs-file "image-dired/.image-dired_db")
+  (expand-file-name ".image-dired_db" image-dired-dir)
   "Database file where file names and their associated tags are stored."
   :type 'string
   :group 'image-dired)
 
 (defcustom image-dired-temp-image-file
-  (locate-user-emacs-file "image-dired/.image-dired_temp")
+  (expand-file-name ".image-dired_temp" image-dired-dir)
   "Name of temporary image file used by various commands."
   :type 'string
   :group 'image-dired)
 
 (defcustom image-dired-gallery-dir
-  (locate-user-emacs-file "image-dired/.image-dired_gallery")
+  (expand-file-name ".image-dired_gallery" image-dired-dir)
   "Directory to store generated gallery html pages.
 This path needs to be \"shared\" to the public so that it can access
 the index.html page that image-dired creates."
@@ -344,7 +344,7 @@
   :group 'image-dired)
 
 (defcustom image-dired-temp-rotate-image-file
-  (locate-user-emacs-file "image-dired/.image-dired_rotate_temp")
+  (expand-file-name ".image-dired_rotate_temp" image-dired-dir)
   "Temporary file for rotate operations."
   :type 'string
   :group 'image-dired)

=== modified file 'lisp/mail/rmail.el'
--- a/lisp/mail/rmail.el        2010-11-30 17:01:18 +0000
+++ b/lisp/mail/rmail.el        2010-12-13 15:27:36 +0000
@@ -4289,7 +4289,7 @@
 
 ;;;***
 
-;;;### (autoloads (rmail-mime) "rmailmm" "rmailmm.el" 
"ec0bed149baed671125f623e5b012f6f")
+;;;### (autoloads (rmail-mime) "rmailmm" "rmailmm.el" 
"b1ce015fd919b54cc7b1d0b2155489f9")
 ;;; Generated autoloads from rmailmm.el
 
 (autoload 'rmail-mime "rmailmm" "\
@@ -4380,7 +4380,7 @@
 
 ;;;### (autoloads (rmail-summary-by-senders rmail-summary-by-topic
 ;;;;;;  rmail-summary-by-regexp rmail-summary-by-recipients 
rmail-summary-by-labels
-;;;;;;  rmail-summary) "rmailsum" "rmailsum.el" 
"666a5db1021cdcba6e68a18a553d65f1")
+;;;;;;  rmail-summary) "rmailsum" "rmailsum.el" 
"d855683972baef7111d4508dffbb54b6")
 ;;; Generated autoloads from rmailsum.el
 
 (autoload 'rmail-summary "rmailsum" "\

=== modified file 'lisp/mail/rmailmm.el'
--- a/lisp/mail/rmailmm.el      2010-11-27 20:04:57 +0000
+++ b/lisp/mail/rmailmm.el      2010-12-13 15:27:36 +0000
@@ -691,7 +691,9 @@
 The value is a MIME-entiy object (see `rmail-mime-enty-new')."
   (save-excursion
     (goto-char (point-min))
-    (rmail-mime-process nil t)))
+    (condition-case nil
+       (rmail-mime-process nil t)
+      (error nil))))
 
 (defun rmail-mime-insert (entity &optional content-type disposition)
   "Insert a MIME-entity ENTITY in the current buffer.
@@ -744,30 +746,31 @@
         message type disposition encoding))
 
 (defun rmail-show-mime ()
-  (let ((mbox-buf rmail-buffer))
-    (condition-case nil
-       (let ((entity (rmail-mime-parse)))
-         (with-current-buffer rmail-view-buffer
-           (let ((inhibit-read-only t)
-                 (rmail-buffer mbox-buf))
-             (erase-buffer)
-             (rmail-mime-insert entity))))
-      (error
-       ;; Decoding failed.  Insert the original message body as is.
-       (let ((region (with-current-buffer mbox-buf
-                      (goto-char (point-min))
-                      (re-search-forward "^$" nil t)
-                      (forward-line 1)
-                      (cons (point) (point-max)))))
-        (with-current-buffer rmail-view-buffer
-          (let ((inhibit-read-only t))
-            (erase-buffer)
-            (insert-buffer-substring mbox-buf (car region) (cdr region))))
-        (message "MIME decoding failed"))))))
+  "Function to set in `rmail-show-mime-function' (which see)."
+  (let ((mbox-buf rmail-buffer)
+       (entity (rmail-mime-parse)))
+    (if entity
+       (with-current-buffer rmail-view-buffer
+         (let ((inhibit-read-only t)
+               (rmail-buffer mbox-buf))
+           (erase-buffer)
+           (rmail-mime-insert entity)))
+      ;; Decoding failed.  Insert the original message body as is.
+      (let ((region (with-current-buffer mbox-buf
+                     (goto-char (point-min))
+                     (re-search-forward "^$" nil t)
+                     (forward-line 1)
+                     (cons (point) (point-max)))))
+       (with-current-buffer rmail-view-buffer
+         (let ((inhibit-read-only t))
+           (erase-buffer)
+           (insert-buffer-substring mbox-buf (car region) (cdr region))))
+       (message "MIME decoding failed")))))
 
 (setq rmail-show-mime-function 'rmail-show-mime)
 
 (defun rmail-insert-mime-forwarded-message (forward-buffer)
+  "Function to set in `rmail-insert-mime-forwarded-message-function' (which 
see)."
   (let ((mbox-buf (with-current-buffer forward-buffer rmail-view-buffer)))
     (save-restriction
       (narrow-to-region (point) (point))
@@ -777,6 +780,7 @@
       'rmail-insert-mime-forwarded-message)
 
 (defun rmail-insert-mime-resent-message (forward-buffer)
+  "Function to set in `rmail-insert-mime-resent-message-function' (which see)."
   (insert-buffer-substring
    (with-current-buffer forward-buffer rmail-view-buffer))
   (goto-char (point-min))
@@ -787,6 +791,41 @@
 (setq rmail-insert-mime-resent-message-function
       'rmail-insert-mime-resent-message)
 
+(defun rmail-search-mime-message (msg regexp)
+  "Function to set in `rmail-search-mime-message-function' (which see)."
+  (save-restriction
+    (narrow-to-region (rmail-msgbeg msg) (rmail-msgend msg))
+    (let ((mbox-buf (current-buffer))
+         (header-end (save-excursion
+                       (re-search-forward "^$" nil 'move) (point)))
+         (body-end (point-max))
+         (entity (rmail-mime-parse)))
+      (or 
+       ;; At first, just search the headers.
+       (with-temp-buffer
+        (insert-buffer-substring mbox-buf nil header-end)
+        (rfc2047-decode-region (point-min) (point))
+        (goto-char (point-min))
+        (re-search-forward regexp nil t))
+       ;; Next, search the body.
+       (if (and entity
+               (let* ((content-type (rmail-mime-entity-type entity))
+                      (charset (cdr (assq 'charset (cdr content-type)))))
+                 (or (not (string-match "text/.*" (car content-type))) 
+                     (and charset
+                          (not (string= (downcase charset) "us-ascii"))))))
+          ;; Search the decoded MIME message.
+          (with-temp-buffer
+            (let ((rmail-buffer mbox-buf))
+              (rmail-mime-insert entity))
+            (goto-char (point-min))
+            (re-search-forward regexp nil t))
+        ;; Search the body without decoding.
+        (goto-char header-end)
+        (re-search-forward regexp nil t))))))
+
+(setq rmail-search-mime-message-function 'rmail-search-mime-message)
+
 (provide 'rmailmm)
 
 ;; Local Variables:

=== modified file 'lisp/mail/smtpmail.el'
--- a/lisp/mail/smtpmail.el     2010-01-13 08:35:10 +0000
+++ b/lisp/mail/smtpmail.el     2010-12-09 01:46:03 +0000
@@ -1007,5 +1007,4 @@
 
 (provide 'smtpmail)
 
-;; arch-tag: a76992df-6d71-43b7-9e72-4bacc6c05466
 ;;; smtpmail.el ends here

=== modified file 'lisp/mouse.el'
--- a/lisp/mouse.el     2010-11-09 20:07:10 +0000
+++ b/lisp/mouse.el     2010-12-13 15:27:36 +0000
@@ -185,6 +185,7 @@
     (minor-mode-menu-from-indicator indicator)))
 
 (defun mouse-menu-major-mode-map ()
+  (run-hooks 'activate-menubar-hook 'menu-bar-update-hook)
   (let* (;; Keymap from which to inherit; may be null.
         (ancestor (mouse-menu-non-singleton
                    (and (current-local-map)
@@ -217,6 +218,7 @@
   "Return a keymap equivalent to the menu bar.
 The contents are the items that would be in the menu bar whether or
 not it is actually displayed."
+  (run-hooks 'activate-menubar-hook 'menu-bar-update-hook)
   (let* ((local-menu (and (current-local-map)
                          (lookup-key (current-local-map) [menu-bar])))
         (global-menu (lookup-key global-map [menu-bar]))
@@ -2130,5 +2132,4 @@
 
 (provide 'mouse)
 
-;; arch-tag: 9a710ce1-914a-4923-9b81-697f7bf82ab3
 ;;; mouse.el ends here

=== modified file 'lisp/net/tramp-sh.el'
--- a/lisp/net/tramp-sh.el      2010-12-02 19:34:31 +0000
+++ b/lisp/net/tramp-sh.el      2010-12-13 15:27:36 +0000
@@ -2637,61 +2637,65 @@
 (defun tramp-sh-handle-start-file-process (name buffer program &rest args)
   "Like `start-file-process' for Tramp files."
   (with-parsed-tramp-file-name default-directory nil
-    (unwind-protect
-       ;; When PROGRAM is nil, we just provide a tty.
-       (let ((command
-              (when (stringp program)
-                (format "cd %s; exec %s"
-                        (tramp-shell-quote-argument localname)
-                        (mapconcat 'tramp-shell-quote-argument
-                                   (cons program args) " "))))
-             (tramp-process-connection-type
-              (or (null program) tramp-process-connection-type))
-             (name1 name)
-             (i 0))
-         (unless buffer
-           ;; BUFFER can be nil.  We use a temporary buffer.
-           (setq buffer (generate-new-buffer tramp-temp-buffer-name)))
-         (while (get-process name1)
-           ;; NAME must be unique as process name.
-           (setq i (1+ i)
-                 name1 (format "%s<%d>" name i)))
-         (setq name name1)
-         ;; Set the new process properties.
-         (tramp-set-connection-property v "process-name" name)
-         (tramp-set-connection-property v "process-buffer" buffer)
-         ;; Activate narrowing in order to save BUFFER contents.
-         ;; Clear also the modification time; otherwise we might be
-         ;; interrupted by `verify-visited-file-modtime'.
-         (with-current-buffer (tramp-get-connection-buffer v)
-           (clear-visited-file-modtime)
-           (narrow-to-region (point-max) (point-max)))
-         (if command
-             ;; Send the command.
-             (tramp-send-command v command nil t) ; nooutput
-           ;; Check, whether a pty is associated.
-           (tramp-maybe-open-connection v)
-           (unless (tramp-compat-process-get
-                    (tramp-get-connection-process v) 'remote-tty)
-             (tramp-error
-              v 'file-error "pty association is not supported for `%s'" name)))
-         (let ((p (tramp-get-connection-process v)))
-           ;; Set sentinel and query flag for this process.
-           (tramp-set-connection-property p "vector" v)
-           (set-process-sentinel p 'tramp-process-sentinel)
-           (tramp-compat-set-process-query-on-exit-flag p t)
-           ;; Return process.
-           p))
-      ;; Save exit.
-      (with-current-buffer (tramp-get-connection-buffer v)
-       (if (string-match tramp-temp-buffer-name (buffer-name))
-           (progn
-             (set-process-buffer (tramp-get-connection-process v) nil)
-             (kill-buffer (current-buffer)))
-         (widen)
-         (goto-char (point-max))))
-      (tramp-set-connection-property v "process-name" nil)
-      (tramp-set-connection-property v "process-buffer" nil))))
+    ;; When PROGRAM is nil, we just provide a tty.
+    (let ((command
+          (when (stringp program)
+            (format "cd %s; exec %s"
+                    (tramp-shell-quote-argument localname)
+                    (mapconcat 'tramp-shell-quote-argument
+                               (cons program args) " "))))
+         (tramp-process-connection-type
+          (or (null program) tramp-process-connection-type))
+         (bmp (and (buffer-live-p buffer) (buffer-modified-p buffer)))
+         (name1 name)
+         (i 0))
+      (unwind-protect
+         (save-excursion
+           (save-restriction
+             (unless buffer
+               ;; BUFFER can be nil.  We use a temporary buffer.
+               (setq buffer (generate-new-buffer tramp-temp-buffer-name)))
+             (while (get-process name1)
+               ;; NAME must be unique as process name.
+               (setq i (1+ i)
+                     name1 (format "%s<%d>" name i)))
+             (setq name name1)
+             ;; Set the new process properties.
+             (tramp-set-connection-property v "process-name" name)
+             (tramp-set-connection-property v "process-buffer" buffer)
+             ;; Activate narrowing in order to save BUFFER contents.
+             ;; Clear also the modification time; otherwise we might
+             ;; be interrupted by `verify-visited-file-modtime'.
+             (with-current-buffer (tramp-get-connection-buffer v)
+               (let ((buffer-undo-list t))
+                 (clear-visited-file-modtime)
+                 (narrow-to-region (point-max) (point-max))
+                 (if command
+                     ;; Send the command.
+                      (tramp-send-command v command nil t) ; nooutput
+                    ;; Check, whether a pty is associated.
+                    (tramp-maybe-open-connection v)
+                    (unless (tramp-compat-process-get
+                             (tramp-get-connection-process v) 'remote-tty)
+                      (tramp-error
+                      v 'file-error
+                      "pty association is not supported for `%s'" name)))))
+              (let ((p (tramp-get-connection-process v)))
+                ;; Set sentinel and query flag for this process.
+                (tramp-set-connection-property p "vector" v)
+                (set-process-sentinel p 'tramp-process-sentinel)
+                (tramp-compat-set-process-query-on-exit-flag p t)
+                ;; Return process.
+               p)))
+       ;; Save exit.
+       (with-current-buffer (tramp-get-connection-buffer v)
+         (if (string-match tramp-temp-buffer-name (buffer-name))
+             (progn
+               (set-process-buffer (tramp-get-connection-process v) nil)
+               (kill-buffer (current-buffer)))
+           (set-buffer-modified-p bmp)))
+       (tramp-set-connection-property v "process-name" nil)
+       (tramp-set-connection-property v "process-buffer" nil)))))
 
 (defun tramp-sh-handle-process-file
   (program &optional infile destination display &rest args)

=== modified file 'lisp/net/tramp.el'
--- a/lisp/net/tramp.el 2010-12-02 19:34:31 +0000
+++ b/lisp/net/tramp.el 2010-12-13 15:27:36 +0000
@@ -3077,26 +3077,27 @@
   (tramp-compat-with-temp-message ""
     ;; Enable auth-source and password-cache.
     (tramp-set-connection-property vec "first-password-request" t)
-    (let (exit)
-      (while (not exit)
-       (tramp-message proc 3 "Waiting for prompts from remote shell")
-       (setq exit
-             (catch 'tramp-action
-               (if timeout
-                   (with-timeout (timeout)
-                     (tramp-process-one-action proc vec actions))
-                 (tramp-process-one-action proc vec actions)))))
-      (with-current-buffer (tramp-get-connection-buffer vec)
-       (widen)
-       (tramp-message vec 6 "\n%s" (buffer-string)))
-      (unless (eq exit 'ok)
-       (tramp-clear-passwd vec)
-       (tramp-error-with-buffer
-        nil vec 'file-error
-        (cond
-         ((eq exit 'permission-denied) "Permission denied")
-         ((eq exit 'process-died) "Process died")
-         (t "Login failed")))))))
+    (save-restriction
+      (let (exit)
+       (while (not exit)
+         (tramp-message proc 3 "Waiting for prompts from remote shell")
+         (setq exit
+               (catch 'tramp-action
+                 (if timeout
+                     (with-timeout (timeout)
+                       (tramp-process-one-action proc vec actions))
+                   (tramp-process-one-action proc vec actions)))))
+       (with-current-buffer (tramp-get-connection-buffer vec)
+         (widen)
+         (tramp-message vec 6 "\n%s" (buffer-string)))
+       (unless (eq exit 'ok)
+         (tramp-clear-passwd vec)
+         (tramp-error-with-buffer
+          nil vec 'file-error
+          (cond
+           ((eq exit 'permission-denied) "Permission denied")
+           ((eq exit 'process-died) "Process died")
+           (t "Login failed"))))))))
 
 :;; Utility functions:
 

=== modified file 'lisp/ps-print.el'
--- a/lisp/ps-print.el  2010-10-22 04:03:55 +0000
+++ b/lisp/ps-print.el  2010-12-13 15:27:36 +0000
@@ -4328,14 +4328,17 @@
         (ps-header-font-size-internal
          (or ps-header-font-size-internal
              (ps-get-font-size 'ps-header-font-size)))
+        (ps-footer-font-size-internal
+         (or ps-footer-font-size-internal
+             (ps-get-font-size 'ps-footer-font-size)))
         (ps-header-title-font-size-internal
          (or ps-header-title-font-size-internal
              (ps-get-font-size 'ps-header-title-font-size)))
         (buf (get-buffer-create "*Line-lengths*"))
         (ifs ps-font-size-internal)    ; initial font size
-        (icw (ps-avg-char-width 'ps-font-for-text)) ; initial character width
         (print-width (progn (ps-get-page-dimensions)
                             ps-print-width))
+        (icw (ps-avg-char-width 'ps-font-for-text)) ; initial character width
         (ps-setup (ps-setup))          ; setup for the current buffer
         (fs-min 5)                     ; minimum font size
         cw-min                         ; minimum character width
@@ -4375,6 +4378,9 @@
         (ps-header-font-size-internal
          (or ps-header-font-size-internal
              (ps-get-font-size 'ps-header-font-size)))
+        (ps-footer-font-size-internal
+         (or ps-footer-font-size-internal
+             (ps-get-font-size 'ps-footer-font-size)))
         (ps-header-title-font-size-internal
          (or ps-header-title-font-size-internal
              (ps-get-font-size 'ps-header-title-font-size)))
@@ -4384,9 +4390,9 @@
         (buf (get-buffer-create "*Nb-Pages*"))
         (ils ps-line-spacing-internal) ; initial line spacing
         (ifs ps-font-size-internal)    ; initial font size
-        (ilh (ps-line-height 'ps-font-for-text)) ; initial line height
         (page-height (progn (ps-get-page-dimensions)
                             ps-print-height))
+        (ilh (ps-line-height 'ps-font-for-text)) ; initial line height
         (ps-setup (ps-setup))          ; setup for the current buffer
         (fs-min 4)                     ; minimum font size
         lh-min                         ; minimum line height

=== modified file 'lisp/subr.el'
--- a/lisp/subr.el      2010-12-03 23:20:27 +0000
+++ b/lisp/subr.el      2010-12-13 15:27:36 +0000
@@ -417,7 +417,7 @@
   (assoc-string key alist nil))
 
 (defun member-ignore-case (elt list)
-  "Like `member', but ignores differences in case and text representation.
+  "Like `member', but ignore differences in case and text representation.
 ELT must be a string.  Upper-case and lower-case letters are treated as equal.
 Unibyte strings are converted to multibyte for comparison.
 Non-strings in LIST are ignored."
@@ -915,8 +915,9 @@
 
 (defsubst posn-x-y (position)
   "Return the x and y coordinates in POSITION.
-POSITION should be a list of the form returned by the `event-start'
-and `event-end' functions."
+The return value has the form (X . Y), where X and Y are given in
+pixels.  POSITION should be a list of the form returned by
+`event-start' and `event-end'."
   (nth 2 position))
 
 (declare-function scroll-bar-scale "scroll-bar" (num-denom whole))
@@ -955,7 +956,9 @@
               (setq spacing 0)))
        (cons (/ (car pair) (frame-char-width frame))
              (- (/ (cdr pair) (+ (frame-char-height frame) spacing))
-                (if (null header-line-format) 0 1))))))))
+                (if (null (with-current-buffer (window-buffer window)
+                            header-line-format))
+                    0 1))))))))
 
 (defun posn-actual-col-row (position)
   "Return the actual column and row in POSITION, measured in characters.
@@ -996,14 +999,15 @@
 
 (defsubst posn-object-x-y (position)
   "Return the x and y coordinates relative to the object of POSITION.
-POSITION should be a list of the form returned by the `event-start'
-and `event-end' functions."
+The return value has the form (DX . DY), where DX and DY are
+given in pixels.  POSITION should be a list of the form returned
+by `event-start' and `event-end'."
   (nth 8 position))
 
 (defsubst posn-object-width-height (position)
   "Return the pixel width and height of the object of POSITION.
-POSITION should be a list of the form returned by the `event-start'
-and `event-end' functions."
+The return value has the form (WIDTH . HEIGHT).  POSITION should
+be a list of the form returned by `event-start' and `event-end'."
   (nth 9 position))
 
 
@@ -1355,9 +1359,8 @@
 
 (defun run-mode-hooks (&rest hooks)
   "Run mode hooks `delayed-mode-hooks' and HOOKS, or delay HOOKS.
-Execution is delayed if `delay-mode-hooks' is non-nil.
-If `delay-mode-hooks' is nil, run `after-change-major-mode-hook'
-after running the mode hooks.
+Execution is delayed if the variable `delay-mode-hooks' is non-nil.
+Otherwise, runs the mode hooks and then `after-change-major-mode-hook'.
 Major mode functions should use this instead of `run-hooks' when running their
 FOO-mode-hook."
   (if delay-mode-hooks
@@ -2458,7 +2461,7 @@
  `yank-rectangle', PARAM may be a list of strings to insert as a
  rectangle.
 If NOEXCLUDE is present and non-nil, the normal removal of the
- yank-excluded-properties is not performed; instead FUNCTION is
+ `yank-excluded-properties' is not performed; instead FUNCTION is
  responsible for removing those properties.  This may be necessary
  if FUNCTION adjusts point before or after inserting the object.
 If UNDO is present and non-nil, it is a function that will be called
@@ -3818,9 +3821,9 @@
 
 ;; The following statement ought to be in print.c, but `provide' can't
 ;; be used there.
+;; http://lists.gnu.org/archive/html/emacs-devel/2009-08/msg00236.html
 (when (hash-table-p (car (read-from-string
                          (prin1-to-string (make-hash-table)))))
   (provide 'hashtable-print-readable))
 
-;; arch-tag: f7e0e6e5-70aa-4897-ae72-7a3511ec40bc
 ;;; subr.el ends here

=== modified file 'lisp/url/ChangeLog'
--- a/lisp/url/ChangeLog        2010-11-20 22:25:56 +0000
+++ b/lisp/url/ChangeLog        2010-12-13 15:27:36 +0000
@@ -1,3 +1,8 @@
+2010-12-13  Chong Yidong  <address@hidden>
+
+       * url-cookie.el (url-cookie-retrieve): Handle null LOCALPART.
+       Suggested by Lennart Borgman (Bug#7543).
+
 2010-11-16  Lars Magne Ingebrigtsen  <address@hidden>
 
        * url-file.el (url-file-build-filename): Avoid interpreting
@@ -14,8 +19,8 @@
 
 2010-10-04  Lars Magne Ingebrigtsen  <address@hidden>
 
-       * url-http.el (url-http-wait-for-headers-change-function): Protect
-       against url-http-response-status for degenerate documents.
+       * url-http.el (url-http-wait-for-headers-change-function):
+       Protect against url-http-response-status for degenerate documents.
        (url-http-wait-for-headers-change-function): Revert previous
        change.  It lead to really slow loads.
 
@@ -31,7 +36,7 @@
 
 2010-10-03  Lars Magne Ingebrigtsen  <address@hidden>
 
-       * url-vars.el (url-mime-charset-string): Changed the default to
+       * url-vars.el (url-mime-charset-string): Change the default to
        nil to avoid sending 1171 bytes of not very useful data to the
        HTTP server every request.
 
@@ -119,8 +124,8 @@
 2010-07-01  Mark A. Hershberger  <address@hidden>
 
        * url-http.el (url-http-create-request): Add a CRLF on the end so
-       that POSTs with content to https urls work.  See
-       <https://bugs.launchpad.net/mediawiki-el/+bug/540759>
+       that POSTs with content to https urls work.
+       See <https://bugs.launchpad.net/mediawiki-el/+bug/540759>
 
 2010-06-22  Mark A. Hershberger  <address@hidden>
 
@@ -602,8 +607,8 @@
        * url-http.el (url-http-proxy): New variable.
        (url-http-create-request): Use it.  Don't use `url-proxy-object'.
        (url-http): Treat `url' argument as resource to download, and
-       dynamic variable `url-using-proxy' as proxy to use.  Set
-       `url-current-object' to actual URL, and `url-http-proxy' to proxy
+       dynamic variable `url-using-proxy' as proxy to use.
+       Set `url-current-object' to actual URL, and `url-http-proxy' to proxy
        used.
        (url-http-handle-cookies): Assume that `url-current-object' does
        not point to the proxy used.
@@ -619,24 +624,24 @@
        (url-proxy): Bind it instead of `proxy-object'.
 
        * url-http.el (url-http-create-request): Remove url argument, use
-       the buffer-local variable `url-http-target-url' instead.  Both
-       callers updated.  Simplify proxy handling.
+       the buffer-local variable `url-http-target-url' instead.
+       Both callers updated.  Simplify proxy handling.
        (url-http): Don't make proxy-object buffer local.
 
        * url.el (url-retrieve-internal): Bind url-proxy-object to nil.
 
 2006-11-26  Magnus Henoch  <address@hidden>
 
-       * url-http.el (url-http-wait-for-headers-change-function): Use
-       `when' instead of `if' when possible.
+       * url-http.el (url-http-wait-for-headers-change-function):
+       Use `when' instead of `if' when possible.
        (url-http): Define url-http-response-version.
        (url-http-parse-response): Set it.
        (url-http-parse-headers): Use it to determine keep-alive behavior.
 
 2006-11-23  Diane Murray  <address@hidden>  (tiny change)
 
-       * url-http.el (url-http-content-length-after-change-function): Use
-       `url-lazy-message'.
+       * url-http.el (url-http-content-length-after-change-function):
+       Use `url-lazy-message'.
 
        * url-util.el (url-display-percentage): Only show a message if
        `url-show-status' is non-nil.
@@ -1018,8 +1023,8 @@
        (url-cookie-generate-header-lines): Likewise.
        (url-cookie-handle-set-cookie): Likewise.
        (url-cookie-create): Expect :localpart instead of :path.
-       (url-cookie-localpart): Renamed from url-cookie-path.
-       (url-cookie-set-localpart): Renamed from url-cookie-set-path.
+       (url-cookie-localpart): Rename from url-cookie-path.
+       (url-cookie-set-localpart): Rename from url-cookie-set-path.
        (url-cookie-file): Doc fix.
        (url-cookie-p): Add doc string.
 
@@ -2236,7 +2241,7 @@
        message when we have to contact a host so the user always gets
        at least some feedback.
 
-       * lisp/url-expand.el (url-expander-remove-relative-links): Moved and
+       * lisp/url-expand.el (url-expander-remove-relative-links): Move and
        renamed function.
        (url-default-expander): Use it.
 

=== modified file 'lisp/url/url-cookie.el'
--- a/lisp/url/url-cookie.el    2010-10-01 14:49:14 +0000
+++ b/lisp/url/url-cookie.el    2010-12-13 15:27:36 +0000
@@ -198,7 +198,7 @@
     (and exp (> (float-time) (float-time (date-to-time exp))))))
 
 (defun url-cookie-retrieve (host &optional localpart secure)
-  "Retrieve all the netscape-style cookies for a specified HOST and LOCALPART."
+  "Retrieve all cookies for a specified HOST and LOCALPART."
   (let ((storage (if secure
                     (append url-cookie-secure-storage url-cookie-storage)
                   url-cookie-storage))
@@ -226,7 +226,8 @@
            (setq cur (car cookies)
                  cookies (cdr cookies)
                  localpart-match (url-cookie-localpart cur))
-           (if (and (if (stringp localpart-match)
+           (if (and (if (and (stringp localpart-match)
+                             (stringp localpart))
                         (string-match (concat "^" (regexp-quote
                                                    localpart-match))
                                       localpart)

=== modified file 'lisp/vc/diff-mode.el'
--- a/lisp/vc/diff-mode.el      2010-11-09 20:07:10 +0000
+++ b/lisp/vc/diff-mode.el      2010-12-13 15:27:36 +0000
@@ -1829,10 +1829,13 @@
   (eval-and-compile (require 'smerge-mode))
   (save-excursion
     (diff-beginning-of-hunk 'try-harder)
-    (let* ((style (diff-hunk-style))    ;Skips the hunk header as well.
+    (let* ((start (point))
+           (style (diff-hunk-style))    ;Skips the hunk header as well.
            (beg (point))
            (props '((diff-mode . fine) (face diff-refine-change)))
-           (end (progn (diff-end-of-hunk) (point))))
+           ;; Be careful to go back to `start' so diff-end-of-hunk gets
+           ;; to read the hunk header's line info.
+           (end (progn (goto-char start) (diff-end-of-hunk) (point))))
 
       (remove-overlays beg end 'diff-mode 'fine)
 

=== modified file 'lisp/vc/log-edit.el'
--- a/lisp/vc/log-edit.el       2010-11-27 20:04:57 +0000
+++ b/lisp/vc/log-edit.el       2010-12-13 15:27:36 +0000
@@ -774,7 +774,7 @@
                (setq pattern (file-name-nondirectory file)))
 
             (setq pattern (concat "\\(^\\|[^[:alnum:]]\\)"
-                                  pattern
+                                  (regexp-quote pattern)
                                   "\\($\\|[^[:alnum:]]\\)"))
 
            (let (texts

=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2010-12-11 15:41:04 +0000
+++ b/src/ChangeLog     2010-12-13 15:27:36 +0000
@@ -1,3 +1,58 @@
+2010-12-13  Eli Zaretskii  <address@hidden>
+
+       * fileio.c (Fexpand_file_name): Doc fix.  (Bug#7617)
+
+2010-12-13  Eli Zaretskii  <address@hidden>
+
+       * xdisp.c (string_pos_nchars_ahead, c_string_pos)
+       (face_before_or_after_it_pos, next_element_from_string)
+       (next_element_from_c_string, produce_stretch_glyph): Remove unused
+       calculations of maximum string length before calling
+       string_char_and_length and STRING_CHAR_AND_LENGTH.
+       (string_char_and_length): Update commentary: MAXLEN is no longer
+       needed.
+
+2010-12-13  Jan Djärv  <address@hidden>
+
+       * keyboard.c (kbd_buffer_get_event): Construct SAVE_SESSION_EVENT
+       as (Qsave_session arg).
+
+       * xsmfns.c (smc_interact_CB): Set arg to Qnil.
+       (smc_die_CB): Make an event with arg Qt.
+       (Fhandle_save_session): If event has Qt as argument,
+       call Fkill_emacs (Bug#7552).
+
+2010-12-13  Chong Yidong  <address@hidden>
+
+       * buffer.c (transient-mark-mode): Doc fix (Bug#7465).
+
+2010-12-13  Jan Djärv  <address@hidden>
+
+       * xsmfns.c (smc_die_CB): Call Fkill_emacs (Bug#7552).
+
+2010-12-13  Chong Yidong  <address@hidden>
+
+       * dispextern.h (struct it): New member overlay_strings_charpos.
+
+       * xdisp.c (next_overlay_string, load_overlay_strings): Record the
+       charpos where we computed n_overlay_strings.
+       (next_overlay_string): Load overlay strings at recorded position,
+       which may not be the same as the iterator's charpos (Bug#7016).
+
+2010-12-13  Chong Yidong  <address@hidden>
+
+       * xdisp.c (try_scrolling): Avoid infloop if the first line is
+       obscured due to a vscroll (Bug#7537).
+
+2010-12-13  Jan Djärv  <address@hidden>
+
+       * nsterm.h (FRAME_NS_TOOLBAR_HEIGHT): Rename to FRAME_TOOLBAR_HEIGHT.
+
+       * nsterm.m (x_set_window_size, windowWillResize, initFrameFromEmacs):
+       Use FRAME_TOOLBAR_HEIGHT.
+       (x_set_offset): Handle XNegative and YNegative in
+       f->size_hint_flags (Bug#7510).
+
 2010-12-11  Eli Zaretskii  <address@hidden>
 
        * w32fns.c (Fx_show_tip): Call try_window with last argument

=== modified file 'src/buffer.c'
--- a/src/buffer.c      2010-10-29 03:29:29 +0000
+++ b/src/buffer.c      2010-12-13 15:27:36 +0000
@@ -6106,15 +6106,17 @@
 The variable `highlight-nonselected-windows' controls whether to highlight
 all windows or just the selected window.
 
-If the value is `lambda', that enables Transient Mark mode temporarily.
-After any subsequent action that would normally deactivate the mark
-\(such as buffer modification), Transient Mark mode is turned off.
-
-If the value is (only . OLDVAL), that enables Transient Mark mode
-temporarily.  After any subsequent point motion command that is not
-shift-translated, or any other action that would normally deactivate
-the mark (such as buffer modification), the value of
-`transient-mark-mode' is set to OLDVAL.  */);
+Lisp programs may give this variable certain special values:
+
+- A value of `lambda' enables Transient Mark mode temporarily.
+  It is disabled again after any subsequent action that would
+  normally deactivate the mark (e.g. buffer modification).
+
+- A value of (only . OLDVAL) enables Transient Mark mode
+  temporarily.  After any subsequent point motion command that is
+  not shift-translated, or any other action that would normally
+  deactivate the mark (e.g. buffer modification), the value of
+  `transient-mark-mode' is set to OLDVAL.  */);
   Vtransient_mark_mode = Qnil;
 
   DEFVAR_LISP ("inhibit-read-only", &Vinhibit_read_only,

=== modified file 'src/config.in'
--- a/src/config.in     2010-12-04 19:50:39 +0000
+++ b/src/config.in     2010-12-13 15:27:36 +0000
@@ -1053,9 +1053,6 @@
 /* Define to `int' if <sys/types.h> does not define. */
 #undef pid_t
 
-/* Define to `unsigned int' if <sys/types.h> does not define. */
-#undef size_t
-
 /* Define to any substitute for sys_siglist. */
 #undef sys_siglist
 

=== modified file 'src/dispextern.h'
--- a/src/dispextern.h  2010-11-20 14:51:25 +0000
+++ b/src/dispextern.h  2010-12-13 15:27:36 +0000
@@ -2178,6 +2178,12 @@
      OVERLAY_STRING_CHUNK_SIZE.  */
   int n_overlay_strings;
 
+  /* The charpos where n_overlay_strings was calculated.  This should
+     be set at the same time as n_overlay_strings.  It is needed
+     because we show before-strings at the start of invisible text;
+     see handle_invisible_prop in xdisp.c.  */
+  int overlay_strings_charpos;
+
   /* Vector of overlays to process.  Overlay strings are processed
      OVERLAY_STRING_CHUNK_SIZE at a time.  */
 #define OVERLAY_STRING_CHUNK_SIZE 16

=== modified file 'src/fileio.c'
--- a/src/fileio.c      2010-12-08 03:45:45 +0000
+++ b/src/fileio.c      2010-12-13 15:27:36 +0000
@@ -786,6 +786,9 @@
 so are file name components followed by `..', along with the `..' itself;
 note that these simplifications are done without checking the resulting
 file names in the file system.
+Multiple consecutive slashes are collapsed into a single slash,
+except at the beginning of the file name when they are significant (e.g.,
+UNC file names on MS-Windows.)
 An initial `~/' expands to your home directory.
 An initial `~USER/' expands to USER's home directory.
 See also the function `substitute-in-file-name'.
@@ -793,7 +796,7 @@
 For technical reasons, this function can return correct but
 non-intuitive results for the root directory; for instance,
 \(expand-file-name ".." "/") returns "/..".  For this reason, use
-(directory-file-name (file-name-directory dirname)) to traverse a
+\(directory-file-name (file-name-directory dirname)) to traverse a
 filesystem tree, not (expand-file-name ".."  dirname).  */)
   (Lisp_Object name, Lisp_Object default_directory)
 {

=== modified file 'src/keyboard.c'
--- a/src/keyboard.c    2010-11-26 18:15:09 +0000
+++ b/src/keyboard.c    2010-12-13 15:27:36 +0000
@@ -4102,7 +4102,7 @@
 #endif
       else if (event->kind == SAVE_SESSION_EVENT)
         {
-          obj = Fcons (Qsave_session, Qnil);
+          obj = Fcons (Qsave_session, Fcons (event->arg, Qnil));
          kbd_fetch_ptr = event + 1;
         }
       /* Just discard these, by returning nil.

=== modified file 'src/nsterm.m'
--- a/src/nsterm.m      2010-12-03 10:54:44 +0000
+++ b/src/nsterm.m      2010-12-13 15:27:36 +0000
@@ -1106,16 +1106,31 @@
 
   f->left_pos = xoff;
   f->top_pos = yoff;
-#ifdef NS_IMPL_GNUSTEP
-  if (xoff < 100)
-    f->left_pos = 100;  /* don't overlap menu */
-#endif
 
   if (view != nil && (screen = [[view window] screen]))
-    [[view window] setFrameTopLeftPoint:
-        NSMakePoint (SCREENMAXBOUND (f->left_pos),
-                     SCREENMAXBOUND ([screen frame].size.height
-                                     - NS_TOP_POS (f)))];
+    {
+      f->left_pos = f->size_hint_flags & XNegative
+        ? [screen visibleFrame].size.width + f->left_pos - FRAME_PIXEL_WIDTH 
(f)
+        : f->left_pos;
+      /* We use visibleFrame here to take menu bar into account.
+        Ideally we should also adjust left/top with visibleFrame.offset.  */
+        
+      f->top_pos = f->size_hint_flags & YNegative
+        ? ([screen visibleFrame].size.height + f->top_pos
+           - FRAME_PIXEL_HEIGHT (f) - FRAME_NS_TITLEBAR_HEIGHT (f)
+           - FRAME_TOOLBAR_HEIGHT (f))
+        : f->top_pos;
+#ifdef NS_IMPL_GNUSTEP
+      if (f->left_pos < 100)
+        f->left_pos = 100;  /* don't overlap menu */
+#endif
+      [[view window] setFrameTopLeftPoint:
+                       NSMakePoint (SCREENMAXBOUND (f->left_pos),
+                                    SCREENMAXBOUND ([screen frame].size.height
+                                                    - NS_TOP_POS (f)))];
+      f->size_hint_flags &= ~(XNegative|YNegative);
+    }
+
   UNBLOCK_INPUT;
 }
 

=== modified file 'src/xdisp.c'
--- a/src/xdisp.c       2010-11-26 19:10:26 +0000
+++ b/src/xdisp.c       2010-12-13 15:27:36 +0000
@@ -1544,11 +1544,10 @@
 }
 
 
-/* Return the next character from STR which is MAXLEN bytes long.
-   Return in *LEN the length of the character.  This is like
-   STRING_CHAR_AND_LENGTH but never returns an invalid character.  If
-   we find one, we return a `?', but with the length of the invalid
-   character.  */
+/* Return the next character from STR.  Return in *LEN the length of
+   the character.  This is like STRING_CHAR_AND_LENGTH but never
+   returns an invalid character.  If we find one, we return a `?', but
+   with the length of the invalid character.  */
 
 static INLINE int
 string_char_and_length (const unsigned char *str, int *len)
@@ -1577,15 +1576,13 @@
 
   if (STRING_MULTIBYTE (string))
     {
-      EMACS_INT rest = SBYTES (string) - BYTEPOS (pos);
       const unsigned char *p = SDATA (string) + BYTEPOS (pos);
       int len;
 
       while (nchars--)
        {
          string_char_and_length (p, &len);
-         p += len, rest -= len;
-         xassert (rest >= 0);
+         p += len;
          CHARPOS (pos) += 1;
          BYTEPOS (pos) += len;
        }
@@ -1625,15 +1622,13 @@
 
   if (multibyte_p)
     {
-      EMACS_INT rest = strlen (s);
       int len;
 
       SET_TEXT_POS (pos, 0, 0);
       while (charpos--)
        {
          string_char_and_length (s, &len);
-         s += len, rest -= len;
-         xassert (rest >= 0);
+         s += len;
          CHARPOS (pos) += 1;
          BYTEPOS (pos) += len;
        }
@@ -4823,6 +4818,7 @@
                   && it->stop_charpos <= it->end_charpos));
       it->current.overlay_string_index = -1;
       it->n_overlay_strings = 0;
+      it->overlay_strings_charpos = -1;
 
       /* If we're at the end of the buffer, record that we have
         processed the overlay strings there already, so that
@@ -4835,11 +4831,13 @@
       /* There are more overlay strings to process.  If
         IT->current.overlay_string_index has advanced to a position
         where we must load IT->overlay_strings with more strings, do
-        it.  */
+        it.  We must load at the IT->overlay_strings_charpos where
+        IT->n_overlay_strings was originally computed; when invisible
+        text is present, this might not be IT_CHARPOS (Bug#7016).  */
       int i = it->current.overlay_string_index % OVERLAY_STRING_CHUNK_SIZE;
 
       if (it->current.overlay_string_index && i == 0)
-       load_overlay_strings (it, 0);
+       load_overlay_strings (it, it->overlay_strings_charpos);
 
       /* Initialize IT to deliver display elements from the overlay
          string.  */
@@ -5051,8 +5049,9 @@
   if (n > 1)
     qsort (entries, n, sizeof *entries, compare_overlay_entries);
 
-  /* Record the total number of strings to process.  */
+  /* Record number of overlay strings, and where we computed it.  */
   it->n_overlay_strings = n;
+  it->overlay_strings_charpos = charpos;
 
   /* IT->current.overlay_string_index is the number of overlay strings
      that have already been consumed by IT.  Copy some of the
@@ -13426,7 +13425,11 @@
 
       /* If cursor ends up on a partially visible line,
         treat that as being off the bottom of the screen.  */
-      if (! cursor_row_fully_visible_p (w, extra_scroll_margin_lines <= 1, 0))
+      if (! cursor_row_fully_visible_p (w, extra_scroll_margin_lines <= 1, 0)
+         /* It's possible that the cursor is on the first line of the
+            buffer, which is partially obscured due to a vscroll
+            (Bug#7537).  In that case, avoid looping forever . */
+         && extra_scroll_margin_lines < w->desired_matrix->nrows - 1)
        {
          clear_glyph_matrix (w->desired_matrix);
          ++extra_scroll_margin_lines;

=== modified file 'src/xsmfns.c'
--- a/src/xsmfns.c      2010-11-12 09:31:44 +0000
+++ b/src/xsmfns.c      2010-12-13 15:27:36 +0000
@@ -172,6 +172,7 @@
 {
   doing_interact = True;
   emacs_event.kind = SAVE_SESSION_EVENT;
+  emacs_event.arg = Qnil;
 }
 
 /* This is called when the session manager tells us to save ourselves.
@@ -308,8 +309,8 @@
 static void
 smc_die_CB (SmcConn smcConn, SmPointer clientData)
 {
-  SmcCloseConnection (smcConn, 0, 0);
-  ice_connection_closed ();
+  emacs_event.kind = SAVE_SESSION_EVENT;
+  emacs_event.arg = Qt;
 }
 
 /* We don't use the next two but they are mandatory, leave them empty.
@@ -522,9 +523,12 @@
 Do not call this function yourself. */)
   (Lisp_Object event)
 {
+  int kill_emacs = CONSP (event) && CONSP (XCDR (event))
+    && EQ (Qt, XCAR (XCDR (event)));
+
   /* Check doing_interact so that we don't do anything if someone called
      this at the wrong time. */
-  if (doing_interact)
+  if (doing_interact && ! kill_emacs)
     {
       Bool cancel_shutdown = False;
 
@@ -535,9 +539,20 @@
 
       doing_interact = False;
     }
+  else if (kill_emacs)
+    {
+      /* We should not do user interaction here, but it is not easy to
+         prevent.  Fix this in next version.  */
+      Fkill_emacs (Qnil);
 
+      /* This will not be reached, but we want kill-emacs-hook to be run.  */
+      SmcCloseConnection (smc_conn, 0, 0);
+      ice_connection_closed ();
+    }
+  
   return Qnil;
 }
+  
 
 
 /***********************************************************************


reply via email to

[Prev in Thread] Current Thread [Next in Thread]