Mercurial > emacs
comparison src/buffer.c @ 85242:9b00632ffdf2
(add_overlay_mod_hooklist): Use larger_vector.
| author | Eli Zaretskii <eliz@gnu.org> |
|---|---|
| date | Sat, 13 Oct 2007 12:06:04 +0000 |
| parents | 5039706521c9 |
| children | 86224da3fd17 |
comparison
equal
deleted
inserted
replaced
| 85241:af5773b20bd9 | 85242:9b00632ffdf2 |
|---|---|
| 4215 Lisp_Object functionlist, overlay; | 4215 Lisp_Object functionlist, overlay; |
| 4216 { | 4216 { |
| 4217 int oldsize = XVECTOR (last_overlay_modification_hooks)->size; | 4217 int oldsize = XVECTOR (last_overlay_modification_hooks)->size; |
| 4218 | 4218 |
| 4219 if (last_overlay_modification_hooks_used == oldsize) | 4219 if (last_overlay_modification_hooks_used == oldsize) |
| 4220 { | 4220 last_overlay_modification_hooks = larger_vector |
| 4221 Lisp_Object old; | 4221 (last_overlay_modification_hooks, oldsize * 2, Qnil); |
| 4222 old = last_overlay_modification_hooks; | |
| 4223 last_overlay_modification_hooks | |
| 4224 = Fmake_vector (make_number (oldsize * 2), Qnil); | |
| 4225 bcopy (XVECTOR (old)->contents, | |
| 4226 XVECTOR (last_overlay_modification_hooks)->contents, | |
| 4227 sizeof (Lisp_Object) * oldsize); | |
| 4228 } | |
| 4229 AREF (last_overlay_modification_hooks, last_overlay_modification_hooks_used++) = functionlist; | 4222 AREF (last_overlay_modification_hooks, last_overlay_modification_hooks_used++) = functionlist; |
| 4230 AREF (last_overlay_modification_hooks, last_overlay_modification_hooks_used++) = overlay; | 4223 AREF (last_overlay_modification_hooks, last_overlay_modification_hooks_used++) = overlay; |
| 4231 } | 4224 } |
| 4232 | 4225 |
| 4233 /* Run the modification-hooks of overlays that include | 4226 /* Run the modification-hooks of overlays that include |
