Add function prototype for resize_mini_window.
[bpt/emacs.git] / src / cmds.c
index c1f92c7..64e7eac 100644 (file)
@@ -163,7 +163,14 @@ If scan reaches end of buffer, stop there without error.")
   else
     CHECK_NUMBER (n, 0);
 
-  SET_PT (XINT (Fline_beginning_position (n)));
+  {
+    int pos = XFASTINT (Fline_beginning_position (n));
+    if (INTEGERP (current_buffer->minibuffer_prompt_length)
+       && pos < XFASTINT (current_buffer->minibuffer_prompt_length))
+      pos = XFASTINT (current_buffer->minibuffer_prompt_length);
+    SET_PT (pos);
+  }
+  
   return Qnil;
 }
 
@@ -398,7 +405,7 @@ internal_self_insert (c, noautofill)
                    && XINT (current_buffer->tab_width) > 0
                    && XFASTINT (current_buffer->tab_width) < 20
                    && (target_clm = (current_column () 
-                                     + XINT (Fchar_width (make_number (c2)))),
+                                     + XINT (Fchar_width (make_number (c)))),
                        target_clm % XFASTINT (current_buffer->tab_width)))))
        {
          int pos = PT;