From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: get-live-buffer primitive Date: Thu, 13 Sep 2012 08:58:36 -0400 Message-ID: References: <505190CB.5010809@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1347541145 5096 80.91.229.3 (13 Sep 2012 12:59:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 13 Sep 2012 12:59:05 +0000 (UTC) Cc: martin rudalics , Emacs development discussions To: Dmitry Antipov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Sep 13 14:59:09 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TC90Y-0000dZ-JD for ged-emacs-devel@m.gmane.org; Thu, 13 Sep 2012 14:59:02 +0200 Original-Received: from localhost ([::1]:55575 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TC90U-0002Hl-Kx for ged-emacs-devel@m.gmane.org; Thu, 13 Sep 2012 08:58:58 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:43735) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TC90N-0002HW-AF for emacs-devel@gnu.org; Thu, 13 Sep 2012 08:58:56 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TC90A-0002AA-Cr for emacs-devel@gnu.org; Thu, 13 Sep 2012 08:58:51 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:4754) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TC90A-00029b-8g for emacs-devel@gnu.org; Thu, 13 Sep 2012 08:58:38 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EAG6Zu09MCqmt/2dsb2JhbABEtBGBCIIWAQVWIxALDiYSFBgNJIghugmQRAOjM4FYgwU X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="198235821" Original-Received: from 76-10-169-173.dsl.teksavvy.com (HELO pastel.home) ([76.10.169.173]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 13 Sep 2012 08:58:37 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id EDD0C59445; Thu, 13 Sep 2012 08:58:36 -0400 (EDT) In-Reply-To: <505190CB.5010809@yandex.ru> (Dmitry Antipov's message of "Thu, 13 Sep 2012 11:52:43 +0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.182 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:153279 Archived-At: > + (let ((buffer (get-live-buffer buffer-or-name))) > + (or buffer (error "No such live buffer %s" buffer-or-name)) > + buffer)) Why not use `get-buffer' plus a buffer-live-p test on the result? Or add a `live' optional argument to `get-buffer' to check for liveness. Stefan