diff options
| author | Richard M. Stallman | 1997-07-04 20:44:52 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1997-07-04 20:44:52 +0000 |
| commit | 2e34157cd9e74150e79e0ce23236252b47fb5f1a (patch) | |
| tree | 418451da8380ec73d5d46dc648c07e6ad8af845f /src/buffer.c | |
| parent | 8c239ac3ed4f636810bc08959e1318b1a6e928ba (diff) | |
| download | emacs-2e34157cd9e74150e79e0ce23236252b47fb5f1a.tar.gz emacs-2e34157cd9e74150e79e0ce23236252b47fb5f1a.zip | |
Fix bugs with inappropriate mixing of Lisp_Object with int.
Diffstat (limited to 'src/buffer.c')
| -rw-r--r-- | src/buffer.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/src/buffer.c b/src/buffer.c index 7b33c71daef..42f6ca1582c 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -2789,6 +2789,8 @@ modify_overlay (buf, start, end) | |||
| 2789 | } | 2789 | } |
| 2790 | 2790 | ||
| 2791 | 2791 | ||
| 2792 | Lisp_Object Fdelete_overlay (); | ||
| 2793 | |||
| 2792 | DEFUN ("move-overlay", Fmove_overlay, Smove_overlay, 3, 4, 0, | 2794 | DEFUN ("move-overlay", Fmove_overlay, Smove_overlay, 3, 4, 0, |
| 2793 | "Set the endpoints of OVERLAY to BEG and END in BUFFER.\n\ | 2795 | "Set the endpoints of OVERLAY to BEG and END in BUFFER.\n\ |
| 2794 | If BUFFER is omitted, leave OVERLAY in the same buffer it inhabits now.\n\ | 2796 | If BUFFER is omitted, leave OVERLAY in the same buffer it inhabits now.\n\ |
| @@ -2839,13 +2841,13 @@ buffer.") | |||
| 2839 | /* Redisplay where the overlay was. */ | 2841 | /* Redisplay where the overlay was. */ |
| 2840 | if (!NILP (obuffer)) | 2842 | if (!NILP (obuffer)) |
| 2841 | { | 2843 | { |
| 2842 | Lisp_Object o_beg; | 2844 | int o_beg; |
| 2843 | Lisp_Object o_end; | 2845 | int o_end; |
| 2844 | 2846 | ||
| 2845 | o_beg = OVERLAY_POSITION (OVERLAY_START (overlay)); | 2847 | o_beg = OVERLAY_POSITION (OVERLAY_START (overlay)); |
| 2846 | o_end = OVERLAY_POSITION (OVERLAY_END (overlay)); | 2848 | o_end = OVERLAY_POSITION (OVERLAY_END (overlay)); |
| 2847 | 2849 | ||
| 2848 | modify_overlay (ob, XINT (o_beg), XINT (o_end)); | 2850 | modify_overlay (ob, o_beg, o_end); |
| 2849 | } | 2851 | } |
| 2850 | 2852 | ||
| 2851 | /* Redisplay where the overlay is going to be. */ | 2853 | /* Redisplay where the overlay is going to be. */ |
| @@ -2854,22 +2856,21 @@ buffer.") | |||
| 2854 | else | 2856 | else |
| 2855 | /* Redisplay the area the overlay has just left, or just enclosed. */ | 2857 | /* Redisplay the area the overlay has just left, or just enclosed. */ |
| 2856 | { | 2858 | { |
| 2857 | Lisp_Object o_beg; | 2859 | int o_beg, o_end; |
| 2858 | Lisp_Object o_end; | ||
| 2859 | int change_beg, change_end; | 2860 | int change_beg, change_end; |
| 2860 | 2861 | ||
| 2861 | o_beg = OVERLAY_POSITION (OVERLAY_START (overlay)); | 2862 | o_beg = OVERLAY_POSITION (OVERLAY_START (overlay)); |
| 2862 | o_end = OVERLAY_POSITION (OVERLAY_END (overlay)); | 2863 | o_end = OVERLAY_POSITION (OVERLAY_END (overlay)); |
| 2863 | 2864 | ||
| 2864 | if (XINT (o_beg) == XINT (beg)) | 2865 | if (o_beg == XINT (beg)) |
| 2865 | modify_overlay (b, XINT (o_end), XINT (end)); | 2866 | modify_overlay (b, o_end, XINT (end)); |
| 2866 | else if (XINT (o_end) == XINT (end)) | 2867 | else if (o_end == XINT (end)) |
| 2867 | modify_overlay (b, XINT (o_beg), XINT (beg)); | 2868 | modify_overlay (b, o_beg, XINT (beg)); |
| 2868 | else | 2869 | else |
| 2869 | { | 2870 | { |
| 2870 | if (XINT (beg) < XINT (o_beg)) o_beg = beg; | 2871 | if (XINT (beg) < o_beg) o_beg = XINT (beg); |
| 2871 | if (XINT (end) > XINT (o_end)) o_end = end; | 2872 | if (XINT (end) > o_end) o_end = XINT (end); |
| 2872 | modify_overlay (b, XINT (o_beg), XINT (o_end)); | 2873 | modify_overlay (b, o_beg, o_end); |
| 2873 | } | 2874 | } |
| 2874 | } | 2875 | } |
| 2875 | 2876 | ||