changeset 112082:5a77e1764c9e

merge emacs-23
author Kenichi Handa <handa@m17n.org>
date Mon, 27 Dec 2010 09:31:22 +0900
parents 5834722132ce (current diff) e829321a29ff (diff)
children 0f72a721050c
files
diffstat 14 files changed, 98 insertions(+), 39 deletions(-) [+]
line wrap: on
line diff
--- a/doc/emacs/ChangeLog	Fri Dec 24 20:21:26 2010 +0900
+++ b/doc/emacs/ChangeLog	Mon Dec 27 09:31:22 2010 +0900
@@ -1,3 +1,12 @@
+2010-12-25  Eli Zaretskii  <eliz@gnu.org>
+
+	* frames.texi (Cut and Paste): Modify the section's name and text:
+	don't mix "cut/paste" with "kill/yank".
+	(Cut/Paste Other App): Describe the per-session emulation of PRIMARY.
+	(Bug#7702)
+
+	* trouble.texi (Checklist): Mention debug-on-quit.  (Bug#7667)
+
 2010-12-18  Glenn Morris  <rgm@gnu.org>
 
 	* maintaining.texi: Move inclusion of emerge after EDE, so that it
--- a/doc/emacs/frames.texi	Fri Dec 24 20:21:26 2010 +0900
+++ b/doc/emacs/frames.texi	Mon Dec 27 09:31:22 2010 +0900
@@ -58,10 +58,10 @@
 @end menu
 
 @node Cut and Paste
-@section Killing and Yanking on Graphical Displays
+@section Cutting and Pasting on Graphical Displays
 
-  This section describes commands for selecting a region, killing, and
-yanking using the mouse.
+  This section describes commands for selecting a region, cutting, and
+pasting using the mouse.
 
 @menu
 * Mouse Commands::      Moving, cutting, and pasting, with the mouse.
@@ -248,6 +248,14 @@
 selection, either in Emacs or in another X application, the previous
 contents of the primary selection are lost.
 
+@cindex MS-Windows, and primary selection
+  MS-Windows provides no primary selection, but Emacs emulates it
+within a single Emacs session, by storing the selected text
+internally.  Therefore, all the features and commands related to the
+primary selection work on Windows as they do on X, for cutting and
+pasting within the same session, but not across Emacs sessions or with
+other applications.
+
   Whenever you kill some text using a command such as @kbd{C-w}
 (@code{kill-region}), or copy it into the kill ring using a command
 such as @kbd{M-w} (@code{kill-ring-save}), that text is also saved in
--- a/doc/emacs/trouble.texi	Fri Dec 24 20:21:26 2010 +0900
+++ b/doc/emacs/trouble.texi	Mon Dec 27 09:31:22 2010 +0900
@@ -806,6 +806,13 @@
 bug happen again.  If you can't make it happen again, at least copy
 the whole error message.
 
+@vindex debug-on-quit
+If Emacs appears to be stuck in an infinite loop or in a very long
+operation, typing @kbd{C-g} with the variable @code{debug-on-quit}
+non-@code{nil} will start the Lisp debugger and show a backtrace.
+This backtrace is useful for debugging such long loops, so if you can
+produce it, copy it into the bug report.
+
 @item
 Check whether any programs you have loaded into the Lisp world,
 including your @file{.emacs} file, set any variables that may affect the
--- a/doc/lispref/ChangeLog	Fri Dec 24 20:21:26 2010 +0900
+++ b/doc/lispref/ChangeLog	Mon Dec 27 09:31:22 2010 +0900
@@ -1,3 +1,7 @@
+2010-12-25  Eli Zaretskii  <eliz@gnu.org>
+
+	* modes.texi (Emulating Mode Line): Fix last change.
+
 2010-12-18  Eli Zaretskii  <eliz@gnu.org>
 
 	* modes.texi (Emulating Mode Line): Update documentation of
--- a/doc/lispref/modes.texi	Fri Dec 24 20:21:26 2010 +0900
+++ b/doc/lispref/modes.texi	Mon Dec 27 09:31:22 2010 +0900
@@ -2119,22 +2119,17 @@
 buffer.
 
 The value string normally has text properties that correspond to the
-faces, keymaps, etc., that the mode line would have.  And any character
-for which no @code{face} property is specified gets a default value
-determined by @var{face}.  If @var{face} is @code{t}, that stands for
-either @code{mode-line} if @var{window} is selected, otherwise
-@code{mode-line-inactive}.  If @var{face} is @code{nil} or omitted, that
-stands for no face property.
-
-However, if @var{face} is an integer, the value has no text properties.
+faces, keymaps, etc., that the mode line would have.  Any character for
+which no @code{face} property is specified by @var{format} gets a
+default value determined by @var{face}.  If @var{face} is @code{t}, that
+stands for either @code{mode-line} if @var{window} is selected,
+otherwise @code{mode-line-inactive}.  If @var{face} is @code{nil} or
+omitted, that stands for the default face.  If @var{face} is an integer,
+the value returned by this function will have no text properties.
 
 You can also specify other valid faces as the value of @var{face}.
-If the value is a @dfn{basic face}, one of @code{default}, @code{mode-line},
-@code{mode-line-inactive}, @code{header-line}, or @code{tool-bar}, that
-face provides the @code{face} property for characters whose face is not
-specified by @var{format}.  Any other face is treated as @code{default},
-but you can remap one of the basic faces (@pxref{Face Remapping}) to get
-the same effect as with non-basic faces.
+If specified, that face provides the @code{face} property for characters
+whose face is not specified by @var{format}.
 
 Note that using @code{mode-line}, @code{mode-line-inactive}, or
 @code{header-line} as @var{face} will actually redisplay the mode line
--- a/etc/NEWS	Fri Dec 24 20:21:26 2010 +0900
+++ b/etc/NEWS	Mon Dec 27 09:31:22 2010 +0900
@@ -1866,11 +1866,6 @@
 ** `mode-name' is no longer guaranteed to be a string.
 Use `(format-mode-line mode-name)' to ensure a string value.
 
-** `format-mode-line' now supports only a few basic faces as its FACE argument.
-The FACE argument to `format-mode-line' should be one of `default',
-`mode-line', `mode-line-inactive', `header-line', or `tool-bar'.  Any
-other face is treated as `default'.
-
 ** The function x-font-family-list has been removed.
 Use the new function font-family-list (see Lisp Changes, below).
 
--- a/lisp/ChangeLog	Fri Dec 24 20:21:26 2010 +0900
+++ b/lisp/ChangeLog	Mon Dec 27 09:31:22 2010 +0900
@@ -1,3 +1,18 @@
+2010-12-25  Eli Zaretskii  <eliz@gnu.org>
+
+	* time.el (display-time-mode): Mention display-time-interval in
+	the doc string.  (Bug#7713)
+
+	* simple.el (select-active-regions): Doc fix.  (Bug#7702)
+
+2010-12-24  Kenichi Handa  <handa@m17n.org>
+
+	* mail/rmailmm.el (rmail-mime-parse): Perform parsing in
+	condition-case and return an error message string if something
+	goes wrong.
+	(rmail-show-mime): Adjusted for the above change.  Insert the
+	header by rmail-mime-insert-header.
+
 2010-12-24  Kenichi Handa  <handa@m17n.org>
 
 	* mail/rmailmm.el: New key bindings for rmail-mime-next-item,
--- a/lisp/mail/rmailmm.el	Fri Dec 24 20:21:26 2010 +0900
+++ b/lisp/mail/rmailmm.el	Mon Dec 27 09:31:22 2010 +0900
@@ -1130,11 +1130,12 @@
 
 (defun rmail-mime-parse ()
   "Parse the current Rmail message as a MIME message.
-The value is a MIME-entiy object (see `rmail-mime-entity')."
+The value is a MIME-entiy object (see `rmail-mime-entity').
+If an error occurs, return an error message string."
   (let ((rmail-mime-mbox-buffer (if (rmail-buffers-swapped-p)
 				    rmail-view-buffer
 				  (current-buffer))))
-    ;;(condition-case err
+    (condition-case err
 	(with-current-buffer rmail-mime-mbox-buffer
 	  (save-excursion
 	    (goto-char (point-min))
@@ -1148,8 +1149,7 @@
 		  (aset new 1 (aset (rmail-mime-entity-tagline entity) 2 nil))
 		(aset new 1 (aset (rmail-mime-entity-tagline entity) 2 t)))
 	      entity)))
-	;;(error (error (format "%s" err))))
-    ))
+      (error (format "%s" err)))))
 
 (defun rmail-mime-insert (entity)
   "Insert a MIME-entity ENTITY in the current buffer.
@@ -1251,25 +1251,27 @@
 	(rmail-mime-mbox-buffer rmail-buffer)
 	(rmail-mime-view-buffer rmail-view-buffer)
 	(rmail-mime-coding-system nil))
-    (if entity
+    (if (vectorp entity)
 	(with-current-buffer rmail-mime-view-buffer
 	  (erase-buffer)
 	  (rmail-mime-insert entity)
 	  (if rmail-mime-coding-system
 	      (set-buffer-file-coding-system rmail-mime-coding-system t t)))
-      ;; Decoding failed.  Insert the original message body as is.
+      ;; Decoding failed.  ENTITY is an error message.  Insert the
+      ;; original message body as is, and show warning.
       (let ((region (with-current-buffer rmail-mime-mbox-buffer
 		      (goto-char (point-min))
 		      (re-search-forward "^$" nil t)
 		      (forward-line 1)
-		      (cons (point) (point-max)))))
+		      (vector (point-min) (point) (point-max)))))
 	(with-current-buffer rmail-mime-view-buffer
 	  (let ((inhibit-read-only t))
 	    (erase-buffer)
+	    (rmail-mime-insert-header region)
 	    (insert-buffer-substring rmail-mime-mbox-buffer
-				     (car region) (cdr region))))
+				     (aref region 1) (aref region 2))))
 	(set-buffer-file-coding-system 'no-conversion t t)
-	(message "MIME decoding failed")))))
+	(message "MIME decoding failed: %s" entity)))))
 
 (setq rmail-show-mime-function 'rmail-show-mime)
 
--- a/lisp/simple.el	Fri Dec 24 20:21:26 2010 +0900
+++ b/lisp/simple.el	Mon Dec 27 09:31:22 2010 +0900
@@ -3528,7 +3528,7 @@
     (signal 'mark-inactive nil)))
 
 (defcustom select-active-regions nil
-  "If non-nil, an active region automatically becomes the window selection."
+  "If non-nil, an active region automatically sets the primary selection."
   :type 'boolean
   :group 'killing
   :version "23.1")
--- a/lisp/time.el	Fri Dec 24 20:21:26 2010 +0900
+++ b/lisp/time.el	Mon Dec 27 09:31:22 2010 +0900
@@ -462,7 +462,9 @@
   "Toggle display of time, load level, and mail flag in mode lines.
 With a numeric arg, enable this display if arg is positive.
 
-When this display is enabled, it updates automatically every minute.
+When this display is enabled, it updates automatically every minute
+\(you can control the number of seconds between updates by
+customizing `display-time-interval').
 If `display-time-day-and-date' is non-nil, the current day and date
 are displayed as well.
 This runs the normal hook `display-time-hook' after each update."
--- a/src/ChangeLog	Fri Dec 24 20:21:26 2010 +0900
+++ b/src/ChangeLog	Mon Dec 27 09:31:22 2010 +0900
@@ -1,3 +1,17 @@
+2010-12-26  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* window.c (Fmove_to_window_line): Avoid abort when called in a buffer
+	different from selected-window's.
+
+2010-12-25  Eli Zaretskii  <eliz@gnu.org>
+
+	* keyboard.c (parse_menu_item): Prepend "  " to the key sequence
+	equivalent of a menu item when the key sequence is given by the
+	`:keys' attribute.  (Bug#7662)
+
+	* xdisp.c (Fformat_mode_line): Doc fix: no need to state that only
+	the basic faces are supported.
+
 2010-12-24  Jan Djärv  <jan.h.d@swipnet.se>
 
 	* xterm.c (x_check_fullscreen): Fix pixel/character mixup.
--- a/src/keyboard.c	Fri Dec 24 20:21:26 2010 +0900
+++ b/src/keyboard.c	Mon Dec 27 09:31:22 2010 +0900
@@ -8193,7 +8193,7 @@
     /* The previous code preferred :key-sequence to :keys, so we
        preserve this behavior.  */
     if (STRINGP (keyeq) && !CONSP (keyhint))
-      keyeq = Fsubstitute_command_keys (keyeq);
+      keyeq = concat2 (build_string ("  "), Fsubstitute_command_keys (keyeq));
     else
       {
 	Lisp_Object prefix = keyeq;
--- a/src/window.c	Fri Dec 24 20:21:26 2010 +0900
+++ b/src/window.c	Mon Dec 27 09:31:22 2010 +0900
@@ -5856,6 +5856,12 @@
   int this_scroll_margin;
 #endif
 
+  if (!(BUFFERP (w->buffer)
+	&& XBUFFER (w->buffer) == current_buffer))
+    /* This test is needed to make sure PT/PT_BYTE make sense in w->buffer
+       when passed below to set_marker_both.  */
+    error ("move-to-window-line called from unrelated buffer");
+  
   window = selected_window;
   start = marker_position (w->start);
   if (start < BEGV || start > ZV)
--- a/src/xdisp.c	Fri Dec 24 20:21:26 2010 +0900
+++ b/src/xdisp.c	Mon Dec 27 09:31:22 2010 +0900
@@ -17883,17 +17883,19 @@
 First arg FORMAT specifies the mode line format (see `mode-line-format'
 for details) to use.
 
+By default, the format is evaluated for the currently selected window.
+
 Optional second arg FACE specifies the face property to put on all
 characters for which no face is specified.  The value nil means the
 default face.  The value t means whatever face the window's mode line
-currently uses \(either `mode-line' or `mode-line-inactive',
-depending).  An integer value means the value string has no text
-properties.  Otherwise, the value should be one of `default',
-`mode-line', `mode-line-inactive', `header-line', or `tool-bar'.
+currently uses (either `mode-line' or `mode-line-inactive',
+depending on whether the window is the selected window or not).
+An integer value means the value string has no text
+properties.
 
 Optional third and fourth args WINDOW and BUFFER specify the window
 and buffer to use as the context for the formatting (defaults
-are the selected window and the window's buffer).  */)
+are the selected window and the WINDOW's buffer).  */)
      (format, face, window, buffer)
      Lisp_Object format, face, window, buffer;
 {