diff options
| author | Joakim Verona | 2012-07-27 02:22:03 +0200 |
|---|---|---|
| committer | Joakim Verona | 2012-07-27 02:22:03 +0200 |
| commit | 5fb63197843dcae66f2fe0ddd6f4a9d560e9db2f (patch) | |
| tree | 5c55f1096a656a9759f0b53a0b5d1a2289bd366f /src/textprop.c | |
| parent | 0c5c85cf2b350c965bb1ffa5b2d77c2adebc406b (diff) | |
| parent | 562157c814037dcba58a20cd6908a95992c22283 (diff) | |
| download | emacs-5fb63197843dcae66f2fe0ddd6f4a9d560e9db2f.tar.gz emacs-5fb63197843dcae66f2fe0ddd6f4a9d560e9db2f.zip | |
upstream
Diffstat (limited to 'src/textprop.c')
| -rw-r--r-- | src/textprop.c | 35 |
1 files changed, 6 insertions, 29 deletions
diff --git a/src/textprop.c b/src/textprop.c index afeb0339d5c..8aa52bebe5b 100644 --- a/src/textprop.c +++ b/src/textprop.c | |||
| @@ -72,15 +72,11 @@ Lisp_Object Qfront_sticky, Qrear_nonsticky; | |||
| 72 | static Lisp_Object interval_insert_behind_hooks; | 72 | static Lisp_Object interval_insert_behind_hooks; |
| 73 | static Lisp_Object interval_insert_in_front_hooks; | 73 | static Lisp_Object interval_insert_in_front_hooks; |
| 74 | 74 | ||
| 75 | static void text_read_only (Lisp_Object) NO_RETURN; | ||
| 76 | static Lisp_Object Fprevious_property_change (Lisp_Object, Lisp_Object, | ||
| 77 | Lisp_Object); | ||
| 78 | |||
| 79 | 75 | ||
| 80 | /* Signal a `text-read-only' error. This function makes it easier | 76 | /* Signal a `text-read-only' error. This function makes it easier |
| 81 | to capture that error in GDB by putting a breakpoint on it. */ | 77 | to capture that error in GDB by putting a breakpoint on it. */ |
| 82 | 78 | ||
| 83 | static void | 79 | static _Noreturn void |
| 84 | text_read_only (Lisp_Object propval) | 80 | text_read_only (Lisp_Object propval) |
| 85 | { | 81 | { |
| 86 | if (STRINGP (propval)) | 82 | if (STRINGP (propval)) |
| @@ -275,7 +271,7 @@ interval_has_some_properties_list (Lisp_Object list, INTERVAL i) | |||
| 275 | /* Go through each element of LIST. */ | 271 | /* Go through each element of LIST. */ |
| 276 | for (tail1 = list; CONSP (tail1); tail1 = XCDR (tail1)) | 272 | for (tail1 = list; CONSP (tail1); tail1 = XCDR (tail1)) |
| 277 | { | 273 | { |
| 278 | sym = Fcar (tail1); | 274 | sym = XCAR (tail1); |
| 279 | 275 | ||
| 280 | /* Go through i's plist, looking for tail1 */ | 276 | /* Go through i's plist, looking for tail1 */ |
| 281 | for (tail2 = i->plist; CONSP (tail2); tail2 = XCDR (XCDR (tail2))) | 277 | for (tail2 = i->plist; CONSP (tail2); tail2 = XCDR (XCDR (tail2))) |
| @@ -491,21 +487,6 @@ remove_properties (Lisp_Object plist, Lisp_Object list, INTERVAL i, Lisp_Object | |||
| 491 | i->plist = current_plist; | 487 | i->plist = current_plist; |
| 492 | return changed; | 488 | return changed; |
| 493 | } | 489 | } |
| 494 | |||
| 495 | #if 0 | ||
| 496 | /* Remove all properties from interval I. Return non-zero | ||
| 497 | if this changes the interval. */ | ||
| 498 | |||
| 499 | static inline int | ||
| 500 | erase_properties (INTERVAL i) | ||
| 501 | { | ||
| 502 | if (NILP (i->plist)) | ||
| 503 | return 0; | ||
| 504 | |||
| 505 | i->plist = Qnil; | ||
| 506 | return 1; | ||
| 507 | } | ||
| 508 | #endif | ||
| 509 | 490 | ||
| 510 | /* Returns the interval of POSITION in OBJECT. | 491 | /* Returns the interval of POSITION in OBJECT. |
| 511 | POSITION is BEG-based. */ | 492 | POSITION is BEG-based. */ |
| @@ -1187,8 +1168,7 @@ Return t if any property value actually changed, nil otherwise. */) | |||
| 1187 | /* We are at the beginning of interval I, with LEN chars to scan. */ | 1168 | /* We are at the beginning of interval I, with LEN chars to scan. */ |
| 1188 | for (;;) | 1169 | for (;;) |
| 1189 | { | 1170 | { |
| 1190 | if (i == 0) | 1171 | eassert (i != 0); |
| 1191 | abort (); | ||
| 1192 | 1172 | ||
| 1193 | if (LENGTH (i) >= len) | 1173 | if (LENGTH (i) >= len) |
| 1194 | { | 1174 | { |
| @@ -1387,8 +1367,7 @@ set_text_properties_1 (Lisp_Object start, Lisp_Object end, Lisp_Object propertie | |||
| 1387 | /* We are starting at the beginning of an interval I. LEN is positive. */ | 1367 | /* We are starting at the beginning of an interval I. LEN is positive. */ |
| 1388 | do | 1368 | do |
| 1389 | { | 1369 | { |
| 1390 | if (i == 0) | 1370 | eassert (i != 0); |
| 1391 | abort (); | ||
| 1392 | 1371 | ||
| 1393 | if (LENGTH (i) >= len) | 1372 | if (LENGTH (i) >= len) |
| 1394 | { | 1373 | { |
| @@ -1476,8 +1455,7 @@ Use `set-text-properties' if you want to remove all text properties. */) | |||
| 1476 | /* We are at the beginning of an interval, with len to scan */ | 1455 | /* We are at the beginning of an interval, with len to scan */ |
| 1477 | for (;;) | 1456 | for (;;) |
| 1478 | { | 1457 | { |
| 1479 | if (i == 0) | 1458 | eassert (i != 0); |
| 1480 | abort (); | ||
| 1481 | 1459 | ||
| 1482 | if (LENGTH (i) >= len) | 1460 | if (LENGTH (i) >= len) |
| 1483 | { | 1461 | { |
| @@ -1566,8 +1544,7 @@ Return t if any property was actually removed, nil otherwise. */) | |||
| 1566 | and we call signal_after_change before returning if modified != 0. */ | 1544 | and we call signal_after_change before returning if modified != 0. */ |
| 1567 | for (;;) | 1545 | for (;;) |
| 1568 | { | 1546 | { |
| 1569 | if (i == 0) | 1547 | eassert (i != 0); |
| 1570 | abort (); | ||
| 1571 | 1548 | ||
| 1572 | if (LENGTH (i) >= len) | 1549 | if (LENGTH (i) >= len) |
| 1573 | { | 1550 | { |