From: Glenn Morris Date: Sat, 23 Nov 2013 02:58:28 +0000 (-0800) Subject: * src/process.c (get_process): Explicit error for dead buffers X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~734 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=50dca5dfd6adef80fb90a49736cdfcbd4c00d764;p=emacs.git * 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. --- diff --git a/src/ChangeLog b/src/ChangeLog index c6f63adebcd..bc3d3ba6f25 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2013-11-23 Glenn Morris + + * process.c (get_process): Explicit error for dead buffers. + 2013-11-23 Andreas Schwab * process.c (get_process): Check that OBJ is a live buffer. (Bug#15923) diff --git a/src/process.c b/src/process.c index 7d4fb4e3ec4..7050bf9822e 100644 --- a/src/process.c +++ b/src/process.c @@ -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 {