]> code.delx.au - gnu-emacs/blobdiff - src/cmds.c
(SYSTEM_TYPE): Use berkeley-unix.
[gnu-emacs] / src / cmds.c
index 915c185bafcda0c03d04311ecbd994799e252d08..c8e9bfd76ec02ff7d10defd20d89dcf9b77b602d 100644 (file)
@@ -256,6 +256,12 @@ In Auto Fill mode, if no numeric arg, break the preceding line if it's long.")
   return Qnil;
 }
 
+/* Insert character C1.  If NOAUTOFILL is nonzero, don't do autofill
+   even if it is enabled.
+
+   If this insertion is suitable for direct output (completely simple),
+   return 0.  A value of 1 indicates this *might* not have been simple.  */
+
 internal_self_insert (c1, noautofill)
      char c1;
      int noautofill;
@@ -284,8 +290,12 @@ internal_self_insert (c1, noautofill)
       && NILP (current_buffer->read_only)
       && point > BEGV && SYNTAX (FETCH_CHAR (point - 1)) == Sword)
     {
-      tem = Fexpand_abbrev ();
-      if (!NILP (tem))
+      int modiff = MODIFF;
+      Fexpand_abbrev ();
+      /* We can't trust the value of Fexpand_abbrev,
+        but if Fexpand_abbrev changed the buffer,
+        assume it expanded something.  */
+      if (MODIFF != modiff)
        hairy = 1;
     }
   if ((c == ' ' || c == '\n')