diff options
| author | Dmitry Antipov | 2012-09-11 08:22:03 +0400 |
|---|---|---|
| committer | Dmitry Antipov | 2012-09-11 08:22:03 +0400 |
| commit | e578f3813ff7f48663eb4821caee267e3ec47aa8 (patch) | |
| tree | b48cd4a8fb778a2a991a342932d357fa8ba4ccc2 /src/editfns.c | |
| parent | 3057e615af94af8d08f475208c7e459f5d7115ac (diff) | |
| download | emacs-e578f3813ff7f48663eb4821caee267e3ec47aa8.tar.gz emacs-e578f3813ff7f48663eb4821caee267e3ec47aa8.zip | |
Convenient macro to check whether the buffer is live.
* buffer.h (BUFFER_LIVE_P): New macro.
* alloc.c, buffer.c, editfns.c, insdel.c, lread.c, marker.c:
* minibuf.c, print.c, process.c, window.c, xdisp.c: Use it.
Diffstat (limited to 'src/editfns.c')
| -rw-r--r-- | src/editfns.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/editfns.c b/src/editfns.c index 65baaf4e3f8..299cad07fd7 100644 --- a/src/editfns.c +++ b/src/editfns.c | |||
| @@ -2613,7 +2613,7 @@ They default to the values of (point-min) and (point-max) in BUFFER. */) | |||
| 2613 | if (NILP (buf)) | 2613 | if (NILP (buf)) |
| 2614 | nsberror (buffer); | 2614 | nsberror (buffer); |
| 2615 | bp = XBUFFER (buf); | 2615 | bp = XBUFFER (buf); |
| 2616 | if (NILP (BVAR (bp, name))) | 2616 | if (!BUFFER_LIVE_P (bp)) |
| 2617 | error ("Selecting deleted buffer"); | 2617 | error ("Selecting deleted buffer"); |
| 2618 | 2618 | ||
| 2619 | if (NILP (start)) | 2619 | if (NILP (start)) |
| @@ -2677,7 +2677,7 @@ determines whether case is significant or ignored. */) | |||
| 2677 | if (NILP (buf1)) | 2677 | if (NILP (buf1)) |
| 2678 | nsberror (buffer1); | 2678 | nsberror (buffer1); |
| 2679 | bp1 = XBUFFER (buf1); | 2679 | bp1 = XBUFFER (buf1); |
| 2680 | if (NILP (BVAR (bp1, name))) | 2680 | if (!BUFFER_LIVE_P (bp1)) |
| 2681 | error ("Selecting deleted buffer"); | 2681 | error ("Selecting deleted buffer"); |
| 2682 | } | 2682 | } |
| 2683 | 2683 | ||
| @@ -2715,7 +2715,7 @@ determines whether case is significant or ignored. */) | |||
| 2715 | if (NILP (buf2)) | 2715 | if (NILP (buf2)) |
| 2716 | nsberror (buffer2); | 2716 | nsberror (buffer2); |
| 2717 | bp2 = XBUFFER (buf2); | 2717 | bp2 = XBUFFER (buf2); |
| 2718 | if (NILP (BVAR (bp2, name))) | 2718 | if (!BUFFER_LIVE_P (bp2)) |
| 2719 | error ("Selecting deleted buffer"); | 2719 | error ("Selecting deleted buffer"); |
| 2720 | } | 2720 | } |
| 2721 | 2721 | ||