aboutsummaryrefslogtreecommitdiffstats
path: root/src/buffer.h
diff options
context:
space:
mode:
authorKarl Heuer1994-02-26 04:05:17 +0000
committerKarl Heuer1994-02-26 04:05:17 +0000
commitd00c875cf6b9837725b8823e2dd2cc1f298047e7 (patch)
tree315f672690c5f8c673c0f10a3bce27346ed79281 /src/buffer.h
parent52f04d46fe299cfdb62efbed57a1dd1916f15fb8 (diff)
downloademacs-d00c875cf6b9837725b8823e2dd2cc1f298047e7.tar.gz
emacs-d00c875cf6b9837725b8823e2dd2cc1f298047e7.zip
(OVERLAY_POSITION): Don't check which buffer it points to.
Diffstat (limited to 'src/buffer.h')
-rw-r--r--src/buffer.h13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/buffer.h b/src/buffer.h
index 7d6e1475de9..53fdac121d1 100644
--- a/src/buffer.h
+++ b/src/buffer.h
@@ -373,10 +373,7 @@ extern Lisp_Object Vtransient_mark_mode;
373 373
374/* Overlays */ 374/* Overlays */
375 375
376/* Overlays are ordinary Lisp objects, and users can alter their contents. 376/* 1 if the OV is an overlay object. */
377 Therefore, we cannot assume that they remain valid--we must check. */
378
379/* 1 if the OV is a cons cell whose car is a cons cell. */
380#define OVERLAY_VALID(OV) (OVERLAYP (OV)) 377#define OVERLAY_VALID(OV) (OVERLAYP (OV))
381 378
382/* Return the marker that stands for where OV starts in the buffer. */ 379/* Return the marker that stands for where OV starts in the buffer. */
@@ -385,13 +382,11 @@ extern Lisp_Object Vtransient_mark_mode;
385/* Return the marker that stands for where OV ends in the buffer. */ 382/* Return the marker that stands for where OV ends in the buffer. */
386#define OVERLAY_END(OV) (XCONS (XCONS ((OV))->car)->cdr) 383#define OVERLAY_END(OV) (XCONS (XCONS ((OV))->car)->cdr)
387 384
388/* Return the actual buffer position for the marker P, 385/* Return the actual buffer position for the marker P.
389 if it is a marker and points into the current buffer. 386 We assume you know which buffer it's pointing into. */
390 Otherwise, zero. */
391 387
392#define OVERLAY_POSITION(P) \ 388#define OVERLAY_POSITION(P) \
393 ((MARKERP ((P)) && XMARKER ((P))->buffer == current_buffer) \ 389 (MARKERP ((P)) ? marker_position ((P)) : (abort (), 0))
394 ? marker_position ((P)) : 0)
395 390
396/* Allocation of buffer text. */ 391/* Allocation of buffer text. */
397 392