diff options
| author | Karl Heuer | 1994-11-15 02:02:34 +0000 |
|---|---|---|
| committer | Karl Heuer | 1994-11-15 02:02:34 +0000 |
| commit | 48e2e3ba614e1ce32fd3e3400e3050886425c845 (patch) | |
| tree | b6fd8a2f5da9f0e919db6cd49f79f0e8c4c5d642 /src/buffer.c | |
| parent | 53c34c462d2804a2c3d50479a02b0a4c4d2581d1 (diff) | |
| download | emacs-48e2e3ba614e1ce32fd3e3400e3050886425c845.tar.gz emacs-48e2e3ba614e1ce32fd3e3400e3050886425c845.zip | |
(Fmake_overlay, Foverlay_properties, Foverlay_get, Foverlay_put): Use new
overlay substructure.
(list_buffers_1): Use PT, not point.
Diffstat (limited to 'src/buffer.c')
| -rw-r--r-- | src/buffer.c | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/src/buffer.c b/src/buffer.c index 98885cc535a..dd7334ea52a 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -1167,7 +1167,7 @@ list_buffers_1 (files) | |||
| 1167 | continue; | 1167 | continue; |
| 1168 | /* Identify the current buffer. */ | 1168 | /* Identify the current buffer. */ |
| 1169 | if (b == old) | 1169 | if (b == old) |
| 1170 | XSETFASTINT (desired_point, point); | 1170 | XSETFASTINT (desired_point, PT); |
| 1171 | write_string (b == old ? "." : " ", -1); | 1171 | write_string (b == old ? "." : " ", -1); |
| 1172 | /* Identify modified buffers */ | 1172 | /* Identify modified buffers */ |
| 1173 | write_string (BUF_MODIFF (b) > b->save_modified ? "*" : " ", -1); | 1173 | write_string (BUF_MODIFF (b) > b->save_modified ? "*" : " ", -1); |
| @@ -1367,8 +1367,6 @@ overlays_at (pos, extend, vec_ptr, len_ptr, next_ptr, prev_ptr) | |||
| 1367 | int startpos, endpos; | 1367 | int startpos, endpos; |
| 1368 | 1368 | ||
| 1369 | overlay = XCONS (tail)->car; | 1369 | overlay = XCONS (tail)->car; |
| 1370 | if (XGCTYPE (overlay) != Lisp_Overlay) | ||
| 1371 | abort (); | ||
| 1372 | 1370 | ||
| 1373 | start = OVERLAY_START (overlay); | 1371 | start = OVERLAY_START (overlay); |
| 1374 | end = OVERLAY_END (overlay); | 1372 | end = OVERLAY_END (overlay); |
| @@ -1414,8 +1412,6 @@ overlays_at (pos, extend, vec_ptr, len_ptr, next_ptr, prev_ptr) | |||
| 1414 | int startpos, endpos; | 1412 | int startpos, endpos; |
| 1415 | 1413 | ||
| 1416 | overlay = XCONS (tail)->car; | 1414 | overlay = XCONS (tail)->car; |
| 1417 | if (XGCTYPE (overlay) != Lisp_Overlay) | ||
| 1418 | abort (); | ||
| 1419 | 1415 | ||
| 1420 | start = OVERLAY_START (overlay); | 1416 | start = OVERLAY_START (overlay); |
| 1421 | end = OVERLAY_END (overlay); | 1417 | end = OVERLAY_END (overlay); |
| @@ -1844,8 +1840,11 @@ BEG and END may be integers or markers.") | |||
| 1844 | beg = Fset_marker (Fmake_marker (), beg, buffer); | 1840 | beg = Fset_marker (Fmake_marker (), beg, buffer); |
| 1845 | end = Fset_marker (Fmake_marker (), end, buffer); | 1841 | end = Fset_marker (Fmake_marker (), end, buffer); |
| 1846 | 1842 | ||
| 1847 | overlay = Fcons (Fcons (beg, end), Qnil); | 1843 | overlay = allocate_misc (); |
| 1848 | XSETTYPE (overlay, Lisp_Overlay); | 1844 | XMISC (overlay)->type = Lisp_Misc_Overlay; |
| 1845 | XOVERLAY (overlay)->start = beg; | ||
| 1846 | XOVERLAY (overlay)->end = end; | ||
| 1847 | XOVERLAY (overlay)->plist = Qnil; | ||
| 1849 | 1848 | ||
| 1850 | /* Put the new overlay on the wrong list. */ | 1849 | /* Put the new overlay on the wrong list. */ |
| 1851 | end = OVERLAY_END (overlay); | 1850 | end = OVERLAY_END (overlay); |
| @@ -2049,7 +2048,7 @@ OVERLAY.") | |||
| 2049 | { | 2048 | { |
| 2050 | CHECK_OVERLAY (overlay, 0); | 2049 | CHECK_OVERLAY (overlay, 0); |
| 2051 | 2050 | ||
| 2052 | return Fcopy_sequence (Fcdr_safe (XCONS (overlay)->cdr)); | 2051 | return Fcopy_sequence (XOVERLAY (overlay)->plist); |
| 2053 | } | 2052 | } |
| 2054 | 2053 | ||
| 2055 | 2054 | ||
| @@ -2203,7 +2202,7 @@ DEFUN ("overlay-get", Foverlay_get, Soverlay_get, 2, 2, 0, | |||
| 2203 | 2202 | ||
| 2204 | fallback = Qnil; | 2203 | fallback = Qnil; |
| 2205 | 2204 | ||
| 2206 | for (plist = Fcdr_safe (XCONS (overlay)->cdr); | 2205 | for (plist = XOVERLAY (overlay)->plist; |
| 2207 | CONSP (plist) && CONSP (XCONS (plist)->cdr); | 2206 | CONSP (plist) && CONSP (XCONS (plist)->cdr); |
| 2208 | plist = XCONS (XCONS (plist)->cdr)->cdr) | 2207 | plist = XCONS (XCONS (plist)->cdr)->cdr) |
| 2209 | { | 2208 | { |
| @@ -2226,16 +2225,14 @@ DEFUN ("overlay-put", Foverlay_put, Soverlay_put, 3, 3, 0, | |||
| 2226 | (overlay, prop, value) | 2225 | (overlay, prop, value) |
| 2227 | Lisp_Object overlay, prop, value; | 2226 | Lisp_Object overlay, prop, value; |
| 2228 | { | 2227 | { |
| 2229 | Lisp_Object plist, tail, buffer; | 2228 | Lisp_Object tail, buffer; |
| 2230 | int changed; | 2229 | int changed; |
| 2231 | 2230 | ||
| 2232 | CHECK_OVERLAY (overlay, 0); | 2231 | CHECK_OVERLAY (overlay, 0); |
| 2233 | 2232 | ||
| 2234 | buffer = Fmarker_buffer (OVERLAY_START (overlay)); | 2233 | buffer = Fmarker_buffer (OVERLAY_START (overlay)); |
| 2235 | 2234 | ||
| 2236 | plist = Fcdr_safe (XCONS (overlay)->cdr); | 2235 | for (tail = XOVERLAY (overlay)->plist; |
| 2237 | |||
| 2238 | for (tail = plist; | ||
| 2239 | CONSP (tail) && CONSP (XCONS (tail)->cdr); | 2236 | CONSP (tail) && CONSP (XCONS (tail)->cdr); |
| 2240 | tail = XCONS (XCONS (tail)->cdr)->cdr) | 2237 | tail = XCONS (XCONS (tail)->cdr)->cdr) |
| 2241 | if (EQ (XCONS (tail)->car, prop)) | 2238 | if (EQ (XCONS (tail)->car, prop)) |
| @@ -2246,9 +2243,8 @@ DEFUN ("overlay-put", Foverlay_put, Soverlay_put, 3, 3, 0, | |||
| 2246 | } | 2243 | } |
| 2247 | /* It wasn't in the list, so add it to the front. */ | 2244 | /* It wasn't in the list, so add it to the front. */ |
| 2248 | changed = !NILP (value); | 2245 | changed = !NILP (value); |
| 2249 | if (! CONSP (XCONS (overlay)->cdr)) | 2246 | XOVERLAY (overlay)->plist |
| 2250 | XCONS (overlay)->cdr = Fcons (Qnil, Qnil); | 2247 | = Fcons (prop, Fcons (value, XOVERLAY (overlay)->plist)); |
| 2251 | XCONS (XCONS (overlay)->cdr)->cdr = Fcons (prop, Fcons (value, plist)); | ||
| 2252 | found: | 2248 | found: |
| 2253 | if (! NILP (buffer)) | 2249 | if (! NILP (buffer)) |
| 2254 | { | 2250 | { |