/[emacs]/emacs/src/editfns.c
ViewVC logotype

Diff of /emacs/src/editfns.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.336 by rms, Tue Jul 23 19:08:14 2002 UTC revision 1.337 by rms, Sat Aug 17 04:55:17 2002 UTC
# Line 2834  save_restriction_restore (data) Line 2834  save_restriction_restore (data)
2834        struct Lisp_Marker *end = XMARKER (XCDR (data));        struct Lisp_Marker *end = XMARKER (XCDR (data));
2835        struct buffer *buf = beg->buffer; /* END should have the same buffer. */        struct buffer *buf = beg->buffer; /* END should have the same buffer. */
2836    
2837        if (beg->charpos != BUF_BEGV(buf) || end->charpos != BUF_ZV(buf))        if (buf /* Verify marker still points to a buffer.  */
2838              && (beg->charpos != BUF_BEGV (buf) || end->charpos != BUF_ZV (buf)))
2839          /* The restriction has changed from the saved one, so restore          /* The restriction has changed from the saved one, so restore
2840             the saved restriction.  */             the saved restriction.  */
2841          {          {
# Line 2847  save_restriction_restore (data) Line 2848  save_restriction_restore (data)
2848              /* The point is outside the new visible range, move it inside. */              /* The point is outside the new visible range, move it inside. */
2849              SET_BUF_PT_BOTH (buf,              SET_BUF_PT_BOTH (buf,
2850                               clip_to_bounds (beg->charpos, pt, end->charpos),                               clip_to_bounds (beg->charpos, pt, end->charpos),
2851                               clip_to_bounds (beg->bytepos, BUF_PT_BYTE(buf),                               clip_to_bounds (beg->bytepos, BUF_PT_BYTE (buf),
2852                                               end->bytepos));                                               end->bytepos));
2853                        
2854            buf->clip_changed = 1; /* Remember that the narrowing changed. */            buf->clip_changed = 1; /* Remember that the narrowing changed. */
# Line 2858  save_restriction_restore (data) Line 2859  save_restriction_restore (data)
2859      {      {
2860        struct buffer *buf = XBUFFER (data);        struct buffer *buf = XBUFFER (data);
2861    
2862        if (BUF_BEGV(buf) != BUF_BEG(buf) || BUF_ZV(buf) != BUF_Z(buf))        if (buf /* Verify marker still points to a buffer.  */
2863              && (BUF_BEGV (buf) != BUF_BEG (buf) || BUF_ZV (buf) != BUF_Z (buf)))
2864          /* The buffer has been narrowed, get rid of the narrowing.  */          /* The buffer has been narrowed, get rid of the narrowing.  */
2865          {          {
2866            SET_BUF_BEGV_BOTH (buf, BUF_BEG(buf), BUF_BEG_BYTE(buf));            SET_BUF_BEGV_BOTH (buf, BUF_BEG (buf), BUF_BEG_BYTE (buf));
2867            SET_BUF_ZV_BOTH (buf, BUF_Z(buf), BUF_Z_BYTE(buf));            SET_BUF_ZV_BOTH (buf, BUF_Z (buf), BUF_Z_BYTE (buf));
2868    
2869            buf->clip_changed = 1; /* Remember that the narrowing changed. */            buf->clip_changed = 1; /* Remember that the narrowing changed. */
2870          }          }

Legend:
Removed from v.1.336  
changed lines
  Added in v.1.337

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26