[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/editfns.c
From: |
Kenichi Handa |
Subject: |
[Emacs-diffs] Changes to emacs/src/editfns.c |
Date: |
Mon, 19 Aug 2002 06:59:04 -0400 |
Index: emacs/src/editfns.c
diff -c emacs/src/editfns.c:1.336 emacs/src/editfns.c:1.337
*** emacs/src/editfns.c:1.336 Tue Jul 23 15:08:14 2002
--- emacs/src/editfns.c Sat Aug 17 00:55:17 2002
***************
*** 2834,2840 ****
struct Lisp_Marker *end = XMARKER (XCDR (data));
struct buffer *buf = beg->buffer; /* END should have the same buffer. */
! if (beg->charpos != BUF_BEGV(buf) || end->charpos != BUF_ZV(buf))
/* The restriction has changed from the saved one, so restore
the saved restriction. */
{
--- 2834,2841 ----
struct Lisp_Marker *end = XMARKER (XCDR (data));
struct buffer *buf = beg->buffer; /* END should have the same buffer. */
! if (buf /* Verify marker still points to a buffer. */
! && (beg->charpos != BUF_BEGV (buf) || end->charpos != BUF_ZV (buf)))
/* The restriction has changed from the saved one, so restore
the saved restriction. */
{
***************
*** 2847,2853 ****
/* The point is outside the new visible range, move it inside. */
SET_BUF_PT_BOTH (buf,
clip_to_bounds (beg->charpos, pt, end->charpos),
! clip_to_bounds (beg->bytepos, BUF_PT_BYTE(buf),
end->bytepos));
buf->clip_changed = 1; /* Remember that the narrowing changed. */
--- 2848,2854 ----
/* The point is outside the new visible range, move it inside. */
SET_BUF_PT_BOTH (buf,
clip_to_bounds (beg->charpos, pt, end->charpos),
! clip_to_bounds (beg->bytepos, BUF_PT_BYTE (buf),
end->bytepos));
buf->clip_changed = 1; /* Remember that the narrowing changed. */
***************
*** 2858,2868 ****
{
struct buffer *buf = XBUFFER (data);
! if (BUF_BEGV(buf) != BUF_BEG(buf) || BUF_ZV(buf) != BUF_Z(buf))
/* The buffer has been narrowed, get rid of the narrowing. */
{
! SET_BUF_BEGV_BOTH (buf, BUF_BEG(buf), BUF_BEG_BYTE(buf));
! SET_BUF_ZV_BOTH (buf, BUF_Z(buf), BUF_Z_BYTE(buf));
buf->clip_changed = 1; /* Remember that the narrowing changed. */
}
--- 2859,2870 ----
{
struct buffer *buf = XBUFFER (data);
! if (buf /* Verify marker still points to a buffer. */
! && (BUF_BEGV (buf) != BUF_BEG (buf) || BUF_ZV (buf) != BUF_Z (buf)))
/* The buffer has been narrowed, get rid of the narrowing. */
{
! SET_BUF_BEGV_BOTH (buf, BUF_BEG (buf), BUF_BEG_BYTE (buf));
! SET_BUF_ZV_BOTH (buf, BUF_Z (buf), BUF_Z_BYTE (buf));
buf->clip_changed = 1; /* Remember that the narrowing changed. */
}