X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/72bb55c6b2629bd33255e8fa7064cc1a4247f487..f9e65eb300c487a85de743edc0bafd6434d6db5e:/src/editfns.c diff --git a/src/editfns.c b/src/editfns.c index 1df3326762..0c012514f9 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -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); } DEFUN ("char-equal", Fchar_equal, Schar_equal, 2, 2, 0,