From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Antipov Newsgroups: gmane.emacs.bugs Subject: bug#12215: CSET is unnecessarily confusing Date: Fri, 17 Aug 2012 08:12:07 +0400 Message-ID: <502DC497.7000100@yandex.ru> References: <502D8A95.7060609@cs.ucla.edu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1345176618 12062 80.91.229.3 (17 Aug 2012 04:10:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 17 Aug 2012 04:10:18 +0000 (UTC) Cc: 12215@debbugs.gnu.org To: Paul Eggert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Aug 17 06:10:18 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 1T2Dt0-0002lC-M7 for geb-bug-gnu-emacs@m.gmane.org; Fri, 17 Aug 2012 06:10:14 +0200 Original-Received: from localhost ([::1]:38453 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T2Dsz-000517-Dg for geb-bug-gnu-emacs@m.gmane.org; Fri, 17 Aug 2012 00:10:13 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:43139) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T2Dsw-00050z-B4 for bug-gnu-emacs@gnu.org; Fri, 17 Aug 2012 00:10:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T2Dsv-0004nE-7V for bug-gnu-emacs@gnu.org; Fri, 17 Aug 2012 00:10:10 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:53144) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T2Dsv-0004n1-3m for bug-gnu-emacs@gnu.org; Fri, 17 Aug 2012 00:10:09 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1T2E1V-0003qy-Jj for bug-gnu-emacs@gnu.org; Fri, 17 Aug 2012 00:19:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Antipov Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 17 Aug 2012 04:19:01 +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: X-Debbugs-Original-Cc: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.134517712714790 (code B ref -1); Fri, 17 Aug 2012 04:19:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 17 Aug 2012 04:18:47 +0000 Original-Received: from localhost ([127.0.0.1]:34457 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T2E1H-0003qU-0D for submit@debbugs.gnu.org; Fri, 17 Aug 2012 00:18:47 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:57913) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T2E1C-0003qM-SN for submit@debbugs.gnu.org; Fri, 17 Aug 2012 00:18:44 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T2Dsb-0004ZU-6u for submit@debbugs.gnu.org; Fri, 17 Aug 2012 00:09:49 -0400 Original-Received: from lists.gnu.org ([208.118.235.17]:48027) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T2Dsb-0004ZQ-3z for submit@debbugs.gnu.org; Fri, 17 Aug 2012 00:09:49 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:45248) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T2Dsa-0004wP-9e for bug-gnu-emacs@gnu.org; Fri, 17 Aug 2012 00:09:49 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T2DsZ-0004ZD-8C for bug-gnu-emacs@gnu.org; Fri, 17 Aug 2012 00:09:48 -0400 Original-Received: from forward19.mail.yandex.net ([95.108.253.144]:48529) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T2DsY-0004Yr-SL for bug-gnu-emacs@gnu.org; Fri, 17 Aug 2012 00:09:47 -0400 Original-Received: from smtp18.mail.yandex.net (smtp18.mail.yandex.net [95.108.252.18]) by forward19.mail.yandex.net (Yandex) with ESMTP id 6F8511121EAF; Fri, 17 Aug 2012 08:09:36 +0400 (MSK) Original-Received: from smtp18.mail.yandex.net (localhost [127.0.0.1]) by smtp18.mail.yandex.net (Yandex) with ESMTP id 4C99B18A04CC; Fri, 17 Aug 2012 08:09:36 +0400 (MSK) Original-Received: from unknown (unknown [37.139.84.55]) by smtp18.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 9ZFKBJqo-9ZFSjEfH; Fri, 17 Aug 2012 08:09:35 +0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1345176576; bh=suj/Ga/uvs4cz6121NnqsTbHw2w8vol+aCDUs2JItdA=; h=Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject: References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=wgDCsqg7K6nu4MjdeR12LukwB5TJxs9WMOnbHpEnXGhhA12Jf5ojXTPhDFMPSkkS6 b659igOmBS9ZLMltsfUCCuhf4aWzl0RkTLo7sEw8pxl2ThroBycqckJSOS6eP3naZQ /UvlEg98vU7C2WWjtsCVt4jnKbA3BQcsL4UCU+34= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120713 Thunderbird/14.0 In-Reply-To: <502D8A95.7060609@cs.ucla.edu> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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:63236 On 08/17/2012 04:04 AM, Paul Eggert wrote: > Recent changes to Emacs have introduced code like the following: > > CSET (XCHAR_TABLE (char_table), parent, parent); > > This is unnecessarily confusing. Those two 'parent' expressions > refer to different things; the first 'parent' is not really a C > expression at all. I recall that Stefan also expressed unease about > CSET's not acting like a function, in this respect. > > It's easy to change lisp.h so that the same code can be > written as follows, which is shorter and clearer: > > char_table_set_parent (char_table, parent); > > The main objection to changing lisp.h, if I recall correctly, is that > it will make lisp.h longer, since lisp.h will need a separate setter > function for each field. But that's not much of a problem since > these functions are really simple. And the advantage of readability > in users of the code makes the .h change worthwhile. > > Here's a patch to make this change for CSET. I'd like to install this, > along with similar patches for the other non-function ?SET macros defined > recently. OK Dmitry