diff options
| author | Paul Eggert | 2012-08-17 14:12:11 -0700 |
|---|---|---|
| committer | Paul Eggert | 2012-08-17 14:12:11 -0700 |
| commit | 0c94c8d603031f6b665ae7f3136ca77fb573fd7e (patch) | |
| tree | fabdd332bf09c4ea02198aa36a6a7bdab7e43397 /src/intervals.h | |
| parent | ee21815118944347ad0c45d47af651e7283709d2 (diff) | |
| download | emacs-0c94c8d603031f6b665ae7f3136ca77fb573fd7e.tar.gz emacs-0c94c8d603031f6b665ae7f3136ca77fb573fd7e.zip | |
A few more naming-convention fixes for getters and setters.
* buffer.c (set_buffer_overlays_before): Move here from buffer.h,
and rename from buffer_overlays_set_before.
(set_buffer_overlays_after): Move here from buffer.h, and rename
from buffer_overlays_set_after.
* buffer.h (buffer_intervals): Rename from buffer_get_intervals.
All uses changed.
(set_buffer_intervals): Rename from buffer_set_intervals.
* intervals.c (set_interval_object): Move here from intervals.h,
and rename from interval_set_object.
(set_interval_left): Move here from intervals.h, and rename from
interval_set_left.
(set_interval_right): Move here from intervals.h, and rename from
interval_set_right.
(copy_interval_parent): Move here from intervals.h, and rename from
interval_copy_parent.
* intervals.h (set_interval_parent): Rename from interval_set_parent.
(set_interval_plist): Rename from interval_set_plist.
Return void, not Lisp_Object, since no caller uses the result.
* lisp.h (string_intervals): Rename from string_get_intervals.
(set_string_intervals): Rename from string_set_intervals.
Diffstat (limited to 'src/intervals.h')
| -rw-r--r-- | src/intervals.h | 39 |
1 files changed, 4 insertions, 35 deletions
diff --git a/src/intervals.h b/src/intervals.h index a5166c6376f..01e72d7c9db 100644 --- a/src/intervals.h +++ b/src/intervals.h | |||
| @@ -137,47 +137,16 @@ struct interval | |||
| 137 | or pointer slots of struct interval. */ | 137 | or pointer slots of struct interval. */ |
| 138 | 138 | ||
| 139 | INTERVALS_INLINE void | 139 | INTERVALS_INLINE void |
| 140 | interval_set_parent (INTERVAL i, INTERVAL parent) | 140 | set_interval_parent (INTERVAL i, INTERVAL parent) |
| 141 | { | 141 | { |
| 142 | i->up_obj = 0; | 142 | i->up_obj = 0; |
| 143 | i->up.interval = parent; | 143 | i->up.interval = parent; |
| 144 | } | 144 | } |
| 145 | 145 | ||
| 146 | INTERVALS_INLINE void | 146 | INTERVALS_INLINE void |
| 147 | interval_set_object (INTERVAL i, Lisp_Object obj) | 147 | set_interval_plist (INTERVAL i, Lisp_Object plist) |
| 148 | { | ||
| 149 | eassert (BUFFERP (obj) || STRINGP (obj)); | ||
| 150 | i->up_obj = 1; | ||
| 151 | i->up.obj = obj; | ||
| 152 | } | ||
| 153 | |||
| 154 | INTERVALS_INLINE void | ||
| 155 | interval_set_left (INTERVAL i, INTERVAL left) | ||
| 156 | { | ||
| 157 | i->left = left; | ||
| 158 | } | ||
| 159 | |||
| 160 | INTERVALS_INLINE void | ||
| 161 | interval_set_right (INTERVAL i, INTERVAL right) | ||
| 162 | { | ||
| 163 | i->right = right; | ||
| 164 | } | ||
| 165 | |||
| 166 | INTERVALS_INLINE Lisp_Object | ||
| 167 | interval_set_plist (INTERVAL i, Lisp_Object plist) | ||
| 168 | { | 148 | { |
| 169 | i->plist = plist; | 149 | i->plist = plist; |
| 170 | return plist; | ||
| 171 | } | ||
| 172 | |||
| 173 | /* Make the parent of D be whatever the parent of S is, regardless | ||
| 174 | of the type. This is used when balancing an interval tree. */ | ||
| 175 | |||
| 176 | INTERVALS_INLINE void | ||
| 177 | interval_copy_parent (INTERVAL d, INTERVAL s) | ||
| 178 | { | ||
| 179 | d->up = s->up; | ||
| 180 | d->up_obj = s->up_obj; | ||
| 181 | } | 150 | } |
| 182 | 151 | ||
| 183 | /* Get the parent interval, if any, otherwise a null pointer. Useful | 152 | /* Get the parent interval, if any, otherwise a null pointer. Useful |
| @@ -191,11 +160,11 @@ interval_copy_parent (INTERVAL d, INTERVAL s) | |||
| 191 | { \ | 160 | { \ |
| 192 | (i)->total_length = (i)->position = 0; \ | 161 | (i)->total_length = (i)->position = 0; \ |
| 193 | (i)->left = (i)->right = NULL; \ | 162 | (i)->left = (i)->right = NULL; \ |
| 194 | interval_set_parent (i, NULL); \ | 163 | set_interval_parent (i, NULL); \ |
| 195 | (i)->write_protect = 0; \ | 164 | (i)->write_protect = 0; \ |
| 196 | (i)->visible = 0; \ | 165 | (i)->visible = 0; \ |
| 197 | (i)->front_sticky = (i)->rear_sticky = 0; \ | 166 | (i)->front_sticky = (i)->rear_sticky = 0; \ |
| 198 | interval_set_plist (i, Qnil); \ | 167 | set_interval_plist (i, Qnil); \ |
| 199 | } | 168 | } |
| 200 | 169 | ||
| 201 | /* Copy the cached property values of interval FROM to interval TO. */ | 170 | /* Copy the cached property values of interval FROM to interval TO. */ |