From: Richard M. Stallman Date: Thu, 2 Dec 2004 23:37:13 +0000 (+0000) Subject: (insert_from_string_before_markers) X-Git-Tag: ttn-vms-21-2-B4~3464 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d8bf42567e956447313be88c742e7330e12192f0;p=emacs.git (insert_from_string_before_markers) (insert_from_string): Don't modify buffer on empty insertion. --- diff --git a/src/insdel.c b/src/insdel.c index f5f56f0371f..7f10c2f523d 100644 --- a/src/insdel.c +++ b/src/insdel.c @@ -1057,6 +1057,10 @@ insert_from_string (string, pos, pos_byte, length, length_byte, inherit) int inherit; { int opoint = PT; + + if (SCHARS (string) == 0) + return; + insert_from_string_1 (string, pos, pos_byte, length, length_byte, inherit, 0); signal_after_change (opoint, 0, PT - opoint); @@ -1074,6 +1078,10 @@ insert_from_string_before_markers (string, pos, pos_byte, int inherit; { int opoint = PT; + + if (SCHARS (string) == 0) + return; + insert_from_string_1 (string, pos, pos_byte, length, length_byte, inherit, 1); signal_after_change (opoint, 0, PT - opoint);