Mercurial > emacs
comparison src/cmds.c @ 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 | 507f64624555 |
children | f8a991076926 |
comparison
equal
deleted
inserted
replaced
4371:fb0e37e7afae | 4372:189b84c7dbc5 |
---|---|
252 the insertion correctly. Luckily, internal_self_insert's special | 252 the insertion correctly. Luckily, internal_self_insert's special |
253 features all do nothing in that case. */ | 253 features all do nothing in that case. */ |
254 | 254 |
255 flag = point > BEGV && FETCH_CHAR (point - 1) == '\n'; | 255 flag = point > BEGV && FETCH_CHAR (point - 1) == '\n'; |
256 if (flag) | 256 if (flag) |
257 SET_PT (point - 1); | 257 /* We cannot use this optimization if properties change |
258 in the vicinity. | |
259 ??? We need to check for change hook properties, etc. */ | |
260 #ifdef USE_TEXT_PROPERTIES | |
261 if (point - 1 > BEGV && ! property_change_between_p (point - 2, point)) | |
262 #endif | |
263 SET_PT (point - 1); | |
258 | 264 |
259 while (XINT (arg) > 0) | 265 while (XINT (arg) > 0) |
260 { | 266 { |
261 if (flag) | 267 if (flag) |
262 insert (&c1, 1); | 268 insert (&c1, 1); |