Commit 50dca5df authored by Glenn Morris's avatar Glenn Morris

* src/process.c (get_process): Explicit error for dead buffers

That seems more in keeping with the existing behavior of this function
in other situations.
parent e1b01c7f
2013-11-23 Glenn Morris <rgm@gnu.org>
* process.c (get_process): Explicit error for dead buffers.
2013-11-23 Andreas Schwab <schwab@linux-m68k.org>
* process.c (get_process): Check that OBJ is a live buffer. (Bug#15923)
......
/* Asynchronous subprocess control for GNU Emacs.
Copyright (C) 1985-1988, 1993-1996, 1998-1999, 2001-2013 Free Software
Foundation, Inc.
Copyright (C) 1985-1988, 1993-1996, 1998-1999, 2001-2013
Free Software Foundation, Inc.
This file is part of GNU Emacs.
......@@ -812,12 +812,14 @@ get_process (register Lisp_Object name)
else
obj = name;
/* Now obj should be either a (live) buffer object or a process object. */
if (BUFFERP (obj) && !NILP (BVAR (XBUFFER (obj), name)))
/* Now obj should be either a buffer object or a process object. */
if (BUFFERP (obj))
{
if (NILP (BVAR (XBUFFER (obj), name)))
error ("Attempt to get process for a dead buffer");
proc = Fget_buffer_process (obj);
if (NILP (proc))
error ("Buffer %s has no process", SDATA (BVAR (XBUFFER (obj), name)));
error ("Buffer %s has no process", SDATA (BVAR (XBUFFER (obj), name)));
}
else
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment