aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1994-06-29 19:51:33 +0000
committerRichard M. Stallman1994-06-29 19:51:33 +0000
commitaa52fef958fc7f22b6d90100956bfddd9d2bd77b (patch)
treeb231d39b20e990b6a2cfa9366bb2b3d7fb7ce276
parent654d89d78e7fe04721f4d9f7f788d8bbc783632f (diff)
downloademacs-aa52fef958fc7f22b6d90100956bfddd9d2bd77b.tar.gz
emacs-aa52fef958fc7f22b6d90100956bfddd9d2bd77b.zip
(internal_self_insert): Now can return 2.
-rw-r--r--src/cmds.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/cmds.c b/src/cmds.c
index ff654319adb..582017a410c 100644
--- a/src/cmds.c
+++ b/src/cmds.c
@@ -284,7 +284,8 @@ In Auto Fill mode, if no numeric arg, break the preceding line if it's long.")
284 even if it is enabled. 284 even if it is enabled.
285 285
286 If this insertion is suitable for direct output (completely simple), 286 If this insertion is suitable for direct output (completely simple),
287 return 0. A value of 1 indicates this *might* not have been simple. */ 287 return 0. A value of 1 indicates this *might* not have been simple.
288 A value of 2 means this did things that call for an undo boundary. */
288 289
289internal_self_insert (c1, noautofill) 290internal_self_insert (c1, noautofill)
290 char c1; 291 char c1;
@@ -313,7 +314,7 @@ internal_self_insert (c1, noautofill)
313 || !((current_column () + 1) % XFASTINT (current_buffer->tab_width)))) 314 || !((current_column () + 1) % XFASTINT (current_buffer->tab_width))))
314 { 315 {
315 del_range (point, point + 1); 316 del_range (point, point + 1);
316 hairy = 1; 317 hairy = 2;
317 } 318 }
318 if (!NILP (current_buffer->abbrev_mode) 319 if (!NILP (current_buffer->abbrev_mode)
319 && SYNTAX (c) != Sword 320 && SYNTAX (c) != Sword
@@ -326,7 +327,7 @@ internal_self_insert (c1, noautofill)
326 but if Fexpand_abbrev changed the buffer, 327 but if Fexpand_abbrev changed the buffer,
327 assume it expanded something. */ 328 assume it expanded something. */
328 if (MODIFF != modiff) 329 if (MODIFF != modiff)
329 hairy = 1; 330 hairy = 2;
330 } 331 }
331 if ((c == ' ' || c == '\n') 332 if ((c == ' ' || c == '\n')
332 && !noautofill 333 && !noautofill
@@ -338,7 +339,7 @@ internal_self_insert (c1, noautofill)
338 call0 (current_buffer->auto_fill_function); 339 call0 (current_buffer->auto_fill_function);
339 if (c1 == '\n') 340 if (c1 == '\n')
340 insert (&c1, 1); 341 insert (&c1, 1);
341 hairy = 1; 342 hairy = 2;
342 } 343 }
343 else 344 else
344 insert (&c1, 1); 345 insert (&c1, 1);
@@ -347,7 +348,7 @@ internal_self_insert (c1, noautofill)
347 && !NILP (Vblink_paren_function) && INTERACTIVE) 348 && !NILP (Vblink_paren_function) && INTERACTIVE)
348 { 349 {
349 call0 (Vblink_paren_function); 350 call0 (Vblink_paren_function);
350 hairy = 1; 351 hairy = 2;
351 } 352 }
352 return hairy; 353 return hairy;
353} 354}