/* Simple built-in editing commands.
- Copyright (C) 1985 Free Software Foundation, Inc.
+ Copyright (C) 1985, 1992 Free Software Foundation, Inc.
This file is part of GNU Emacs.
GNU Emacs is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 1, or (at your option)
+the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Emacs is distributed in the hope that it will be useful,
pos = scan_buffer ('\n', pos2, count - negp, &shortage);
if (shortage > 0
&& (negp
- || (ZV >= BEGV
+ || (ZV > BEGV
+ && pos != pos2
&& FETCH_CHAR (pos - 1) != '\n')))
shortage--;
SET_PT (pos);
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;
&& 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')