diff options
| author | Karoly Lorentey | 2004-05-18 19:12:15 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2004-05-18 19:12:15 +0000 |
| commit | c23670f81e059ebe645c88575f4ddfa67f26bf6b (patch) | |
| tree | 71667a6ceaa877ccf3953abedfa7b0fd5f0f5369 /src/textprop.c | |
| parent | d9858e4f1889a61b216ae1f99053846362067ccc (diff) | |
| parent | a7f7f2540f02834ad128d0c9357a4dbd8222dff4 (diff) | |
| download | emacs-c23670f81e059ebe645c88575f4ddfa67f26bf6b.tar.gz emacs-c23670f81e059ebe645c88575f4ddfa67f26bf6b.zip | |
Merged in changes from CVS trunk.
Patches applied:
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-299
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-300
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-301
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-302
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-303
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-304
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-305
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-306
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-307
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-308
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-309
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-310
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-311
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-312
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-313
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-314
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-315
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-316
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-317
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-318
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-319
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-320
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-321
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-322
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-323
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-324
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-163
Diffstat (limited to 'src/textprop.c')
| -rw-r--r-- | src/textprop.c | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/src/textprop.c b/src/textprop.c index 4f13aefb1be..c8ec008dcbd 100644 --- a/src/textprop.c +++ b/src/textprop.c | |||
| @@ -637,30 +637,13 @@ get_char_property_and_overlay (position, prop, object, overlay) | |||
| 637 | } | 637 | } |
| 638 | if (BUFFERP (object)) | 638 | if (BUFFERP (object)) |
| 639 | { | 639 | { |
| 640 | int posn = XINT (position); | ||
| 641 | int noverlays; | 640 | int noverlays; |
| 642 | Lisp_Object *overlay_vec, tem; | 641 | Lisp_Object *overlay_vec; |
| 643 | int len; | ||
| 644 | struct buffer *obuf = current_buffer; | 642 | struct buffer *obuf = current_buffer; |
| 645 | 643 | ||
| 646 | set_buffer_temp (XBUFFER (object)); | 644 | set_buffer_temp (XBUFFER (object)); |
| 647 | 645 | ||
| 648 | /* First try with room for 40 overlays. */ | 646 | GET_OVERLAYS_AT (XINT (position), overlay_vec, noverlays, NULL, 0); |
| 649 | len = 40; | ||
| 650 | overlay_vec = (Lisp_Object *) alloca (len * sizeof (Lisp_Object)); | ||
| 651 | |||
| 652 | noverlays = overlays_at (posn, 0, &overlay_vec, &len, | ||
| 653 | NULL, NULL, 0); | ||
| 654 | |||
| 655 | /* If there are more than 40, | ||
| 656 | make enough space for all, and try again. */ | ||
| 657 | if (noverlays > len) | ||
| 658 | { | ||
| 659 | len = noverlays; | ||
| 660 | overlay_vec = (Lisp_Object *) alloca (len * sizeof (Lisp_Object)); | ||
| 661 | noverlays = overlays_at (posn, 0, &overlay_vec, &len, | ||
| 662 | NULL, NULL, 0); | ||
| 663 | } | ||
| 664 | noverlays = sort_overlays (overlay_vec, noverlays, w); | 647 | noverlays = sort_overlays (overlay_vec, noverlays, w); |
| 665 | 648 | ||
| 666 | set_buffer_temp (obuf); | 649 | set_buffer_temp (obuf); |
| @@ -668,7 +651,7 @@ get_char_property_and_overlay (position, prop, object, overlay) | |||
| 668 | /* Now check the overlays in order of decreasing priority. */ | 651 | /* Now check the overlays in order of decreasing priority. */ |
| 669 | while (--noverlays >= 0) | 652 | while (--noverlays >= 0) |
| 670 | { | 653 | { |
| 671 | tem = Foverlay_get (overlay_vec[noverlays], prop); | 654 | Lisp_Object tem = Foverlay_get (overlay_vec[noverlays], prop); |
| 672 | if (!NILP (tem)) | 655 | if (!NILP (tem)) |
| 673 | { | 656 | { |
| 674 | if (overlay) | 657 | if (overlay) |