Mercurial > emacs
comparison src/editfns.c @ 5242:0e99ea9941e2
(Fmessage): Use message2.
(Fsubst_char_in_region): Move the NOUNDO hacking code
after the modify_region call.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Thu, 23 Dec 1993 01:28:34 +0000 |
parents | ddee29e260d2 |
children | a70b89d2d6bb |
comparison
equal
deleted
inserted
replaced
5241:1536c6b80ff6 | 5242:0e99ea9941e2 |
---|---|
1139 | 1139 |
1140 pos = XINT (start); | 1140 pos = XINT (start); |
1141 stop = XINT (end); | 1141 stop = XINT (end); |
1142 look = XINT (fromchar); | 1142 look = XINT (fromchar); |
1143 | 1143 |
1144 if (! NILP (noundo)) | |
1145 { | |
1146 if (MODIFF - 1 == current_buffer->save_modified) | |
1147 current_buffer->save_modified++; | |
1148 if (MODIFF - 1 == current_buffer->auto_save_modified) | |
1149 current_buffer->auto_save_modified++; | |
1150 } | |
1151 | |
1152 while (pos < stop) | 1144 while (pos < stop) |
1153 { | 1145 { |
1154 if (FETCH_CHAR (pos) == look) | 1146 if (FETCH_CHAR (pos) == look) |
1155 { | 1147 { |
1156 if (! changed) | 1148 if (! changed) |
1157 { | 1149 { |
1158 modify_region (current_buffer, XINT (start), stop); | 1150 modify_region (current_buffer, XINT (start), stop); |
1159 changed = 1; | 1151 |
1152 if (! NILP (noundo)) | |
1153 { | |
1154 if (MODIFF - 1 == current_buffer->save_modified) | |
1155 current_buffer->save_modified++; | |
1156 if (MODIFF - 1 == current_buffer->auto_save_modified) | |
1157 current_buffer->auto_save_modified++; | |
1158 } | |
1159 | |
1160 changed = 1; | |
1160 } | 1161 } |
1161 | 1162 |
1162 if (NILP (noundo)) | 1163 if (NILP (noundo)) |
1163 record_change (pos, 1); | 1164 record_change (pos, 1); |
1164 FETCH_CHAR (pos) = XINT (tochar); | 1165 FETCH_CHAR (pos) = XINT (tochar); |
1380 } | 1381 } |
1381 else | 1382 else |
1382 { | 1383 { |
1383 register Lisp_Object val; | 1384 register Lisp_Object val; |
1384 val = Fformat (nargs, args); | 1385 val = Fformat (nargs, args); |
1385 message ("%s", XSTRING (val)->data); | 1386 message2 (XSTRING (val)->data, XSTRING (val)->size); |
1386 return val; | 1387 return val; |
1387 } | 1388 } |
1388 } | 1389 } |
1389 | 1390 |
1390 DEFUN ("format", Fformat, Sformat, 1, MANY, 0, | 1391 DEFUN ("format", Fformat, Sformat, 1, MANY, 0, |