diff options
author | Dmitry Antipov <dmantipov@yandex.ru> | 2012-07-17 13:12:24 +0400 |
---|---|---|
committer | Dmitry Antipov <dmantipov@yandex.ru> | 2012-07-17 13:12:24 +0400 |
commit | cce7fefcabe5794120d08714cbef6bba0c264226 (patch) | |
tree | 1b9368a12f1ea3193bc8c534729e83080ea415d6 /src/textprop.c | |
parent | efc26dbecd1b548d6f44267ce13b56dbad8ab783 (diff) | |
download | emacs-cce7fefcabe5794120d08714cbef6bba0c264226.tar.gz |
Cleanup and convert miscellaneous checks to eassert.
* alloc.c (mark_interval): Fix comment, partially rephrase
old comment from intervals.h (see below).
* intervals.c (find_interval, adjust_intervals_for_insertion)
(delete_interval, adjust_intervals_for_deletion)
(graft_intervals_into_buffer, temp_set_point_both, copy_intervals):
Convert to eassert.
(adjust_intervals_for_insertion, make_new_interval):
Remove obsolete and unused code.
* intervals.h (struct interval): Remove obsolete comment.
* textprotp.c (erase_properties): Remove unused code.
(Fadd_text_properties, set_text_properties_1, Fremove_text_properties)
(Fremove_list_of_text_properties): Convert to eassert.
Diffstat (limited to 'src/textprop.c')
-rw-r--r-- | src/textprop.c | 27 |
1 files changed, 4 insertions, 23 deletions
diff --git a/src/textprop.c b/src/textprop.c index efce7259ce5..8aa52bebe5b 100644 --- a/src/textprop.c +++ b/src/textprop.c @@ -487,21 +487,6 @@ remove_properties (Lisp_Object plist, Lisp_Object list, INTERVAL i, Lisp_Object i->plist = current_plist; return changed; } - -#if 0 -/* Remove all properties from interval I. Return non-zero - if this changes the interval. */ - -static inline int -erase_properties (INTERVAL i) -{ - if (NILP (i->plist)) - return 0; - - i->plist = Qnil; - return 1; -} -#endif /* Returns the interval of POSITION in OBJECT. POSITION is BEG-based. */ @@ -1183,8 +1168,7 @@ Return t if any property value actually changed, nil otherwise. */) /* We are at the beginning of interval I, with LEN chars to scan. */ for (;;) { - if (i == 0) - abort (); + eassert (i != 0); if (LENGTH (i) >= len) { @@ -1383,8 +1367,7 @@ set_text_properties_1 (Lisp_Object start, Lisp_Object end, Lisp_Object propertie /* We are starting at the beginning of an interval I. LEN is positive. */ do { - if (i == 0) - abort (); + eassert (i != 0); if (LENGTH (i) >= len) { @@ -1472,8 +1455,7 @@ Use `set-text-properties' if you want to remove all text properties. */) /* We are at the beginning of an interval, with len to scan */ for (;;) { - if (i == 0) - abort (); + eassert (i != 0); if (LENGTH (i) >= len) { @@ -1562,8 +1544,7 @@ Return t if any property was actually removed, nil otherwise. */) and we call signal_after_change before returning if modified != 0. */ for (;;) { - if (i == 0) - abort (); + eassert (i != 0); if (LENGTH (i) >= len) { |