From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#12215: CSET is unnecessarily confusing Date: Fri, 24 Aug 2012 11:10:02 -0400 Message-ID: References: <502D8A95.7060609@cs.ucla.edu> <5034511B.7010409@cs.ucla.edu> <50350A4C.5050103@cs.ucla.edu> <87fw7d3qan.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1345821051 28515 80.91.229.3 (24 Aug 2012 15:10:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 24 Aug 2012 15:10:51 +0000 (UTC) Cc: Paul Eggert , 12215@debbugs.gnu.org, Dmitry Antipov To: Chong Yidong Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Aug 24 17:10:50 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1T4vWy-0008G6-4o for geb-bug-gnu-emacs@m.gmane.org; Fri, 24 Aug 2012 17:10:40 +0200 Original-Received: from localhost ([::1]:50852 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T4vWw-00019s-Al for geb-bug-gnu-emacs@m.gmane.org; Fri, 24 Aug 2012 11:10:38 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:34699) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T4vWp-00019D-3h for bug-gnu-emacs@gnu.org; Fri, 24 Aug 2012 11:10:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T4vWk-0002oY-A5 for bug-gnu-emacs@gnu.org; Fri, 24 Aug 2012 11:10:31 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:37484) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T4vWk-0002oU-60 for bug-gnu-emacs@gnu.org; Fri, 24 Aug 2012 11:10:26 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1T4vXK-0003Ih-DK for bug-gnu-emacs@gnu.org; Fri, 24 Aug 2012 11:11:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 24 Aug 2012 15:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12215 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 12215-submit@debbugs.gnu.org id=B12215.134582104412658 (code B ref 12215); Fri, 24 Aug 2012 15:11:02 +0000 Original-Received: (at 12215) by debbugs.gnu.org; 24 Aug 2012 15:10:44 +0000 Original-Received: from localhost ([127.0.0.1]:47029 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T4vX1-0003I6-6K for submit@debbugs.gnu.org; Fri, 24 Aug 2012 11:10:43 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:43149) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T4vWy-0003Hx-CF for 12215@debbugs.gnu.org; Fri, 24 Aug 2012 11:10:40 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EAG6Zu0/O+KG6/2dsb2JhbABEtBGBCIIWAQUnLyMQCw4mEhQYDSSIIboJkEQDozOBWIMF X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="196607856" Original-Received: from 206-248-161-186.dsl.teksavvy.com (HELO pastel.home) ([206.248.161.186]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 24 Aug 2012 11:10:02 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 99A7658914; Fri, 24 Aug 2012 11:10:02 -0400 (EDT) In-Reply-To: <87fw7d3qan.fsf@gnu.org> (Chong Yidong's message of "Fri, 24 Aug 2012 11:46:40 +0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:63454 Archived-At: Paul Eggert said: > If that flag has a standard name, one doesn't need separate macros > BSET/CSET/etc; one can have just one macro that works for all types. Indeed. Tho, since we haven't managed yet to do that for gcmarkbit, I'm not holding my breath. Chong Yidong said: > BVAR (b->directory) = current_buffer ? BVAR > (current_buffer->directory) : Qnil; The BVAR accessor macro is not for the GC but for the concurrency code. And yes, I think that BVAR(foo->bar) can be sufficient for the concurrency code (it can be macro-expanded to buffer_var(foo->bar, current_thread)), assuming we change all buffer slots to be of a new type, which is a table from thread_ids to Lisp_Object. And even if it can't be done with a macro (because we want to use another implementation technique that needs to look up some other data in the buffer or to know the offset of the field), having those BVAR will make it easy to replace those accessors with something else. For the setters, I think we'll be better off with either BSET (b->directory, val), or BSET (b, ->directory, val), which restricts the form that can be used. Stefan