]> code.delx.au - gnu-emacs/blobdiff - src/editfns.c
* macterm.c: Remove consolidated defines and code.
[gnu-emacs] / src / editfns.c
index 1df3326762db2c2c2c74cb5f321cdde0bce5ff0a..0c012514f93aa10d214a4670989bfb08f272aa70 100644 (file)
@@ -289,16 +289,16 @@ region_limit (beginningp)
 {
   extern Lisp_Object Vmark_even_if_inactive; /* Defined in callint.c. */
   Lisp_Object m;
-  
+
   if (!NILP (Vtransient_mark_mode)
       && NILP (Vmark_even_if_inactive)
       && NILP (current_buffer->mark_active))
     Fsignal (Qmark_inactive, Qnil);
-  
+
   m = Fmarker_position (current_buffer->mark);
   if (NILP (m))
     error ("The mark is not set now, so there is no region");
-  
+
   if ((PT < XFASTINT (m)) == beginningp)
     m = make_number (PT);
   return m;
@@ -456,7 +456,7 @@ get_pos_property (position, prop, object)
                }
            }
        }
-      
+
     }
 
   { /* Now check the text-properties.  */
@@ -881,7 +881,7 @@ save_excursion_restore (info)
   /* visible */
   info = XCDR (info);
   visible_p = !NILP (XCAR (info));
-  
+
 #if 0 /* We used to make the current buffer visible in the selected window
         if that was true previously.  That avoids some anomalies.
         But it creates others, and it wasn't documented, and it is simpler
@@ -2952,7 +2952,7 @@ save_restriction_restore (data)
                             clip_to_bounds (beg->charpos, pt, end->charpos),
                             clip_to_bounds (beg->bytepos, BUF_PT_BYTE (buf),
                                             end->bytepos));
-         
+
          buf->clip_changed = 1; /* Remember that the narrowing changed. */
        }
     }
@@ -3367,6 +3367,10 @@ usage: (format STRING &rest OBJECTS)  */)
            if (*format == 'c')
              {
                if (! SINGLE_BYTE_CHAR_P (XINT (args[n]))
+                   /* Note: No one can remeber why we have to treat
+                      the character 0 as a multibyte character here.
+                      But, until it causes a real problem, let's
+                      don't change it.  */
                    || XINT (args[n]) == 0)
                  {
                    if (! multibyte)
@@ -3648,30 +3652,17 @@ usage: (format STRING &rest OBJECTS)  */)
   return val;
 }
 
-
-/* VARARGS 1 */
 Lisp_Object
-#ifdef NO_ARG_ARRAY
-format1 (string1, arg0, arg1, arg2, arg3, arg4)
-     EMACS_INT arg0, arg1, arg2, arg3, arg4;
-#else
-format1 (string1)
-#endif
+format2 (string1, arg0, arg1)
      char *string1;
+     Lisp_Object arg0, arg1;
 {
-  char buf[100];
-#ifdef NO_ARG_ARRAY
-  EMACS_INT args[5];
-  args[0] = arg0;
-  args[1] = arg1;
-  args[2] = arg2;
-  args[3] = arg3;
-  args[4] = arg4;
-  doprnt (buf, sizeof buf, string1, (char *)0, 5, (char **) args);
-#else
-  doprnt (buf, sizeof buf, string1, (char *)0, 5, &string1 + 1);
-#endif
-  return build_string (buf);
+  Lisp_Object args[3];
+  int numargs;
+  args[0] = build_string (string1);
+  args[1] = arg0;
+  args[2] = arg1;
+  return Fformat (3, args);
 }
 \f
 DEFUN ("char-equal", Fchar_equal, Schar_equal, 2, 2, 0,