diff src/xdisp.c @ 90314:d1c5430c5bff

Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-21 Merge from emacs--devo--0 Patches applied: * emacs--devo--0 (patch 97-112) - Update from CVS - Merge from erc--emacs--0 - Update from CVS: src/regex.c (extend_range_table_work_area): Fix typo. - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 37) - Update from CVS
author Miles Bader <miles@gnu.org>
date Wed, 22 Feb 2006 06:54:10 +0000
parents d863760fdf88 b85178809d5c
children 5754737d1e04
line wrap: on
line diff
--- a/src/xdisp.c	Wed Feb 22 06:52:00 2006 +0000
+++ b/src/xdisp.c	Wed Feb 22 06:54:10 2006 +0000
@@ -9158,14 +9158,15 @@
 	  /* Redisplay the menu bar in case we changed it.  */
 #if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) || defined (MAC_OS) \
     || defined (USE_GTK)
-	  if (FRAME_WINDOW_P (f)
-#if defined (MAC_OS)
-              /* All frames on Mac OS share the same menubar.  So only the
-                 selected frame should be allowed to set it.  */
-              && f == SELECTED_FRAME ()
-#endif
-	     )
-	    set_frame_menubar (f, 0, 0);
+	  if (FRAME_WINDOW_P (f))
+	    {
+#ifdef MAC_OS
+              /* All frames on Mac OS share the same menubar.  So only
+                 the selected frame should be allowed to set it.  */
+              if (f == SELECTED_FRAME ())
+#endif
+		set_frame_menubar (f, 0, 0);
+	    }
 	  else
 	    /* On a terminal screen, the menu bar is an ordinary screen
 	       line, and this makes it get updated.  */
@@ -16572,8 +16573,11 @@
 		    {
 		      int bytepos = last_offset;
 		      int charpos = string_byte_to_char (elt, bytepos);
+
+		      if (precision <= 0)
+			nchars = string_byte_to_char (elt, offset) - charpos;
 		      n += display_string (NULL, elt, Qnil, 0, charpos,
-					   it, 0, prec, 0,
+					   it, 0, nchars, 0,
 					   STRING_MULTIBYTE (elt));
 		    }
 		    break;
@@ -17825,7 +17829,7 @@
    display them, and < 0 means obey the current buffer's value of
    enable_multibyte_characters.
 
-   Value is the number of glyphs produced.  */
+   Value is the number of columns displayed.  */
 
 static int
 display_string (string, lisp_string, face_string, face_string_pos,