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/process.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/process.c')
| -rw-r--r-- | src/process.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/process.c b/src/process.c index 0cc9bc353a1..0ae68567d6b 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -5298,7 +5298,7 @@ read_process_output (Lisp_Object proc, register int channel) | |||
| 5298 | } | 5298 | } |
| 5299 | 5299 | ||
| 5300 | /* If no filter, write into buffer if it isn't dead. */ | 5300 | /* If no filter, write into buffer if it isn't dead. */ |
| 5301 | else if (!NILP (p->buffer) && !NILP (BVAR (XBUFFER (p->buffer), name))) | 5301 | else if (!NILP (p->buffer) && BUFFER_LIVE_P (XBUFFER (p->buffer))) |
| 5302 | { | 5302 | { |
| 5303 | Lisp_Object old_read_only; | 5303 | Lisp_Object old_read_only; |
| 5304 | ptrdiff_t old_begv, old_zv; | 5304 | ptrdiff_t old_begv, old_zv; |
| @@ -6722,7 +6722,7 @@ status_notify (struct Lisp_Process *deleting_process) | |||
| 6722 | 6722 | ||
| 6723 | /* Avoid error if buffer is deleted | 6723 | /* Avoid error if buffer is deleted |
| 6724 | (probably that's why the process is dead, too) */ | 6724 | (probably that's why the process is dead, too) */ |
| 6725 | if (NILP (BVAR (XBUFFER (buffer), name))) | 6725 | if (!BUFFER_LIVE_P (XBUFFER (buffer))) |
| 6726 | continue; | 6726 | continue; |
| 6727 | Fset_buffer (buffer); | 6727 | Fset_buffer (buffer); |
| 6728 | 6728 | ||