From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu Newsgroups: gmane.emacs.devel Subject: Re: Use of `window-system' as a predicate is deprecated. Why? Date: Sat, 09 Jul 2022 20:36:36 +0800 Message-ID: <874jzq31kb.fsf@yahoo.com> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21535"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.91 (gnu/linux) Cc: emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jul 09 14:38:53 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oA9jY-0005QJ-I6 for ged-emacs-devel@m.gmane-mx.org; Sat, 09 Jul 2022 14:38:52 +0200 Original-Received: from localhost ([::1]:55130 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oA9jX-0006iw-Dn for ged-emacs-devel@m.gmane-mx.org; Sat, 09 Jul 2022 08:38:51 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38736) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oA9hd-0004M6-Bt for emacs-devel@gnu.org; Sat, 09 Jul 2022 08:36:53 -0400 Original-Received: from sonic316-20.consmr.mail.ne1.yahoo.com ([66.163.187.146]:40457) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oA9hb-0003RX-G9 for emacs-devel@gnu.org; Sat, 09 Jul 2022 08:36:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1657370208; bh=ZvIkvjLyAvK9lF41syIOTkXXBpe0KjTCK37NVSl+EnA=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To; b=HfaJ29On/il8lYeCjMXhLz88wKTXVRaA5JlnpNk6EExHE64xjiQrSI1Wg0JrQVZIwBhU4yWzh/gWqSRB9NRKJJaEtw/tCw6Pf76Dnfpysm8gaty3ItkGvzcmDkdazeziajzNrJt9mXALzj72evycmReh0ybzkw2IL4MajzgneHG8THLO+8dDxB8WDsbaGNbzqUPDEf8Ws+lE5bkr1D0+yJXxK113GM23QUgIu3m8OgRu5vu7ccvUKYp30NUHtMOycaAHfP3aaaxewpWr+HHg6HwS6tQPPpSeKIo8MIio/T1xGh2iR3PgOkMeRW+Ks1Ha9+xeALryDaEaChz7ji0HmQ== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1657370208; bh=5kfVrcYNrxQWDcRhRKA3JxWaYVkIt9wKTsRvy+oPeIC=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=UdAl5TBl5NTCRFzltjCRuvUXycUMUqQFTBTYcAJ85mO5TSga+hSNAboUcvuYzVXQJWxWN9TSit9LLZmEQNWz42JIc70ixqntz4uBT2kG8eyRNO94IOVtDWJKCeCI+LtVwDKp3C/Ig6QXRC/XTwlDlL0q5uhq3RLu9A+Gxb/rB4UpZwuOq/8vXfV8iMTjC26eU1aalzFgby1t7mN9h2k2ovvTWLxJqAsK9IivYuonsn89MmZQD8sPudmZ0yI/QI3jyTLUsLJwg0zGNhyClXtBAcVxSjqGxbzmJFbgm/b8FuAhDVVFf2PF9JzmSfM1Dt02SpYciFyuOX1EqLRYiD4qsQ== X-YMail-OSG: gH88m8YVM1lyP2bKMZgGHvUlHzaYRIMO3zt54BCUa7sZn5uLHU_9bdg8dcKHCwo xE2TkpDc8us99LXTmX1sYtKAYj3AWbtLbbVOkOQaUZ5chvnxGS.bTOYZtPgkRlz9WfSFHhhIuLQX 8aETqlT4_3ilVrpbTO6H.f6e394VeOvEOyR7j7bKdntcrZWN.zC4QkDvSbA.FcmcnB.w2Jo9Pjmw 5UzV66WQLzlxknwNH0YK9Q_n9cfAfg43Cp9M1uMXqzx2YFf8lTsiA365MMxMY_pBe5.qTvw9TcBx oROQjZBITPTKcBzG_43abhveEp58.vW1m7NP9nGGWt18Fd02nh2smPffOq8THRu40Wq3oLxnu3rd 4Y39gcg0hKFSJO7CYYfpUjVioKWFRWqccS6MKVPlkC_1NYTQT3e4jE08_9msYo6Mbr9oujPRyvPs FaRo54EjL3jvl4ImpstiOrvh2QG3tCne0VxeQUs6m2vcAeklsuAbtD0xw9zDyxOpyC4aBvjyKd2b xZ0m04MpoyYonxVO2vW7xDRDn8qZbtEzn3rgwQuvuWIgRcJYqJf1EdjBND31uXhRy4A7MTsKaobQ SDf8Ddz1Dmk.vuleY.FNrqH9C0s_V0oQd9Y4Wm53B6kBd_0NYPvQ4oKBF1XTUjItYG87v4ReuZGb P.1I8a4Gnt_WyY0L5iW8kURa8KOhQdIIq1xEFy6zCBglweLHeRiPg44k1.NP7ImDctjLZVI.Ib0x 3.rtU3EnmQMR6JF2uiLB92cesvHKqJT3Shcm4q7XczSktX4ivCraf.WcaOuKGCruqc4TeWFMjUC8 H_M5S3QHaHZK0IsCI_fvRtgxjQziqOgzf4muby_XVE X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic316.consmr.mail.ne1.yahoo.com with HTTP; Sat, 9 Jul 2022 12:36:48 +0000 Original-Received: by hermes--canary-production-sg3-67975bbd4b-v4p6m (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 1421842fb391e3a11bcc187f4bdd5921; Sat, 09 Jul 2022 12:36:40 +0000 (UTC) In-Reply-To: (Alan Mackenzie's message of "Sat, 9 Jul 2022 12:22:41 +0000") X-Mailer: WebService/1.1.20381 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Received-SPF: pass client-ip=66.163.187.146; envelope-from=luangruo@yahoo.com; helo=sonic316-20.consmr.mail.ne1.yahoo.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:291985 Archived-At: Alan Mackenzie writes: > Hello, Emacs. > > The doc string for window-system and its Elisp manual entry say that the > function should not be used. The manual entry says: > > Do _not_ use `window-system' and `initial-window-system' as predicates > or boolean flag variables, if you want to write code that works > differently on text terminals and graphic displays. That is because > `window-system' is not a good indicator of Emacs capabilities on a > given display type. Instead, use `display-graphic-p' or any of the > other `display-*-p' predicates described in Display Feature Testing. > > .. I am amending minibuf.c and wish to know only whether the current > terminal->focus_frame_hook is validly set. Can't you simply test whether or not `term->focus_frame_hook' is set? > The manual entry seems to be to be unnecessarily patronising. It > insinuates that the only possible "capabilities" a user could be > interested in are graphic capabilities. > > Surely I should not have to go such ridiculous lengths as calling a lisp > function which has nothing to do with what I need, and then interpreting > its result. > > So, how should I find out whether terminal->focus_frame_hook is valid or > not, if I'm not allowed to use Fwindow_system? OTOH, I agree with you completely here.