Mercurial > emacs
comparison src/editfns.c @ 66500:8392b2926dd8
(Fformat): Don't include string padding
between info[n].start and info[n].end.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Fri, 28 Oct 2005 16:26:45 +0000 |
parents | 48a5d83a7c9d |
children | a0208539b9a3 7beb78bc1f8e |
comparison
equal
deleted
inserted
replaced
66499:0e243de6311b | 66500:8392b2926dd8 |
---|---|
3660 { | 3660 { |
3661 *p++ = ' '; | 3661 *p++ = ' '; |
3662 ++nchars; | 3662 ++nchars; |
3663 } | 3663 } |
3664 | 3664 |
3665 start = nchars; | 3665 info[n].start = start = nchars; |
3666 nchars += nchars_string; | 3666 nchars += nchars_string; |
3667 end = nchars; | 3667 end = nchars; |
3668 | 3668 |
3669 if (p > buf | 3669 if (p > buf |
3670 && multibyte | 3670 && multibyte |
3674 maybe_combine_byte = 1; | 3674 maybe_combine_byte = 1; |
3675 | 3675 |
3676 p += copy_text (SDATA (args[n]), p, | 3676 p += copy_text (SDATA (args[n]), p, |
3677 nbytes, | 3677 nbytes, |
3678 STRING_MULTIBYTE (args[n]), multibyte); | 3678 STRING_MULTIBYTE (args[n]), multibyte); |
3679 | |
3680 info[n].end = nchars; | |
3679 | 3681 |
3680 if (negative) | 3682 if (negative) |
3681 while (padding-- > 0) | 3683 while (padding-- > 0) |
3682 { | 3684 { |
3683 *p++ = ' '; | 3685 *p++ = ' '; |
3711 if (multibyte) | 3713 if (multibyte) |
3712 p += str_to_multibyte (p, buf + total - 1 - p, this_nchars); | 3714 p += str_to_multibyte (p, buf + total - 1 - p, this_nchars); |
3713 else | 3715 else |
3714 p += this_nchars; | 3716 p += this_nchars; |
3715 nchars += this_nchars; | 3717 nchars += this_nchars; |
3718 info[n].end = nchars; | |
3716 } | 3719 } |
3717 | 3720 |
3718 info[n].end = nchars; | |
3719 } | 3721 } |
3720 else if (STRING_MULTIBYTE (args[0])) | 3722 else if (STRING_MULTIBYTE (args[0])) |
3721 { | 3723 { |
3722 /* Copy a whole multibyte character. */ | 3724 /* Copy a whole multibyte character. */ |
3723 if (p > buf | 3725 if (p > buf |