diff options
| author | Richard M. Stallman | 1998-04-25 23:32:56 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1998-04-25 23:32:56 +0000 |
| commit | 62b82678be0be828d34c58ca547af421a2e91fab (patch) | |
| tree | c976bd29cb62d5b591f6ba488ca77d1964b134d7 /src | |
| parent | d6a1be6453b2d05eb133a485bea9c9304cf5aa99 (diff) | |
| download | emacs-62b82678be0be828d34c58ca547af421a2e91fab.tar.gz emacs-62b82678be0be828d34c58ca547af421a2e91fab.zip | |
(insert_from_string, insert_from_string_before_markers):
Don't special case LENGTH = 0.
(insert_from_buffer): Likewise.
Diffstat (limited to 'src')
| -rw-r--r-- | src/insdel.c | 31 |
1 files changed, 11 insertions, 20 deletions
diff --git a/src/insdel.c b/src/insdel.c index 030b87385bd..813e98cff9c 100644 --- a/src/insdel.c +++ b/src/insdel.c | |||
| @@ -1130,13 +1130,10 @@ insert_from_string (string, pos, pos_byte, length, length_byte, inherit) | |||
| 1130 | register int pos, pos_byte, length, length_byte; | 1130 | register int pos, pos_byte, length, length_byte; |
| 1131 | int inherit; | 1131 | int inherit; |
| 1132 | { | 1132 | { |
| 1133 | if (length > 0) | 1133 | int opoint = PT; |
| 1134 | { | 1134 | insert_from_string_1 (string, pos, pos_byte, length, length_byte, |
| 1135 | int opoint = PT; | 1135 | inherit, 0); |
| 1136 | insert_from_string_1 (string, pos, pos_byte, length, length_byte, | 1136 | signal_after_change (opoint, 0, PT - opoint); |
| 1137 | inherit, 0); | ||
| 1138 | signal_after_change (opoint, 0, PT - opoint); | ||
| 1139 | } | ||
| 1140 | } | 1137 | } |
| 1141 | 1138 | ||
| 1142 | /* Like `insert_from_string' except that all markers pointing | 1139 | /* Like `insert_from_string' except that all markers pointing |
| @@ -1149,13 +1146,10 @@ insert_from_string_before_markers (string, pos, pos_byte, | |||
| 1149 | register int pos, pos_byte, length, length_byte; | 1146 | register int pos, pos_byte, length, length_byte; |
| 1150 | int inherit; | 1147 | int inherit; |
| 1151 | { | 1148 | { |
| 1152 | if (length > 0) | 1149 | int opoint = PT; |
| 1153 | { | 1150 | insert_from_string_1 (string, pos, pos_byte, length, length_byte, |
| 1154 | int opoint = PT; | 1151 | inherit, 1); |
| 1155 | insert_from_string_1 (string, pos, pos_byte, length, length_byte, | 1152 | signal_after_change (opoint, 0, PT - opoint); |
| 1156 | inherit, 1); | ||
| 1157 | signal_after_change (opoint, 0, PT - opoint); | ||
| 1158 | } | ||
| 1159 | } | 1153 | } |
| 1160 | 1154 | ||
| 1161 | /* Subroutine of the insertion functions above. */ | 1155 | /* Subroutine of the insertion functions above. */ |
| @@ -1311,13 +1305,10 @@ insert_from_buffer (buf, charpos, nchars, inherit) | |||
| 1311 | int charpos, nchars; | 1305 | int charpos, nchars; |
| 1312 | int inherit; | 1306 | int inherit; |
| 1313 | { | 1307 | { |
| 1314 | if (nchars > 0) | 1308 | int opoint = PT; |
| 1315 | { | ||
| 1316 | int opoint = PT; | ||
| 1317 | 1309 | ||
| 1318 | insert_from_buffer_1 (buf, charpos, nchars, inherit); | 1310 | insert_from_buffer_1 (buf, charpos, nchars, inherit); |
| 1319 | signal_after_change (opoint, 0, PT - opoint); | 1311 | signal_after_change (opoint, 0, PT - opoint); |
| 1320 | } | ||
| 1321 | } | 1312 | } |
| 1322 | 1313 | ||
| 1323 | static void | 1314 | static void |