changeset 4372:189b84c7dbc5

(Fnewline): Disable the "insert one position before" optimization if it would screw up text property behavior.
author Richard M. Stallman <rms@gnu.org>
date Sat, 31 Jul 1993 05:53:23 +0000
parents fb0e37e7afae
children 02a515f35abc
files src/cmds.c
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/cmds.c	Sat Jul 31 05:31:58 1993 +0000
+++ b/src/cmds.c	Sat Jul 31 05:53:23 1993 +0000
@@ -254,7 +254,13 @@
 
   flag = point > BEGV && FETCH_CHAR (point - 1) == '\n';
   if (flag)
-    SET_PT (point - 1);
+    /* We cannot use this optimization if properties change
+       in the vicinity.
+       ??? We need to check for change hook properties, etc.  */
+#ifdef USE_TEXT_PROPERTIES
+    if (point - 1 > BEGV && ! property_change_between_p (point - 2, point))
+#endif
+      SET_PT (point - 1);
 
   while (XINT (arg) > 0)
     {