diff options
| author | Karoly Lorentey | 2004-04-10 23:06:09 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2004-04-10 23:06:09 +0000 |
| commit | 6858afd0c4acb9a214231f50aeab39cbcc5b3f17 (patch) | |
| tree | 06d36811f4f23ab12feb626e9575440cb2c00cf1 /src | |
| parent | 96636402928874579cdae7e3d89c40e9de0c9170 (diff) | |
| parent | d81aa76a117f4ded2f1094cf249cd3ccc06ec6d9 (diff) | |
| download | emacs-6858afd0c4acb9a214231f50aeab39cbcc5b3f17.tar.gz emacs-6858afd0c4acb9a214231f50aeab39cbcc5b3f17.zip | |
Merged in changes from CVS HEAD
Patches applied:
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-193
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-194
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-195
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-196
Remove RCS keywords
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-197
Stupid CVS keyword changes
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-198
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-199
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-134
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/buffer.c | 48 | ||||
| -rw-r--r-- | src/xfaces.c | 24 |
3 files changed, 44 insertions, 33 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 0a1c04c1151..1b5144e5b56 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2004-04-11 Masatake YAMATO <jet@gyve.org> | ||
| 2 | |||
| 3 | * buffer.c (fix_start_end_in_overlays): make overlays | ||
| 4 | empty if they are backwards. | ||
| 5 | |||
| 1 | 2004-04-07 Stefan Monnier <monnier@iro.umontreal.ca> | 6 | 2004-04-07 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 7 | ||
| 3 | * doc.c (Fsnarf_documentation): Ignore new file name entries. | 8 | * doc.c (Fsnarf_documentation): Ignore new file name entries. |
diff --git a/src/buffer.c b/src/buffer.c index 08031a0d72b..455b03efec2 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -3290,8 +3290,7 @@ adjust_overlays_for_delete (pos, length) | |||
| 3290 | endpoint in this range will need to be unlinked from the overlay | 3290 | endpoint in this range will need to be unlinked from the overlay |
| 3291 | list and reinserted in its proper place. | 3291 | list and reinserted in its proper place. |
| 3292 | Such an overlay might even have negative size at this point. | 3292 | Such an overlay might even have negative size at this point. |
| 3293 | If so, we'll reverse the endpoints. Can you think of anything | 3293 | If so, we'll make the overlay empty. */ |
| 3294 | better to do in this situation? */ | ||
| 3295 | void | 3294 | void |
| 3296 | fix_start_end_in_overlays (start, end) | 3295 | fix_start_end_in_overlays (start, end) |
| 3297 | register int start, end; | 3296 | register int start, end; |
| @@ -3318,23 +3317,24 @@ fix_start_end_in_overlays (start, end) | |||
| 3318 | for (parent = NULL, tail = current_buffer->overlays_before; tail;) | 3317 | for (parent = NULL, tail = current_buffer->overlays_before; tail;) |
| 3319 | { | 3318 | { |
| 3320 | XSETMISC (overlay, tail); | 3319 | XSETMISC (overlay, tail); |
| 3320 | |||
| 3321 | endpos = OVERLAY_POSITION (OVERLAY_END (overlay)); | 3321 | endpos = OVERLAY_POSITION (OVERLAY_END (overlay)); |
| 3322 | startpos = OVERLAY_POSITION (OVERLAY_START (overlay)); | ||
| 3323 | |||
| 3324 | /* If the overlay is backwards, make it empty. */ | ||
| 3325 | if (endpos < startpos) | ||
| 3326 | { | ||
| 3327 | startpos = endpos; | ||
| 3328 | Fset_marker (OVERLAY_START (overlay), make_number (startpos), | ||
| 3329 | Qnil); | ||
| 3330 | } | ||
| 3331 | |||
| 3322 | if (endpos < start) | 3332 | if (endpos < start) |
| 3323 | break; | 3333 | break; |
| 3324 | startpos = OVERLAY_POSITION (OVERLAY_START (overlay)); | 3334 | |
| 3325 | if (endpos < end | 3335 | if (endpos < end |
| 3326 | || (startpos >= start && startpos < end)) | 3336 | || (startpos >= start && startpos < end)) |
| 3327 | { | 3337 | { |
| 3328 | /* If the overlay is backwards, fix that now. */ | ||
| 3329 | if (startpos > endpos) | ||
| 3330 | { | ||
| 3331 | int tem; | ||
| 3332 | Fset_marker (OVERLAY_START (overlay), make_number (endpos), | ||
| 3333 | Qnil); | ||
| 3334 | Fset_marker (OVERLAY_END (overlay), make_number (startpos), | ||
| 3335 | Qnil); | ||
| 3336 | tem = startpos; startpos = endpos; endpos = tem; | ||
| 3337 | } | ||
| 3338 | /* Add it to the end of the wrong list. Later on, | 3338 | /* Add it to the end of the wrong list. Later on, |
| 3339 | recenter_overlay_lists will move it to the right place. */ | 3339 | recenter_overlay_lists will move it to the right place. */ |
| 3340 | if (endpos < current_buffer->overlay_center) | 3340 | if (endpos < current_buffer->overlay_center) |
| @@ -3365,22 +3365,24 @@ fix_start_end_in_overlays (start, end) | |||
| 3365 | for (parent = NULL, tail = current_buffer->overlays_after; tail;) | 3365 | for (parent = NULL, tail = current_buffer->overlays_after; tail;) |
| 3366 | { | 3366 | { |
| 3367 | XSETMISC (overlay, tail); | 3367 | XSETMISC (overlay, tail); |
| 3368 | |||
| 3368 | startpos = OVERLAY_POSITION (OVERLAY_START (overlay)); | 3369 | startpos = OVERLAY_POSITION (OVERLAY_START (overlay)); |
| 3370 | endpos = OVERLAY_POSITION (OVERLAY_END (overlay)); | ||
| 3371 | |||
| 3372 | /* If the overlay is backwards, make it empty. */ | ||
| 3373 | if (endpos < startpos) | ||
| 3374 | { | ||
| 3375 | startpos = endpos; | ||
| 3376 | Fset_marker (OVERLAY_START (overlay), make_number (startpos), | ||
| 3377 | Qnil); | ||
| 3378 | } | ||
| 3379 | |||
| 3369 | if (startpos >= end) | 3380 | if (startpos >= end) |
| 3370 | break; | 3381 | break; |
| 3371 | endpos = OVERLAY_POSITION (OVERLAY_END (overlay)); | 3382 | |
| 3372 | if (startpos >= start | 3383 | if (startpos >= start |
| 3373 | || (endpos >= start && endpos < end)) | 3384 | || (endpos >= start && endpos < end)) |
| 3374 | { | 3385 | { |
| 3375 | if (startpos > endpos) | ||
| 3376 | { | ||
| 3377 | int tem; | ||
| 3378 | Fset_marker (OVERLAY_START (overlay), make_number (endpos), | ||
| 3379 | Qnil); | ||
| 3380 | Fset_marker (OVERLAY_END (overlay), make_number (startpos), | ||
| 3381 | Qnil); | ||
| 3382 | tem = startpos; startpos = endpos; endpos = tem; | ||
| 3383 | } | ||
| 3384 | if (endpos < current_buffer->overlay_center) | 3386 | if (endpos < current_buffer->overlay_center) |
| 3385 | { | 3387 | { |
| 3386 | if (!afterp) | 3388 | if (!afterp) |
diff --git a/src/xfaces.c b/src/xfaces.c index 7761282f9eb..2e6d43a54b7 100644 --- a/src/xfaces.c +++ b/src/xfaces.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* xfaces.c -- "Face" primitives. | 1 | /* xfaces.c -- "Face" primitives. |
| 2 | Copyright (C) 1993, 1994, 1998, 1999, 2000, 2001, 2002, 2003 | 2 | Copyright (C) 1993, 1994, 1998, 1999, 2000, 2001, 2002, 2003, 2004 |
| 3 | Free Software Foundation. | 3 | Free Software Foundation. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| @@ -1508,15 +1508,19 @@ face_color_supported_p (f, color_name, background_p) | |||
| 1508 | XColor not_used; | 1508 | XColor not_used; |
| 1509 | 1509 | ||
| 1510 | XSETFRAME (frame, f); | 1510 | XSETFRAME (frame, f); |
| 1511 | return (FRAME_WINDOW_P (f) | 1511 | return |
| 1512 | ? (!NILP (Fxw_display_color_p (frame)) | 1512 | #ifdef HAVE_X_WINDOWS |
| 1513 | || xstricmp (color_name, "black") == 0 | 1513 | FRAME_WINDOW_P (f) |
| 1514 | || xstricmp (color_name, "white") == 0 | 1514 | ? (!NILP (Fxw_display_color_p (frame)) |
| 1515 | || (background_p | 1515 | || xstricmp (color_name, "black") == 0 |
| 1516 | && face_color_gray_p (f, color_name)) | 1516 | || xstricmp (color_name, "white") == 0 |
| 1517 | || (!NILP (Fx_display_grayscale_p (frame)) | 1517 | || (background_p |
| 1518 | && face_color_gray_p (f, color_name))) | 1518 | && face_color_gray_p (f, color_name)) |
| 1519 | : tty_defined_color (f, color_name, ¬_used, 0)); | 1519 | || (!NILP (Fx_display_grayscale_p (frame)) |
| 1520 | && face_color_gray_p (f, color_name))) | ||
| 1521 | : | ||
| 1522 | #endif | ||
| 1523 | tty_defined_color (f, color_name, ¬_used, 0); | ||
| 1520 | } | 1524 | } |
| 1521 | 1525 | ||
| 1522 | 1526 | ||