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> 2013-11-23 Andreas Schwab <schwab@linux-m68k.org>
* process.c (get_process): Check that OBJ is a live buffer. (Bug#15923) * process.c (get_process): Check that OBJ is a live buffer. (Bug#15923)
......
/* Asynchronous subprocess control for GNU Emacs. /* Asynchronous subprocess control for GNU Emacs.
Copyright (C) 1985-1988, 1993-1996, 1998-1999, 2001-2013 Free Software Copyright (C) 1985-1988, 1993-1996, 1998-1999, 2001-2013
Foundation, Inc. Free Software Foundation, Inc.
This file is part of GNU Emacs. This file is part of GNU Emacs.
...@@ -812,12 +812,14 @@ get_process (register Lisp_Object name) ...@@ -812,12 +812,14 @@ get_process (register Lisp_Object name)
else else
obj = name; obj = name;
/* Now obj should be either a (live) buffer object or a process object. */ /* Now obj should be either a buffer object or a process object. */
if (BUFFERP (obj) && !NILP (BVAR (XBUFFER (obj), name))) if (BUFFERP (obj))
{ {
if (NILP (BVAR (XBUFFER (obj), name)))
error ("Attempt to get process for a dead buffer");
proc = Fget_buffer_process (obj); proc = Fget_buffer_process (obj);
if (NILP (proc)) 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 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