1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-17 10:06:13 +00:00

* 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.
This commit is contained in:
Glenn Morris 2013-11-22 18:58:28 -08:00
parent e1b01c7fed
commit 50dca5dfd6
2 changed files with 11 additions and 5 deletions

View File

@ -1,3 +1,7 @@
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)

View File

@ -1,7 +1,7 @@
/* 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
{