changeset 107349:577361495f7d

from trunk
author Kenichi Handa <handa@m17n.org>
date Wed, 03 Mar 2010 15:04:00 +0900
parents 72a86cbe50bc (current diff) 6797d961af8b (diff)
children 9ce60f5ba0af
files
diffstat 16 files changed, 239 insertions(+), 156 deletions(-) [+]
line wrap: on
line diff
--- a/doc/emacs/ChangeLog	Tue Mar 02 13:54:04 2010 +0900
+++ b/doc/emacs/ChangeLog	Wed Mar 03 15:04:00 2010 +0900
@@ -1,3 +1,10 @@
+2010-03-02  Chong Yidong  <cyd@stupidchicken.com>
+
+	* frames.texi (Mouse Avoidance): Mention make-pointer-invisible.
+
+	* display.texi (Display Custom): Document make-pointer-invisible and
+	underline-minimum-offset.  Remove inverse-video.
+
 2010-02-21  Chong Yidong  <cyd@stupidchicken.com>
 
 	* frames.texi (Frame Commands): Note that the last ordinary frame can
--- a/doc/emacs/display.texi	Tue Mar 02 13:54:04 2010 +0900
+++ b/doc/emacs/display.texi	Wed Mar 03 15:04:00 2010 +0900
@@ -1278,10 +1278,6 @@
 @c the reason for that pxref is because an xref early in the
 @c ``echo area'' section leads here.
 
-@vindex inverse-video
-  If the variable @code{inverse-video} is non-@code{nil}, Emacs attempts
-to invert all the lines of the display from what they normally are.
-
 @vindex visible-bell
   If the variable @code{visible-bell} is non-@code{nil}, Emacs attempts
 to make the whole screen blink when it would normally make an audible bell
@@ -1296,35 +1292,51 @@
 
 @vindex baud-rate
   The variable @anchor{baud-rate}@code{baud-rate} holds the output
-speed of the terminal, as far as Emacs knows.  Setting this variable
-does not change the speed of actual data transmission, but the value
-is used for calculations.  On text-only terminals, it affects padding,
-and decisions about whether to scroll part of the screen or redraw it
-instead.  It also affects the behavior of incremental search.
-
-  On graphical displays, @code{baud-rate} is only used to determine
-how frequently to look for pending input during display updating.  A
+speed of the terminal.  Setting this variable does not change the
+speed of actual data transmission, but the value is used for
+calculations.  On text-only terminals, it affects padding, and
+decisions about whether to scroll part of the screen or redraw it
+instead.  It also affects the behavior of incremental search.  On
+graphical displays, @code{baud-rate} is only used to determine how
+frequently to look for pending input during display updating.  A
 higher value of @code{baud-rate} means that check for pending input
 will be done less frequently.
 
+@cindex mouse pointer
 @cindex hourglass pointer display
+@vindex display-hourglass
 @vindex hourglass-delay
-  On graphical displays, Emacs can optionally display the mouse pointer
-in a special shape to say that Emacs is busy.  To turn this feature on
-or off, customize the group @code{cursor}.  You can also control the
-amount of time Emacs must remain busy before the busy indicator is
-displayed, by setting the variable @code{hourglass-delay}.
+  On graphical displays, Emacs displays the mouse pointer as an
+hourglass if Emacs is busy.  To disable this feature, set the variable
+@code{display-hourglass} to @code{nil}.  The variable
+@code{hourglass-delay} determines the number of seconds of ``busy
+time'' before the hourglass is shown; the default is 1.
+
+@vindex make-pointer-invisible
+  If the mouse pointer lies inside an Emacs frame, Emacs makes it
+invisible each time you type a character to insert text, to prevent it
+from obscuring the text.  (To be precise, the hiding occurs when you
+type a ``self-inserting'' character.  @xref{Inserting Text}.)  Moving
+the mouse pointer makes it visible again.  To disable this feature,
+set the variable @code{make-pointer-invisible} to @code{nil}.
+
+@vindex underline-minimum-offset
+@vindex x-underline-at-descent-line
+  On graphical displays, the variable @code{underline-minimum-offset}
+determines the minimum distance between the baseline and underline, in
+pixels, for underlined text.  By default, the value is 1; increasing
+it may improve the legibility of underlined text for certain fonts.
+(However, Emacs will never draw the underline below the current line
+area.)  The variable @code{x-underline-at-descent-line} determines how
+to draw underlined text.  The default is @code{nil}, which means to
+draw it at the baseline level of the font; if you change it to
+@code{nil}, Emacs draws the underline at the same height as the font's
+descent line.
 
 @vindex overline-margin
-  On graphical displays, the variable @code{overline-margin} specifies
-the vertical position of an overline above the text, including the
-height of the overline itself, in pixels.  The default value is 2.
-
-@vindex x-underline-at-descent-line
-  On graphical displays, Emacs normally draws an underline at the
-baseline level of the font.  If @code{x-underline-at-descent-line} is
-non-@code{nil}, Emacs draws the underline at the same height as the
-font's descent line.
+  The variable @code{overline-margin} specifies the vertical position
+of an overline above the text, including the height of the overline
+itself, in pixels; the default is 2.
 
 @findex tty-suppress-bold-inverse-default-colors
   On some text-only terminals, bold face and inverse video together
--- a/doc/emacs/frames.texi	Tue Mar 02 13:54:04 2010 +0900
+++ b/doc/emacs/frames.texi	Wed Mar 03 15:04:00 2010 +0900
@@ -50,7 +50,7 @@
 * Tool Bars::           Enabling and disabling the tool bar.
 * Dialog Boxes::        Controlling use of dialog boxes.
 * Tooltips::            Displaying information at the current mouse position.
-* Mouse Avoidance::     Moving the mouse pointer out of the way.
+* Mouse Avoidance::     Preventing the mouse pointer from obscuring text.
 * Non-Window Terminals::  Multiple frames on terminals that show only one.
 * Text-Only Mouse::     Using the mouse in text-only terminals.
 @end menu
@@ -1072,12 +1072,20 @@
 @cindex avoiding mouse in the way of your typing
 @cindex mouse avoidance
 
+  On graphical terminals, the mouse pointer may obscure the text in
+the Emacs frame.  Emacs provides two methods to avoid this problem.
+
+@vindex make-pointer-invisible
+  Firstly, Emacs hides the mouse pointer each time you type a
+self-inserting character, if the pointer lies inside an Emacs frame;
+moving the mouse pointer makes it visible again.  To disable this
+feature, set the variable @code{make-pointer-invisible} to @code{nil}.
+
 @vindex mouse-avoidance-mode
-Mouse Avoidance mode keeps the mouse pointer away from point, to avoid
-obscuring text you want to edit.  Whenever it moves the mouse, it also
-raises the frame.  To use Mouse Avoidance mode, customize the variable
-@code{mouse-avoidance-mode}.  You can set this to various values to
-move the mouse in several ways:
+  Secondly, you can use Mouse Avoidance mode, a minor mode, to keep
+the mouse pointer away from point.  To use Mouse Avoidance mode,
+customize the variable @code{mouse-avoidance-mode}.  You can set this
+to various values to move the mouse in several ways:
 
 @table @code
 @item banish
@@ -1098,7 +1106,8 @@
 
 @findex mouse-avoidance-mode
 You can also use the command @kbd{M-x mouse-avoidance-mode} to enable
-the mode.
+the mode.  Whenever Mouse Avoidance mode moves the mouse, it also
+raises the frame.
 
 @node Non-Window Terminals
 @section Non-Window Terminals
--- a/doc/lispref/ChangeLog	Tue Mar 02 13:54:04 2010 +0900
+++ b/doc/lispref/ChangeLog	Wed Mar 03 15:04:00 2010 +0900
@@ -1,3 +1,8 @@
+2010-03-03  Glenn Morris  <rgm@gnu.org>
+
+	* numbers.texi (Integer Basics, Bitwise Operations):
+	* objects.texi (Integer Type): Update for integers now being 30-bit.
+
 2010-02-27  Chong Yidong  <cyd@stupidchicken.com>
 
 	* display.texi (Low-Level Font): Document :otf font-spec property.
--- a/doc/lispref/numbers.texi	Tue Mar 02 13:54:04 2010 +0900
+++ b/doc/lispref/numbers.texi	Wed Mar 03 15:04:00 2010 +0900
@@ -1,7 +1,8 @@
 @c -*-texinfo-*-
 @c This is part of the GNU Emacs Lisp Reference Manual.
 @c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2001,
-@c   2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010  Free Software Foundation, Inc.
+@c   2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+@c   Free Software Foundation, Inc.
 @c See the file elisp.texi for copying conditions.
 @setfilename ../../info/numbers
 @node Numbers, Strings and Characters, Lisp Data Types, Top
@@ -36,22 +37,22 @@
 @section Integer Basics
 
   The range of values for an integer depends on the machine.  The
-minimum range is @minus{}268435456 to 268435455 (29 bits; i.e.,
+minimum range is @minus{}536870912 to 536870911 (30 bits; i.e.,
 @ifnottex
--2**28
+-2**29
 @end ifnottex
 @tex
-@math{-2^{28}}
+@math{-2^{29}}
 @end tex
 to
 @ifnottex
-2**28 - 1),
+2**29 - 1),
 @end ifnottex
 @tex
-@math{2^{28}-1}),
+@math{2^{29}-1}),
 @end tex
 but some machines may provide a wider range.  Many examples in this
-chapter assume an integer has 29 bits.
+chapter assume an integer has 30 bits.
 @cindex overflow
 
   The Lisp reader reads an integer as a sequence of digits with optional
@@ -62,7 +63,7 @@
  1.              ; @r{The integer 1.}
 +1               ; @r{Also the integer 1.}
 -1               ; @r{The integer @minus{}1.}
- 536870913       ; @r{Also the integer 1, due to overflow.}
+ 1073741825      ; @r{Also the integer 1, due to overflow.}
  0               ; @r{The integer 0.}
 -0               ; @r{The integer 0.}
 @end example
@@ -93,10 +94,10 @@
 bitwise operators (@pxref{Bitwise Operations}), it is often helpful to
 view the numbers in their binary form.
 
-  In 29-bit binary, the decimal integer 5 looks like this:
+  In 30-bit binary, the decimal integer 5 looks like this:
 
 @example
-0 0000  0000 0000  0000 0000  0000 0101
+00 0000  0000 0000  0000 0000  0000 0101
 @end example
 
 @noindent
@@ -106,12 +107,12 @@
   The integer @minus{}1 looks like this:
 
 @example
-1 1111  1111 1111  1111 1111  1111 1111
+11 1111  1111 1111  1111 1111  1111 1111
 @end example
 
 @noindent
 @cindex two's complement
-@minus{}1 is represented as 29 ones.  (This is called @dfn{two's
+@minus{}1 is represented as 30 ones.  (This is called @dfn{two's
 complement} notation.)
 
   The negative integer, @minus{}5, is creating by subtracting 4 from
@@ -119,24 +120,24 @@
 @minus{}5 looks like this:
 
 @example
-1 1111  1111 1111  1111 1111  1111 1011
+11 1111  1111 1111  1111 1111  1111 1011
 @end example
 
-  In this implementation, the largest 29-bit binary integer value is
-268,435,455 in decimal.  In binary, it looks like this:
+  In this implementation, the largest 30-bit binary integer value is
+536,870,911 in decimal.  In binary, it looks like this:
 
 @example
-0 1111  1111 1111  1111 1111  1111 1111
+01 1111  1111 1111  1111 1111  1111 1111
 @end example
 
   Since the arithmetic functions do not check whether integers go
-outside their range, when you add 1 to 268,435,455, the value is the
-negative integer @minus{}268,435,456:
+outside their range, when you add 1 to 536,870,911, the value is the
+negative integer @minus{}536,870,912:
 
 @example
-(+ 1 268435455)
-     @result{} -268435456
-     @result{} 1 0000  0000 0000  0000 0000  0000 0000
+(+ 1 536870911)
+     @result{} -536870912
+     @result{} 10 0000  0000 0000  0000 0000  0000 0000
 @end example
 
   Many of the functions described in this chapter accept markers for
@@ -820,19 +821,19 @@
 The function @code{lsh}, like all Emacs Lisp arithmetic functions, does
 not check for overflow, so shifting left can discard significant bits
 and change the sign of the number.  For example, left shifting
-268,435,455 produces @minus{}2 on a 29-bit machine:
+536,870,911 produces @minus{}2 on a 30-bit machine:
 
 @example
-(lsh 268435455 1)          ; @r{left shift}
+(lsh 536870911 1)          ; @r{left shift}
      @result{} -2
 @end example
 
-In binary, in the 29-bit implementation, the argument looks like this:
+In binary, in the 30-bit implementation, the argument looks like this:
 
 @example
 @group
-;; @r{Decimal 268,435,455}
-0 1111  1111 1111  1111 1111  1111 1111
+;; @r{Decimal 536,870,911}
+01 1111  1111 1111  1111 1111  1111 1111
 @end group
 @end example
 
@@ -842,7 +843,7 @@
 @example
 @group
 ;; @r{Decimal @minus{}2}
-1 1111  1111 1111  1111 1111  1111 1110
+11 1111  1111 1111  1111 1111  1111 1110
 @end group
 @end example
 @end defun
@@ -865,9 +866,9 @@
 @group
 (ash -6 -1) @result{} -3
 ;; @r{Decimal @minus{}6 becomes decimal @minus{}3.}
-1 1111  1111 1111  1111 1111  1111 1010
+11 1111  1111 1111  1111 1111  1111 1010
      @result{}
-1 1111  1111 1111  1111 1111  1111 1101
+11 1111  1111 1111  1111 1111  1111 1101
 @end group
 @end example
 
@@ -876,11 +877,11 @@
 
 @example
 @group
-(lsh -6 -1) @result{} 268435453
-;; @r{Decimal @minus{}6 becomes decimal 268,435,453.}
-1 1111  1111 1111  1111 1111  1111 1010
+(lsh -6 -1) @result{} 536870909
+;; @r{Decimal @minus{}6 becomes decimal 536,870,909.}
+11 1111  1111 1111  1111 1111  1111 1010
      @result{}
-0 1111  1111 1111  1111 1111  1111 1101
+01 1111  1111 1111  1111 1111  1111 1101
 @end group
 @end example
 
@@ -890,34 +891,34 @@
 @c     with smallbook but not with regular book! --rjc 16mar92
 @smallexample
 @group
-                   ;  @r{             29-bit binary values}
+                   ;  @r{             30-bit binary values}
 
-(lsh 5 2)          ;   5  =  @r{0 0000  0000 0000  0000 0000  0000 0101}
-     @result{} 20         ;      =  @r{0 0000  0000 0000  0000 0000  0001 0100}
+(lsh 5 2)          ;   5  =  @r{00 0000  0000 0000  0000 0000  0000 0101}
+     @result{} 20         ;      =  @r{00 0000  0000 0000  0000 0000  0001 0100}
 @end group
 @group
 (ash 5 2)
      @result{} 20
-(lsh -5 2)         ;  -5  =  @r{1 1111  1111 1111  1111 1111  1111 1011}
-     @result{} -20        ;      =  @r{1 1111  1111 1111  1111 1111  1110 1100}
+(lsh -5 2)         ;  -5  =  @r{11 1111  1111 1111  1111 1111  1111 1011}
+     @result{} -20        ;      =  @r{11 1111  1111 1111  1111 1111  1110 1100}
 (ash -5 2)
      @result{} -20
 @end group
 @group
-(lsh 5 -2)         ;   5  =  @r{0 0000  0000 0000  0000 0000  0000 0101}
-     @result{} 1          ;      =  @r{0 0000  0000 0000  0000 0000  0000 0001}
+(lsh 5 -2)         ;   5  =  @r{00 0000  0000 0000  0000 0000  0000 0101}
+     @result{} 1          ;      =  @r{00 0000  0000 0000  0000 0000  0000 0001}
 @end group
 @group
 (ash 5 -2)
      @result{} 1
 @end group
 @group
-(lsh -5 -2)        ;  -5  =  @r{1 1111  1111 1111  1111 1111  1111 1011}
-     @result{} 134217726  ;      =  @r{0 0111  1111 1111  1111 1111  1111 1110}
+(lsh -5 -2)        ;  -5  =  @r{11 1111  1111 1111  1111 1111  1111 1011}
+     @result{} 268435454  ;      =  @r{00 0111  1111 1111  1111 1111  1111 1110}
 @end group
 @group
-(ash -5 -2)        ;  -5  =  @r{1 1111  1111 1111  1111 1111  1111 1011}
-     @result{} -2         ;      =  @r{1 1111  1111 1111  1111 1111  1111 1110}
+(ash -5 -2)        ;  -5  =  @r{11 1111  1111 1111  1111 1111  1111 1011}
+     @result{} -2         ;      =  @r{11 1111  1111 1111  1111 1111  1111 1110}
 @end group
 @end smallexample
 @end defun
@@ -952,23 +953,23 @@
 
 @smallexample
 @group
-                   ; @r{               29-bit binary values}
+                   ; @r{               30-bit binary values}
 
-(logand 14 13)     ; 14  =  @r{0 0000  0000 0000  0000 0000  0000 1110}
-                   ; 13  =  @r{0 0000  0000 0000  0000 0000  0000 1101}
-     @result{} 12         ; 12  =  @r{0 0000  0000 0000  0000 0000  0000 1100}
+(logand 14 13)     ; 14  =  @r{00 0000  0000 0000  0000 0000  0000 1110}
+                   ; 13  =  @r{00 0000  0000 0000  0000 0000  0000 1101}
+     @result{} 12         ; 12  =  @r{00 0000  0000 0000  0000 0000  0000 1100}
 @end group
 
 @group
-(logand 14 13 4)   ; 14  =  @r{0 0000  0000 0000  0000 0000  0000 1110}
-                   ; 13  =  @r{0 0000  0000 0000  0000 0000  0000 1101}
-                   ;  4  =  @r{0 0000  0000 0000  0000 0000  0000 0100}
-     @result{} 4          ;  4  =  @r{0 0000  0000 0000  0000 0000  0000 0100}
+(logand 14 13 4)   ; 14  =  @r{00 0000  0000 0000  0000 0000  0000 1110}
+                   ; 13  =  @r{00 0000  0000 0000  0000 0000  0000 1101}
+                   ;  4  =  @r{00 0000  0000 0000  0000 0000  0000 0100}
+     @result{} 4          ;  4  =  @r{00 0000  0000 0000  0000 0000  0000 0100}
 @end group
 
 @group
 (logand)
-     @result{} -1         ; -1  =  @r{1 1111  1111 1111  1111 1111  1111 1111}
+     @result{} -1         ; -1  =  @r{11 1111  1111 1111  1111 1111  1111 1111}
 @end group
 @end smallexample
 @end defun
@@ -982,18 +983,18 @@
 
 @smallexample
 @group
-                   ; @r{              29-bit binary values}
+                   ; @r{              30-bit binary values}
 
-(logior 12 5)      ; 12  =  @r{0 0000  0000 0000  0000 0000  0000 1100}
-                   ;  5  =  @r{0 0000  0000 0000  0000 0000  0000 0101}
-     @result{} 13         ; 13  =  @r{0 0000  0000 0000  0000 0000  0000 1101}
+(logior 12 5)      ; 12  =  @r{00 0000  0000 0000  0000 0000  0000 1100}
+                   ;  5  =  @r{00 0000  0000 0000  0000 0000  0000 0101}
+     @result{} 13         ; 13  =  @r{00 0000  0000 0000  0000 0000  0000 1101}
 @end group
 
 @group
-(logior 12 5 7)    ; 12  =  @r{0 0000  0000 0000  0000 0000  0000 1100}
-                   ;  5  =  @r{0 0000  0000 0000  0000 0000  0000 0101}
-                   ;  7  =  @r{0 0000  0000 0000  0000 0000  0000 0111}
-     @result{} 15         ; 15  =  @r{0 0000  0000 0000  0000 0000  0000 1111}
+(logior 12 5 7)    ; 12  =  @r{00 0000  0000 0000  0000 0000  0000 1100}
+                   ;  5  =  @r{00 0000  0000 0000  0000 0000  0000 0101}
+                   ;  7  =  @r{00 0000  0000 0000  0000 0000  0000 0111}
+     @result{} 15         ; 15  =  @r{00 0000  0000 0000  0000 0000  0000 1111}
 @end group
 @end smallexample
 @end defun
@@ -1007,18 +1008,18 @@
 
 @smallexample
 @group
-                   ; @r{              29-bit binary values}
+                   ; @r{              30-bit binary values}
 
-(logxor 12 5)      ; 12  =  @r{0 0000  0000 0000  0000 0000  0000 1100}
-                   ;  5  =  @r{0 0000  0000 0000  0000 0000  0000 0101}
-     @result{} 9          ;  9  =  @r{0 0000  0000 0000  0000 0000  0000 1001}
+(logxor 12 5)      ; 12  =  @r{00 0000  0000 0000  0000 0000  0000 1100}
+                   ;  5  =  @r{00 0000  0000 0000  0000 0000  0000 0101}
+     @result{} 9          ;  9  =  @r{00 0000  0000 0000  0000 0000  0000 1001}
 @end group
 
 @group
-(logxor 12 5 7)    ; 12  =  @r{0 0000  0000 0000  0000 0000  0000 1100}
-                   ;  5  =  @r{0 0000  0000 0000  0000 0000  0000 0101}
-                   ;  7  =  @r{0 0000  0000 0000  0000 0000  0000 0111}
-     @result{} 14         ; 14  =  @r{0 0000  0000 0000  0000 0000  0000 1110}
+(logxor 12 5 7)    ; 12  =  @r{00 0000  0000 0000  0000 0000  0000 1100}
+                   ;  5  =  @r{00 0000  0000 0000  0000 0000  0000 0101}
+                   ;  7  =  @r{00 0000  0000 0000  0000 0000  0000 0111}
+     @result{} 14         ; 14  =  @r{00 0000  0000 0000  0000 0000  0000 1110}
 @end group
 @end smallexample
 @end defun
@@ -1031,9 +1032,9 @@
 @example
 (lognot 5)
      @result{} -6
-;;  5  =  @r{0 0000  0000 0000  0000 0000  0000 0101}
+;;  5  =  @r{00 0000  0000 0000  0000 0000  0000 0101}
 ;; @r{becomes}
-;; -6  =  @r{1 1111  1111 1111  1111 1111  1111 1010}
+;; -6  =  @r{11 1111  1111 1111  1111 1111  1111 1010}
 @end example
 @end defun
 
--- a/doc/lispref/objects.texi	Tue Mar 02 13:54:04 2010 +0900
+++ b/doc/lispref/objects.texi	Wed Mar 03 15:04:00 2010 +0900
@@ -165,24 +165,24 @@
 @node Integer Type
 @subsection Integer Type
 
-  The range of values for integers in Emacs Lisp is @minus{}268435456 to
-268435455 (29 bits; i.e.,
+  The range of values for integers in Emacs Lisp is @minus{}536870912 to
+536870911 (30 bits; i.e.,
 @ifnottex
--2**28
+-2**29
 @end ifnottex
 @tex
-@math{-2^{28}}
+@math{-2^{29}}
 @end tex
 to
 @ifnottex
-2**28 - 1)
+2**29 - 1)
 @end ifnottex
 @tex
-@math{2^{28}-1})
+@math{2^{29}-1})
 @end tex
 on most machines.  (Some machines may provide a wider range.)  It is
 important to note that the Emacs Lisp arithmetic functions do not check
-for overflow.  Thus @code{(1+ 268435455)} is @minus{}268435456 on most
+for overflow.  Thus @code{(1+ 536870911)} is @minus{}536870912 on most
 machines.
 
   The read syntax for integers is a sequence of (base ten) digits with an
@@ -196,7 +196,7 @@
 1                ; @r{The integer 1.}
 1.               ; @r{Also the integer 1.}
 +1               ; @r{Also the integer 1.}
-536870913        ; @r{Also the integer 1 on a 29-bit implementation.}
+1073741825       ; @r{Also the integer 1 on a 30-bit implementation.}
 @end group
 @end example
 
--- a/doc/misc/ChangeLog	Tue Mar 02 13:54:04 2010 +0900
+++ b/doc/misc/ChangeLog	Wed Mar 03 15:04:00 2010 +0900
@@ -1,3 +1,8 @@
+2010-03-03  Chong Yidong  <cyd@stupidchicken.com>
+
+	* faq.texi (Escape sequences in shell output): Note that ansi-color is
+	now enabled by default.
+
 2010-02-28  Michael Albinus  <michael.albinus@gmx.de>
 
 	* dbus.texi (Errors and Events): D-Bus messages are retrieved only,
--- a/doc/misc/faq.texi	Tue Mar 02 13:54:04 2010 +0900
+++ b/doc/misc/faq.texi	Wed Mar 03 15:04:00 2010 +0900
@@ -2617,22 +2617,19 @@
 @cindex Escape sequences in @code{ls} output
 @cindex @code{ls} in Shell mode
 
-This happens because @code{ls} is aliased to @samp{ls --color} in your
-shell init file.  You have two alternatives to solve this:
-
-@itemize @bullet
-@item
-Make the alias conditioned on the @code{EMACS} variable in the
-environment.  When Emacs runs a subsidiary shell, it exports the
-@code{EMACS} variable to that shell, with value equal to the absolute
-file name of Emacs.  You can
-unalias @code{ls} when that happens, thus limiting the alias to your
-interactive sessions.
-
-@item
-Install the @code{ansi-color} package (bundled with Emacs 21.1 and
-later), which converts these ANSI escape sequences into colors.
-@end itemize
+In many systems, @code{ls} is aliased to @samp{ls --color}, which
+prints using ANSI color escape sequences.  Emacs version 21.1 and
+later includes the @code{ansi-color} package, which lets Shell mode
+recognize these escape sequences.  In Emacs 23.2 and later, the
+package is enabled by default; in earlier versions you can enable it
+by typing @kbd{M-x ansi-color-for-comint-mode} in the Shell buffer, or
+by adding @code{(add-hook 'shell-mode-hook
+'ansi-color-for-comint-mode-on)} to your init file.
+
+In Emacs versions before 21.1, the @code{ansi-color} package is not
+included.  In that case, you need to unalias @code{ls} for interactive
+shells running in Emacs; this can be done by checking the @code{EMACS}
+variable in the environment.
 
 @node Fullscreen mode on MS-Windows
 @section How can I start Emacs in fullscreen mode on MS-Windows?
--- a/etc/NEWS	Tue Mar 02 13:54:04 2010 +0900
+++ b/etc/NEWS	Wed Mar 03 15:04:00 2010 +0900
@@ -66,6 +66,7 @@
 KDE, and XFCE desktops.  (This change has no effect on Windows, which
 uses `system-move-file-to-trash' for trashing.)
 
++++
 ** The pointer now becomes invisible when typing.
 Customize `make-pointer-invisible' to disable this feature.
 
@@ -281,7 +282,7 @@
 ** nXML mode is now the default for editing XML files.
 
 ** Shell
-
++++
 *** ansi-color is now enabled by default.
 To disable it, set ansi-color-for-comint-mode to nil.
 
@@ -362,7 +363,7 @@
 *** Customize `elint-ignored-warnings' to suppress some warnings.
 
 ** Miscellaneous
-
++++
 *** The new command `async-shell-command' bound globally to `M-&' executes
 the command asynchronously without the need to manually add ampersand to
 the end of the command.  Its output appears in the buffer `*Async Shell
@@ -436,6 +437,7 @@
 
 * Incompatible Lisp Changes in Emacs 23.2
 
+---
 ** Several obsolete functions removed.
 The functions have been obsolete since Emacs 19, and are unlikely to
 be in use:
--- a/lisp/ChangeLog	Tue Mar 02 13:54:04 2010 +0900
+++ b/lisp/ChangeLog	Wed Mar 03 15:04:00 2010 +0900
@@ -1,3 +1,20 @@
+2010-03-03  Štěpán Němec  <stepnem@gmail.com>  (tiny change)
+
+	* subr.el (momentary-string-display): Don't overwrite the MESSAGE
+	argument with a local variable.  (Bug#5670)
+
+2010-03-02  Juri Linkov  <juri@jurta.org>
+
+	* info.el (Info-index-next): Decrement line number by 2.  (Bug#5652)
+
+2010-03-02  Michael Albinus  <michael.albinus@gmx.de>
+
+	* net/tramp.el (tramp-do-copy-or-rename-file-out-of-band): Fix an
+	error when FILENAME and NEWNAME are existing remote directories.
+
+	* net/tramp-compat.el (tramp-compat-make-temp-file): Add optional
+	parameter DIR-FLAG.
+
 2010-03-02  Glenn Morris  <rgm@gnu.org>
 
 	* calendar/cal-hebrew.el (holiday-hebrew-passover): Fix date
--- a/lisp/info.el	Tue Mar 02 13:54:04 2010 +0900
+++ b/lisp/info.el	Wed Mar 03 15:04:00 2010 +0900
@@ -3062,7 +3062,7 @@
 	  num (1- num)))
   (Info-goto-node (nth 1 (car Info-index-alternatives)))
   (if (> (nth 3 (car Info-index-alternatives)) 0)
-      (forward-line (1- (nth 3 (car Info-index-alternatives))))
+      (forward-line (- (nth 3 (car Info-index-alternatives)) 2))
     (forward-line 3)			; don't search in headers
     (let ((name (car (car Info-index-alternatives))))
       (Info-find-index-name name)))
--- a/lisp/net/tramp-compat.el	Tue Mar 02 13:54:04 2010 +0900
+++ b/lisp/net/tramp-compat.el	Wed Mar 03 15:04:00 2010 +0900
@@ -215,7 +215,7 @@
 ;; has been introduced with Emacs 22.  We try it, if it fails, we fall
 ;; back to `make-temp-name', creating the temporary file immediately
 ;; in order to avoid a security hole.
-(defsubst tramp-compat-make-temp-file (filename)
+(defsubst tramp-compat-make-temp-file (filename &optional dir-flag)
   "Create a temporary file (compat function).
 Add the extension of FILENAME, if existing."
   (let* (file-name-handler-alist
@@ -226,21 +226,24 @@
 	 result)
     (condition-case nil
 	(setq result
-	      (funcall (symbol-function 'make-temp-file) prefix nil extension))
+	      (funcall
+	       (symbol-function 'make-temp-file) prefix dir-flag extension))
       (error
        ;; We use our own implementation, taken from files.el.
        (while
 	   (condition-case ()
 	       (progn
 		 (setq result (concat (make-temp-name prefix) extension))
-		 (write-region
-		  "" nil result nil 'silent nil
-		  ;; 7th parameter is MUSTBENEW in Emacs, and
-		  ;; CODING-SYSTEM in XEmacs.  It is not a security
-		  ;; hole in XEmacs if we cannot use this parameter,
-		  ;; because XEmacs uses a user-specific subdirectory
-		  ;; with 0700 permissions.
-		  (when (not (featurep 'xemacs)) 'excl))
+		 (if dir-flag
+		     (make-directory result)
+		   (write-region
+		    "" nil result nil 'silent nil
+		    ;; 7th parameter is MUSTBENEW in Emacs, and
+		    ;; CODING-SYSTEM in XEmacs.  It is not a security
+		    ;; hole in XEmacs if we cannot use this parameter,
+		    ;; because XEmacs uses a user-specific
+		    ;; subdirectory with 0700 permissions.
+		    (when (not (featurep 'xemacs)) 'excl)))
 		 nil)
 	     (file-already-exists t))
 	 ;; The file was somehow created by someone else between
--- a/lisp/net/tramp.el	Tue Mar 02 13:54:04 2010 +0900
+++ b/lisp/net/tramp.el	Wed Mar 03 15:04:00 2010 +0900
@@ -3798,13 +3798,12 @@
 
 	  ;; Both are Tramp files.  We shall optimize it, when the
 	  ;; methods for filename and newname are the same.
-	  (let ((tmpfile
-		 (if (file-regular-p filename)
-		     (tramp-compat-make-temp-file localname)
-		   (make-temp-name
-		    (expand-file-name
-		     tramp-temp-name-prefix
-		     (tramp-compat-temporary-file-directory))))))
+	  (let* ((dir-flag (file-directory-p filename))
+		 (tmpfile (tramp-compat-make-temp-file localname dir-flag)))
+	    (if dir-flag
+		(setq tmpfile
+		      (expand-file-name
+		       (file-name-nondirectory newname) tmpfile)))
 	    (unwind-protect
 		(progn
 		  (tramp-do-copy-or-rename-file-out-of-band
@@ -3813,9 +3812,10 @@
 		   'rename tmpfile newname keep-date))
 	      ;; Save exit.
 	      (condition-case nil
-		  (if (file-regular-p tmpfile)
-		      (delete-file tmpfile)
-		    (delete-directory tmpfile 'recursive))
+		  (if dir-flag
+		      (delete-directory
+		       (expand-file-name ".." tmpfile) 'recursive)
+		    (delete-file tmpfile))
 		(error))))
 
 	;; Expand hops.  Might be necessary for gateway methods.
--- a/lisp/subr.el	Tue Mar 02 13:54:04 2010 +0900
+++ b/lisp/subr.el	Wed Mar 03 15:04:00 2010 +0900
@@ -2196,15 +2196,15 @@
 If MESSAGE is nil, instructions to type EXIT-CHAR are displayed there."
   (or exit-char (setq exit-char ?\s))
   (let ((ol (make-overlay pos pos))
-        (message (copy-sequence string)))
+        (str (copy-sequence string)))
     (unwind-protect
         (progn
           (save-excursion
-            (overlay-put ol 'after-string message)
+            (overlay-put ol 'after-string str)
             (goto-char pos)
             ;; To avoid trouble with out-of-bounds position
             (setq pos (point))
-            ;; If the message end is off screen, recenter now.
+            ;; If the string end is off screen, recenter now.
             (if (<= (window-end nil t) pos)
                 (recenter (/ (window-height) 2))))
           (message (or message "Type %s to continue editing.")
--- a/src/ChangeLog	Tue Mar 02 13:54:04 2010 +0900
+++ b/src/ChangeLog	Wed Mar 03 15:04:00 2010 +0900
@@ -1,3 +1,10 @@
+2010-03-02  Eli Zaretskii  <eliz@gnu.org>
+
+	* coding.c (decode_coding_emacs_mule): Fixup pointers to buffer
+	text that could be relocated inside the call to emacs_mule_char.
+	(emacs_mule_char): Use CODING_DECODE_CHAR instead of DECODE_CHAR.
+	(CODING_DECODE_CHAR): Add a comment describing its purpose.
+
 2010-03-02  Kenichi Handa  <handa@m17n.org>
 
 	* character.c (parse_str_as_multibyte): Fix handling of the
--- a/src/coding.c	Tue Mar 02 13:54:04 2010 +0900
+++ b/src/coding.c	Wed Mar 03 15:04:00 2010 +0900
@@ -1005,6 +1005,10 @@
     }
 }
 
+/* This wrapper macro is used to preserve validity of pointers into
+   buffer text across calls to decode_char, which could cause
+   relocation of buffers if it loads a charset map, because loading a
+   charset map allocates large structures.  */
 #define CODING_DECODE_CHAR(coding, src, src_base, src_end, charset, code, c) \
   do {									     \
     charset_map_loaded = 0;						     \
@@ -2061,7 +2065,7 @@
 /* Parse emacs-mule multibyte sequence at SRC and return the decoded
    character.  If CMP_STATUS indicates that we must expect MSEQ or
    RULE described above, decode it and return the negative value of
-   the deocded character or rule.  If an invalid byte is found, return
+   the decoded character or rule.  If an invalid byte is found, return
    -1.  If SRC is too short, return -2.  */
 
 int
@@ -2178,7 +2182,7 @@
 	default:
 	  abort ();
 	}
-      c = DECODE_CHAR (charset, code);
+      CODING_DECODE_CHAR (coding, src, src_base, src_end, charset, code, c);
       if (c < 0)
 	goto invalid_code;
     }
@@ -2525,9 +2529,23 @@
       else
 	{
 	  int nchars, nbytes;
+	  /* emacs_mule_char can load a charset map from a file, which
+	     allocates a large structure and might cause buffer text
+	     to be relocated as result.  Thus, we need to remember the
+	     original pointer to buffer text, and fixup all related
+	     pointers after the call.  */
+	  const unsigned char *orig = coding->source;
+	  EMACS_INT offset;
 
 	  c = emacs_mule_char (coding, src_base, &nbytes, &nchars, &id,
 			       cmp_status);
+	  offset = coding->source - orig;
+	  if (offset)
+	    {
+	      src += offset;
+	      src_base += offset;
+	      src_end += offset;
+	    }
 	  if (c < 0)
 	    {
 	      if (c == -1)