From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Alex Gramiak Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Renaming non-X x_* identifiers Date: Sun, 14 Apr 2019 09:57:47 -0600 Message-ID: <877ebwvatg.fsf@gmail.com> References: <87wokp4okn.fsf@gmail.com> <871s2w510a.fsf@gmail.com> <922F9B91-2E9E-45F6-BB96-66CAE5E9FB81@gnu.org> <87k1goqpnn.fsf@gmail.com> <83imw8nspc.fsf@gnu.org> <87ftrcqg5j.fsf@gmail.com> <83bm20nm62.fsf@gnu.org> <87d0men4jx.fsf@gmail.com> <83o95sisk7.fsf@gnu.org> <87mulcnui4.fsf@gmail.com> <83bm1si7lf.fsf@gnu.org> <87ef6ont03.fsf@gmail.com> <83a7hci44l.fsf@gnu.org> <87a7hcndtc.fsf@gmail.com> <831s2nhza8.fsf@gnu.org> <87d0lpvq6n.fsf_-_@gmail.com> <83r2a5keo7.fsf@gnu.org> <87pnppu4ox.fsf@gmail.com> <83muktk9xb.fsf@gnu.org> <875zrhtg2i.fsf@gmail.com> <83ftqkk7lr.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="191669"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) Cc: alan@idiocy.org, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Apr 14 17:58:01 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hFhW1-000ne7-Aq for ged-emacs-devel@m.gmane.org; Sun, 14 Apr 2019 17:57:57 +0200 Original-Received: from localhost ([127.0.0.1]:37220 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hFhW0-00059l-AJ for ged-emacs-devel@m.gmane.org; Sun, 14 Apr 2019 11:57:56 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:59553) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hFhVt-00057V-OU for emacs-devel@gnu.org; Sun, 14 Apr 2019 11:57:50 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hFhVs-0003sO-Gn for emacs-devel@gnu.org; Sun, 14 Apr 2019 11:57:49 -0400 Original-Received: from mail-it1-x142.google.com ([2607:f8b0:4864:20::142]:54159) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hFhVs-0003ru-7X; Sun, 14 Apr 2019 11:57:48 -0400 Original-Received: by mail-it1-x142.google.com with SMTP id y204so23332998itf.3; Sun, 14 Apr 2019 08:57:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=Wf5Ucq1msp/amdSEOxXaftGrz8F2NXwZns61p2iW5y8=; b=YMoPjc8EoNTnkcgxFts6rQ4WnRPQdiagXasm7X6PoOZtATBQNsPEGkABSl2OPeeCKL ZCrJGv6QU1W5Bh7TFBTe0L7FgWRd33AebNOGyjDnzNz4qKPKz5+Uzjf+cp2ptdCAIv6Y bwrWp2Z58X3nkMi2jCn9ZNVUJDU5SENWqBNnaFmN05aGibtWjcUEcOPK/aq4RZFtYxMx /6Ga3aBHSE9u3p1xKJDfUnkQAjJqDEP+cGn8km7mihn9Cb6wuZLnIPkomYpHUnkWY04z LaW6WYgufTv3tDuVwpkQqBb9QO2KRc3FO1ib/uljKI86uVjEDZ+aJH55R1q7mh/uc4EE 5gGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=Wf5Ucq1msp/amdSEOxXaftGrz8F2NXwZns61p2iW5y8=; b=bc4CrY23ULE2jwYmk656UJXOd6fyjWESPbV9CaZNH72evI0/8/EoLalBS8Nzd1kUbc kWXPKyQiDFVgvVbryQl4dhzFa4kD08mqzgJyQk4ifO5LjZLPTKFoEhtAHdYGxU6wYkRu DSKmeqJwbJEPNFg+MTee0P36ihxxpP4BzNVGWlW7E0uGUSRqSWJauAGL7Jn5iBn8nF8H jl1PzdCMLRgoDqGeLZEJFwE3Lc2HQ0PoyEMoFI1XGSWJdDXG7R8q7QLFrQN8Hxmoc8Hj 2VHs+jAX1Ov3I6dNkrlGT5g4JIG+ZSpZAMdz7u87RPymNaocy8CuOU/SM2ndIUXvRNxm iJJA== X-Gm-Message-State: APjAAAVCZoKaDUmpHraRtUM56vm/zk0HEGBTRgvRcTXbW/VvyEefGnJq gYUzo7L5VpXOhF63fv5K+w5s1s+F X-Google-Smtp-Source: APXvYqw5gn2TbiIrfJpOdqv2yZ0cgqfygHAGuQNKefhHawMoZ52xuuXM/yNCgnMRtMiqy8KfMtSj/g== X-Received: by 2002:a24:5cd2:: with SMTP id q201mr22857468itb.93.1555257467431; Sun, 14 Apr 2019 08:57:47 -0700 (PDT) Original-Received: from lylat ([2604:3d09:e37f:1500:1a72:4878:e793:7302]) by smtp.gmail.com with ESMTPSA id 77sm7052490itl.17.2019.04.14.08.57.46 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 14 Apr 2019 08:57:46 -0700 (PDT) In-Reply-To: <83ftqkk7lr.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 14 Apr 2019 17:02:40 +0300") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::142 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:235446 Archived-At: Eli Zaretskii writes: >> From: Alex Gramiak >> Cc: emacs-devel@gnu.org, alan@idiocy.org >> Date: Sat, 13 Apr 2019 21:35:01 -0600 >> >> > If every window-system is required to provide these hooks, then I >> > think it will be enough to test only those which also have >> > implementations on TTY frames. >> >> Okay. How about wrapping the required hooks in termhooks.h in #ifdef >> HAVE_WINDOW_SYSTEM so that terminal-only builds that erroneously have >> these hooks in their scope issue a compiler error? > > I generally dislike system-dependent definitions and declarations. I > prefer them to be available on all systems, with some default values > instead. And terminal-only builds are extremely rare (I think only > Hydra does them regularly, because all the bugs in that area are > flagged by Hydra), so this defense is quite weak, IME. The hooks I'm referring to are ones that AFAIU don't make any sense on non-HAVE_WINDOW_SYSTEM, and their calls are (should be) already #ifdef'd out (with non-window-system frames never reaching the call). Including the #ifdefs in the declaration side would allow for Hydra to detect cases where an undefined hook is called, which would mean adding the appropriate #ifdef or an appropriate check around that call. > So I think a test for the relevant hooks to be non-NULL would be a > better alternative. We can document in the struct definition which > members can be NULL and in what situations. I agree about the documentation, though I was thinking about documenting which hooks _must_ be defined for certain types of platforms. I suppose we could do both. I'm a bit confused by your comment on testing. Didn't you say that it was okay that the code that was under HAVE_WINDOW_SYSTEM didn't test for existence of required HAVE_WINDOW_SYSTEM hooks? Those hooks are the ones I was thinking about wrapping into #ifdefs. >> > 1) leave those symbols alone >> > 2) declare them obsolete, but meanwhile put both the new and the old >> > symbols into frame-parameters >> > >> > The above assumes that if a Lisp program does something with one of >> > these parameters, that will have no effect, i.e. that these parameters >> > are one-way communications from the Emacs internals to Lisp, as far as >> > Lisp programs are concerned. If the communications are two-way, then >> > I don't see how we can change these names; do you have any ideas? >> >> AFAIU it's technically possible that someone could use `put' to set a >> new value, but that's tantamount to changing the internal definition of >> the frame parameter setter to another frame parameter setter, so I don't >> think such a use case should really be considered. >> >> I don't have any other ideas, but 2) doesn't sound terrible as long as >> it would be removed some day. Though I don't feel strongly about the >> symbols here. > > On second thought, I think we should simply leave these alone. They > are just symbol names, and mostly used internally, so the problem is > purely aesthetic and usually hidden from the view. Doing something > like 2) above would be an overkill for such minor issue. Okay, I pushed a couple commits to revert these changes.