changeset 96412:e8f9b8f1538f

(Fvertical_motion): Properly handle float column arg.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Sun, 29 Jun 2008 13:56:50 +0000
parents 31e595cb6c02
children b38a7de9af46
files src/ChangeLog src/indent.c
diffstat 2 files changed, 44 insertions(+), 37 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Sun Jun 29 12:50:20 2008 +0000
+++ b/src/ChangeLog	Sun Jun 29 13:56:50 2008 +0000
@@ -1,39 +1,43 @@
+2008-06-29  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* indent.c (Fvertical_motion): Properly handle float column arg.
+
 2008-06-28  Jason Rumney  <jasonr@gnu.org>
 
-        * w32term.c (pfnGetFontUnicodeRanges): Remove unused function pointer.
-        (pfnSetLayeredWindowAttributes): New function pointer.
-        (w32_initialize): Initialize it when supported.
-        (x_set_frame_alpha): New function.
-
-        * w32fns.c (Fx_create_frame): Initialize frame parameter `alpha'.
-        (w32_frame_parm_handlers): Set alpha handler.
-
-        * frame.c (x_set_alpha) [HAVE_NTGUI]: Call x_set_frame_alpha.
+	* w32term.c (pfnGetFontUnicodeRanges): Remove unused function pointer.
+	(pfnSetLayeredWindowAttributes): New function pointer.
+	(w32_initialize): Initialize it when supported.
+	(x_set_frame_alpha): New function.
+
+	* w32fns.c (Fx_create_frame): Initialize frame parameter `alpha'.
+	(w32_frame_parm_handlers): Set alpha handler.
+
+	* frame.c (x_set_alpha) [HAVE_NTGUI]: Call x_set_frame_alpha.
 
 2008-06-27  Jason Rumney  <jasonr@gnu.org>
 
-        * w32fns.c (x_to_w32_font, w32_to_x_font, x_to_w32_weight)
-        (w32_to_x_weight, w32_to_all_x_charsets): Remove obsolete functions.
-        (w32_to_x_charset, x_to_w32_charset)
-        (Qw32_charset_ansi, Qw32_charset_symbol, Qw32_charset_default)
-        (Qw32_charset_shiftjis, Qw32_charset_hangeul, Qw32_charset_johab)
-        (Qw32_charset_chinesebig5, Qw32_charset_gb2312, Qw32_charset_oem)
-        (Qw32_charset_easteurope, Qw32_charset_turkish, Qw32_charset_baltic)
-        (Qw32_charset_russian, Qw32_charset_arabic, Qw32_charset_greek)
-        (Qw32_charset_hebrew, Qw32_charset_vietnamese, Qw32_charset_thai)
-        (Qw32_charset_mac, Vw32_charset_info_alist): Move to w32font.c.
-        (Qw32_charset_unicode): Remove.
-        (syms_of_w32fns): Update for above changes.
-
-        * w32font.c (w32_to_x_charset, x_to_w32_charset)
-        (Qw32_charset_ansi, Qw32_charset_symbol, Qw32_charset_default)
-        (Qw32_charset_shiftjis, Qw32_charset_hangeul, Qw32_charset_johab)
-        (Qw32_charset_chinesebig5, Qw32_charset_gb2312, Qw32_charset_oem)
-        (Qw32_charset_easteurope, Qw32_charset_turkish, Qw32_charset_baltic)
-        (Qw32_charset_russian, Qw32_charset_arabic, Qw32_charset_greek)
-        (Qw32_charset_hebrew, Qw32_charset_vietnamese, Qw32_charset_thai)
-        (Qw32_charset_mac, Vw32_charset_info_alist): Move from w32fns.c.
-        (syms_of_w32font): Update for above changes.
+	* w32fns.c (x_to_w32_font, w32_to_x_font, x_to_w32_weight)
+	(w32_to_x_weight, w32_to_all_x_charsets): Remove obsolete functions.
+	(w32_to_x_charset, x_to_w32_charset)
+	(Qw32_charset_ansi, Qw32_charset_symbol, Qw32_charset_default)
+	(Qw32_charset_shiftjis, Qw32_charset_hangeul, Qw32_charset_johab)
+	(Qw32_charset_chinesebig5, Qw32_charset_gb2312, Qw32_charset_oem)
+	(Qw32_charset_easteurope, Qw32_charset_turkish, Qw32_charset_baltic)
+	(Qw32_charset_russian, Qw32_charset_arabic, Qw32_charset_greek)
+	(Qw32_charset_hebrew, Qw32_charset_vietnamese, Qw32_charset_thai)
+	(Qw32_charset_mac, Vw32_charset_info_alist): Move to w32font.c.
+	(Qw32_charset_unicode): Remove.
+	(syms_of_w32fns): Update for above changes.
+
+	* w32font.c (w32_to_x_charset, x_to_w32_charset)
+	(Qw32_charset_ansi, Qw32_charset_symbol, Qw32_charset_default)
+	(Qw32_charset_shiftjis, Qw32_charset_hangeul, Qw32_charset_johab)
+	(Qw32_charset_chinesebig5, Qw32_charset_gb2312, Qw32_charset_oem)
+	(Qw32_charset_easteurope, Qw32_charset_turkish, Qw32_charset_baltic)
+	(Qw32_charset_russian, Qw32_charset_arabic, Qw32_charset_greek)
+	(Qw32_charset_hebrew, Qw32_charset_vietnamese, Qw32_charset_thai)
+	(Qw32_charset_mac, Vw32_charset_info_alist): Move from w32fns.c.
+	(syms_of_w32font): Update for above changes.
 
 2008-06-27  Dan Nicolaescu  <dann@ics.uci.edu>
 
--- a/src/indent.c	Sun Jun 29 12:50:20 2008 +0000
+++ b/src/indent.c	Sun Jun 29 13:56:50 2008 +0000
@@ -2020,12 +2020,14 @@
   struct window *w;
   Lisp_Object old_buffer;
   struct gcpro gcpro1;
-  int cols = 0;
+  Lisp_Object lcols = Qnil;
+  double cols;
 
   /* Allow LINES to be of the form (HPOS . VPOS) aka (COLUMNS . LINES).  */
   if (CONSP (lines) && (NUMBERP (XCAR (lines))))
     {
-      cols = XINT (XCAR (lines));
+      lcols = XCAR (lines);
+      cols = INTEGERP (lcols) ? (double) XINT (lcols) : XFLOAT_DATA (lcols);
       lines = XCDR (lines);
     }
 
@@ -2116,10 +2118,11 @@
       if (XINT (lines) >= 0 || IT_CHARPOS (it) > 0)
 	move_it_by_lines (&it, XINT (lines), 0);
 
-      if (cols)
-	move_it_in_display_line (&it, ZV,
-				 cols * FRAME_COLUMN_WIDTH (XFRAME (w->frame)),
-				 MOVE_TO_X);
+      if (!NILP (lcols))
+	move_it_in_display_line
+	  (&it, ZV,
+	   (int)(cols * FRAME_COLUMN_WIDTH (XFRAME (w->frame)) + 0.5),
+	   MOVE_TO_X);
 
       SET_PT_BOTH (IT_CHARPOS (it), IT_BYTEPOS (it));
     }