(Fvertical_motion): Properly handle float column arg.
authorStefan Monnier <monnier@iro.umontreal.ca>
Sun, 29 Jun 2008 13:56:50 +0000 (13:56 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Sun, 29 Jun 2008 13:56:50 +0000 (13:56 +0000)
src/ChangeLog
src/indent.c

index df8c4b5..5e26e44 100644 (file)
@@ -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.
+       * 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.
+       * 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.
+       * 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>
 
index 71e993e..be5dc5f 100644 (file)
@@ -2020,12 +2020,14 @@ whether or not it is currently displayed in some window.  */)
   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 @@ whether or not it is currently displayed in some window.  */)
       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));
     }