aboutsummaryrefslogtreecommitdiffstats
path: root/src/cmds.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmds.c')
-rw-r--r--src/cmds.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/cmds.c b/src/cmds.c
index 915c185bafc..691a60f5cc0 100644
--- a/src/cmds.c
+++ b/src/cmds.c
@@ -256,6 +256,12 @@ In Auto Fill mode, if no numeric arg, break the preceding line if it's long.")
256 return Qnil; 256 return Qnil;
257} 257}
258 258
259/* Insert character C1. If NOAUTOFILL is nonzero, don't do autofill
260 even if it is enabled.
261
262 If this insertion is suitable for direct output (completely simple),
263 return 0. A value of 1 indicates this *might* not have been simple. */
264
259internal_self_insert (c1, noautofill) 265internal_self_insert (c1, noautofill)
260 char c1; 266 char c1;
261 int noautofill; 267 int noautofill;
@@ -284,8 +290,11 @@ internal_self_insert (c1, noautofill)
284 && NILP (current_buffer->read_only) 290 && NILP (current_buffer->read_only)
285 && point > BEGV && SYNTAX (FETCH_CHAR (point - 1)) == Sword) 291 && point > BEGV && SYNTAX (FETCH_CHAR (point - 1)) == Sword)
286 { 292 {
287 tem = Fexpand_abbrev (); 293 Fexpand_abbrev ();
288 if (!NILP (tem)) 294 /* We can't trust the value of Fexpand_abbrev,
295 but if the buffer is now changed, this is "hairy"
296 and not suitable for direct output. */
297 if (MODIFF <= current_buffer->save_modified)
289 hairy = 1; 298 hairy = 1;
290 } 299 }
291 if ((c == ' ' || c == '\n') 300 if ((c == ' ' || c == '\n')