aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorStefan Monnier2002-01-25 22:42:13 +0000
committerStefan Monnier2002-01-25 22:42:13 +0000
commit3a232704c320bc4596af1d0367143f64ac10a21c (patch)
tree1f6bb5724f64e687e3421a8eff77e372d01f8424 /src
parent843e5edd2125db25cb21c403a89768d0c4af9d18 (diff)
downloademacs-3a232704c320bc4596af1d0367143f64ac10a21c.tar.gz
emacs-3a232704c320bc4596af1d0367143f64ac10a21c.zip
(Fnext_property_change, Fnext_single_property_change)
(Fprevious_property_change, Fprevious_single_property_change): Stay within the narrowed-buffer boundaries.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog40
-rw-r--r--src/textprop.c32
2 files changed, 43 insertions, 29 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 1de38454e55..2d96bd9fb0d 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
12002-01-25 Stefan Monnier <monnier@cs.yale.edu>
2
3 * textprop.c (Fnext_property_change, Fnext_single_property_change)
4 (Fprevious_property_change, Fprevious_single_property_change):
5 Stay within the narrowed-buffer boundaries.
6
12002-01-25 Eli Zaretskii <eliz@is.elta.co.il> 72002-01-25 Eli Zaretskii <eliz@is.elta.co.il>
2 8
3 * term.c (Ftty_display_color_cells): New function. 9 * term.c (Ftty_display_color_cells): New function.
@@ -270,7 +276,7 @@
2702002-01-07 Jason Rumney <jasonr@gnu.org> 2762002-01-07 Jason Rumney <jasonr@gnu.org>
271 277
272 * xmenu.c (set_frame_menubar, xmenu_show): 278 * xmenu.c (set_frame_menubar, xmenu_show):
273 (xdialog_show): Initialize wv->help to Qnil. 279 (xdialog_show): Initialize wv->help to Qnil.
274 280
275 * w32menu.c (single_submenu, set_frame_menubar, w32_menu_show): 281 * w32menu.c (single_submenu, set_frame_menubar, w32_menu_show):
276 (w32_dialog_show): Initialize wv->help to Qnil. 282 (w32_dialog_show): Initialize wv->help to Qnil.
@@ -305,8 +311,8 @@
305 (notice_overwritten_cursor): Don't depend on 311 (notice_overwritten_cursor): Don't depend on
306 output_cursor and updated_area. Compare pixel coordinates with 312 output_cursor and updated_area. Compare pixel coordinates with
307 window's cursor pixel coordinates. 313 window's cursor pixel coordinates.
308 (x_draw_glyphs, x_clear_end_of_line, show_mouse_face): Call 314 (x_draw_glyphs, x_clear_end_of_line, show_mouse_face):
309 notice_overwritten_cursor with new arg list. 315 Call notice_overwritten_cursor with new arg list.
310 (show_mouse_face): Fix bug setting a row's mouse_face_p flag 316 (show_mouse_face): Fix bug setting a row's mouse_face_p flag
311 unconditionally. 317 unconditionally.
312 (x_draw_image_relief): Use predefined macro instead of 318 (x_draw_image_relief): Use predefined macro instead of
@@ -404,17 +410,17 @@
404 * keymap.c (Flookup_key): Error message if key has wrong data type. 410 * keymap.c (Flookup_key): Error message if key has wrong data type.
405 (Fdefine_key): Add error message for trying to bind [DEL], [RET], etc. 411 (Fdefine_key): Add error message for trying to bind [DEL], [RET], etc.
406 (exclude_key): New variable. 412 (exclude_key): New variable.
407 413
4082001-12-28 Gerd Moellmann <gerd@gnu.org> 4142001-12-28 Gerd Moellmann <gerd@gnu.org>
409 415
410 * xterm.c (x_setup_relief_colors): Don't compute an image's 416 * xterm.c (x_setup_relief_colors): Don't compute an image's
411 background color if it doesn't have a Pixmap. 417 background color if it doesn't have a Pixmap.
412 418
413 * xterm.c (notice_overwritten_cursor): Don't depend on 419 * xterm.c (notice_overwritten_cursor): Don't depend on
414 output_cursor and updated_area. Compare pixel coordinates with 420 output_cursor and updated_area. Compare pixel coordinates with
415 window's cursor pixel coordinates. 421 window's cursor pixel coordinates.
416 (x_draw_glyphs, x_clear_end_of_line, show_mouse_face): Call 422 (x_draw_glyphs, x_clear_end_of_line, show_mouse_face):
417 notice_overwritten_cursor with new arg list. 423 Call notice_overwritten_cursor with new arg list.
418 (show_mouse_face): Fix bug setting a row's mouse_face_p flag 424 (show_mouse_face): Fix bug setting a row's mouse_face_p flag
419 unconditionally. 425 unconditionally.
420 426
@@ -441,7 +447,7 @@
441 separated by mouse-movement. When tracking mouse, only record 447 separated by mouse-movement. When tracking mouse, only record
442 first and last mouse-movement event in same window. 448 first and last mouse-movement event in same window.
443 Don't record mouse-movement events in keyboard macros. 449 Don't record mouse-movement events in keyboard macros.
444 450
4452001-12-25 Richard M. Stallman <rms@gnu.org> 4512001-12-25 Richard M. Stallman <rms@gnu.org>
446 452
447 * window.c (enlarge_window): New arg PRESERVE_BEFORE. Callers changed. 453 * window.c (enlarge_window): New arg PRESERVE_BEFORE. Callers changed.
@@ -452,7 +458,7 @@
452 458
4532001-12-22 Pavel Jan,Bm(Bk <Pavel@Janik.cz> 4592001-12-22 Pavel Jan,Bm(Bk <Pavel@Janik.cz>
454 460
455 The following changes remove mocklisp support: 461 The following changes remove mocklisp support:
456 462
457 * mocklisp.h, mocklisp.c: Files removed. 463 * mocklisp.h, mocklisp.c: Files removed.
458 464
@@ -460,17 +466,15 @@
460 `Qmocklisp' and `Qmocklisp_arguments'. 466 `Qmocklisp' and `Qmocklisp_arguments'.
461 Remove prototype of syms_of_mocklisp. 467 Remove prototype of syms_of_mocklisp.
462 468
463 * makefile.nt, makefile.w32-in, Makefile.in: Remove mocklisp 469 * makefile.nt, makefile.w32-in, Makefile.in: Remove mocklisp files.
464 files.
465 470
466 * callint.c: Do not include mocklisp.h. 471 * callint.c: Do not include mocklisp.h.
467 (Fcall_interactively): Do not test for mocklisp case. 472 (Fcall_interactively): Do not test for mocklisp case.
468 473
469 * eval.c: Remove variables `Qmocklisp_arguments', 474 * eval.c: Remove variables `Qmocklisp_arguments',
470 `Vmocklisp_arguments' and `Qmocklisp'. Remove prototype of 475 `Vmocklisp_arguments' and `Qmocklisp'. Remove prototype of ml_apply.
471 ml_apply. 476 (Fprogn, Fwhile, Fcommandp, Feval, Ffuncall, funcall_lambda):
472 (Fprogn, Fwhile, Fcommandp, Feval, Ffuncall, funcall_lambda): Do 477 Do not test for mocklisp case.
473 not test for mocklisp case.
474 (Fwhile): Remove unused variable `tem'. 478 (Fwhile): Remove unused variable `tem'.
475 (syms_of_eval): Remove variable `moclisp-arguments'. 479 (syms_of_eval): Remove variable `moclisp-arguments'.
476 480
@@ -645,8 +649,8 @@
645 649
6462001-12-09 Jason Rumney <jasonr@gnu.org> 6502001-12-09 Jason Rumney <jasonr@gnu.org>
647 651
648 * w32menu.c (_widget_value): Make `help' field a Lisp_Object. Add 652 * w32menu.c (_widget_value): Make `help' field a Lisp_Object.
649 comment to explain where the struct came from. 653 Add comment to explain where the struct came from.
650 (single_submenu, w32_menu_show): Set `help' field as Lisp_Object. 654 (single_submenu, w32_menu_show): Set `help' field as Lisp_Object.
651 (add_menu_item): Process pop-up menus first to avoid memory leak. 655 (add_menu_item): Process pop-up menus first to avoid memory leak.
652 (add_menu_item, w32_menu_display_help): Use `help' field as 656 (add_menu_item, w32_menu_display_help): Use `help' field as
@@ -675,7 +679,7 @@
675 * alloc.c (inhibit_garbage_collection): Don't exceed value an int 679 * alloc.c (inhibit_garbage_collection): Don't exceed value an int
676 can hold. 680 can hold.
677 681
678 * data.c (Vmost_positive_fixnum, Vmost_negative_fixnum): Renamed 682 * data.c (Vmost_positive_fixnum, Vmost_negative_fixnum): Rename
679 from most_positive_fixnum and most_negative_fixnum, resp., and 683 from most_positive_fixnum and most_negative_fixnum, resp., and
680 type changed to Lisp_Object. 684 type changed to Lisp_Object.
681 (syms_of_data): DEFVAR_LISP them. 685 (syms_of_data): DEFVAR_LISP them.
diff --git a/src/textprop.c b/src/textprop.c
index 7c6a5e6d686..14fce396a21 100644
--- a/src/textprop.c
+++ b/src/textprop.c
@@ -883,7 +883,7 @@ past position LIMIT; return LIMIT if nothing is found before LIMIT. */)
883 if (NILP (object)) 883 if (NILP (object))
884 XSETBUFFER (object, current_buffer); 884 XSETBUFFER (object, current_buffer);
885 885
886 if (! NILP (limit) && ! EQ (limit, Qt)) 886 if (!NILP (limit) && !EQ (limit, Qt))
887 CHECK_NUMBER_COERCE_MARKER (limit); 887 CHECK_NUMBER_COERCE_MARKER (limit);
888 888
889 i = validate_interval_range (object, &position, &position, soft); 889 i = validate_interval_range (object, &position, &position, soft);
@@ -911,13 +911,17 @@ past position LIMIT; return LIMIT if nothing is found before LIMIT. */)
911 911
912 next = next_interval (i); 912 next = next_interval (i);
913 913
914 while (! NULL_INTERVAL_P (next) && intervals_equal (i, next) 914 while (!NULL_INTERVAL_P (next) && intervals_equal (i, next)
915 && (NILP (limit) || next->position < XFASTINT (limit))) 915 && (NILP (limit) || next->position < XFASTINT (limit)))
916 next = next_interval (next); 916 next = next_interval (next);
917 917
918 if (NULL_INTERVAL_P (next)) 918 if (NULL_INTERVAL_P (next))
919 return limit; 919 return limit;
920 if (! NILP (limit) && !(next->position < XFASTINT (limit))) 920 if (NILP (limit))
921 XSETFASTINT (limit, (STRINGP (object)
922 ? XSTRING (object)->size
923 : BUF_ZV (XBUFFER (object))));
924 if (!(next->position < XFASTINT (limit)))
921 return limit; 925 return limit;
922 926
923 XSETFASTINT (position, next->position); 927 XSETFASTINT (position, next->position);
@@ -993,7 +997,11 @@ past position LIMIT; return LIMIT if nothing is found before LIMIT. */)
993 997
994 if (NULL_INTERVAL_P (next)) 998 if (NULL_INTERVAL_P (next))
995 return limit; 999 return limit;
996 if (! NILP (limit) && !(next->position < XFASTINT (limit))) 1000 if (NILP (limit))
1001 XSETFASTINT (limit, (STRINGP (object)
1002 ? XSTRING (object)->size
1003 : BUF_ZV (XBUFFER (object))));
1004 if (!(next->position < XFASTINT (limit)))
997 return limit; 1005 return limit;
998 1006
999 return make_number (next->position); 1007 return make_number (next->position);
@@ -1030,14 +1038,15 @@ back past position LIMIT; return LIMIT if nothing is found until LIMIT. */)
1030 i = previous_interval (i); 1038 i = previous_interval (i);
1031 1039
1032 previous = previous_interval (i); 1040 previous = previous_interval (i);
1033 while (! NULL_INTERVAL_P (previous) && intervals_equal (previous, i) 1041 while (!NULL_INTERVAL_P (previous) && intervals_equal (previous, i)
1034 && (NILP (limit) 1042 && (NILP (limit)
1035 || (previous->position + LENGTH (previous) > XFASTINT (limit)))) 1043 || (previous->position + LENGTH (previous) > XFASTINT (limit))))
1036 previous = previous_interval (previous); 1044 previous = previous_interval (previous);
1037 if (NULL_INTERVAL_P (previous)) 1045 if (NULL_INTERVAL_P (previous))
1038 return limit; 1046 return limit;
1039 if (!NILP (limit) 1047 if (NILP (limit))
1040 && !(previous->position + LENGTH (previous) > XFASTINT (limit))) 1048 XSETFASTINT (limit, (STRINGP (object) ? 0 : BUF_BEGV (XBUFFER (object))));
1049 if (!(previous->position + LENGTH (previous) > XFASTINT (limit)))
1041 return limit; 1050 return limit;
1042 1051
1043 return make_number (previous->position + LENGTH (previous)); 1052 return make_number (previous->position + LENGTH (previous));
@@ -1070,7 +1079,7 @@ back past position LIMIT; return LIMIT if nothing is found until LIMIT. */)
1070 i = validate_interval_range (object, &position, &position, soft); 1079 i = validate_interval_range (object, &position, &position, soft);
1071 1080
1072 /* Start with the interval containing the char before point. */ 1081 /* Start with the interval containing the char before point. */
1073 if (! NULL_INTERVAL_P (i) && i->position == XFASTINT (position)) 1082 if (!NULL_INTERVAL_P (i) && i->position == XFASTINT (position))
1074 i = previous_interval (i); 1083 i = previous_interval (i);
1075 1084
1076 if (NULL_INTERVAL_P (i)) 1085 if (NULL_INTERVAL_P (i))
@@ -1078,15 +1087,16 @@ back past position LIMIT; return LIMIT if nothing is found until LIMIT. */)
1078 1087
1079 here_val = textget (i->plist, prop); 1088 here_val = textget (i->plist, prop);
1080 previous = previous_interval (i); 1089 previous = previous_interval (i);
1081 while (! NULL_INTERVAL_P (previous) 1090 while (!NULL_INTERVAL_P (previous)
1082 && EQ (here_val, textget (previous->plist, prop)) 1091 && EQ (here_val, textget (previous->plist, prop))
1083 && (NILP (limit) 1092 && (NILP (limit)
1084 || (previous->position + LENGTH (previous) > XFASTINT (limit)))) 1093 || (previous->position + LENGTH (previous) > XFASTINT (limit))))
1085 previous = previous_interval (previous); 1094 previous = previous_interval (previous);
1086 if (NULL_INTERVAL_P (previous)) 1095 if (NULL_INTERVAL_P (previous))
1087 return limit; 1096 return limit;
1088 if (!NILP (limit) 1097 if (NILP (limit))
1089 && !(previous->position + LENGTH (previous) > XFASTINT (limit))) 1098 XSETFASTINT (limit, (STRINGP (object) ? 0 : BUF_BEGV (XBUFFER (object))));
1099 if (!(previous->position + LENGTH (previous) > XFASTINT (limit)))
1090 return limit; 1100 return limit;
1091 1101
1092 return make_number (previous->position + LENGTH (previous)); 1102 return make_number (previous->position + LENGTH (previous));