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: master 3b41141708: Expose the name of an event's input device to Lisp Date: Sun, 10 Apr 2022 15:37:30 +0800 Message-ID: <87wnfxcrt1.fsf@yahoo.com> References: <164933858147.29834.15050766441005536059@vcs2.savannah.gnu.org> <20220407133623.9C209C009A8@vcs2.savannah.gnu.org> <87ee28xyg2.fsf@yahoo.com> <87lewfqf1q.fsf@yahoo.com> <87zgkvosia.fsf@yahoo.com> <87pmlql6mj.fsf@yahoo.com> <83fsmm8h0n.fsf@gnu.org> <87bkx9kb7d.fsf@yahoo.com> <83zgkt79ia.fsf@gnu.org> <87ilrhfoch.fsf@yahoo.com> <83v8vh77lq.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5845"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.91 (gnu/linux) Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Apr 10 09:38:37 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 1ndS9d-0001Qb-Pk for ged-emacs-devel@m.gmane-mx.org; Sun, 10 Apr 2022 09:38:37 +0200 Original-Received: from localhost ([::1]:45924 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ndS9c-0007Sp-HI for ged-emacs-devel@m.gmane-mx.org; Sun, 10 Apr 2022 03:38:36 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51552) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ndS8n-0006lK-5V for emacs-devel@gnu.org; Sun, 10 Apr 2022 03:37:45 -0400 Original-Received: from sonic307-56.consmr.mail.ne1.yahoo.com ([66.163.190.31]:46390) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ndS8l-00084D-CE for emacs-devel@gnu.org; Sun, 10 Apr 2022 03:37:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1649576261; bh=3kxEngRGm6u93H5S8M9Yzos7U5qMIok8wpYpxJj5vS0=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To; b=qwh8Jd6taAusqNrs6bprJ7y3VYqSPPLpCqXZicBKVHkXpkIlmSRBrYZDxKGxAH0e05CJGQmcEXxLCzYxe6IljT6Oal15KhfKq4al1ZvmkmFL8f+xz8Ggec+zldmR/Y7fOJ3muJc6g70L0FBfpCRm6gzR/QJUN7T+A5eKiq9OLiKKNWN5NrCt5x/AbgmK3ysK62I7Ipu6G41kIOh3V70bXHiDWNi8VD18OwL+oVq5NmpQAbWz0jA7QiW4xzC8WIUTe1P7Q+C60BN2qwlko+ETae35l1QSl5Pfznj9ZTU9deKe4oQUEaJxS24V0sf8cm7P7UOZV4BP37jekL4NO5PC2g== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1649576261; bh=B/ajaR0VzWw64oGzuEAWscXc9ZzDEWC1bUJTZ/GHPH4=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=JmWrrK7Xh49T848rqMMKObDbOcpcqKuPm2Riu44hIi66IB90NGV2nAfAPdYxsZviMhJqhxUXMgcjUmkFtQ5nmjWA7OD8Pa/CJIXs9EVpC3gXRSojChLovYKTvaiCgUfbnDSDf0/SFqhc2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Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic307.consmr.mail.ne1.yahoo.com with HTTP; Sun, 10 Apr 2022 07:37:41 +0000 Original-Received: by hermes--canary-production-sg3-65d7bd97b5-8hnzk (VZM Hermes SMTP Server) with ESMTPA ID d6859c79f46f09987c6f0ffc995bb8de; Sun, 10 Apr 2022 07:37:34 +0000 (UTC) In-Reply-To: <83v8vh77lq.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 10 Apr 2022 09:52:49 +0300") X-Mailer: WebService/1.1.20048 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Received-SPF: pass client-ip=66.163.190.31; envelope-from=luangruo@yahoo.com; helo=sonic307-56.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, RCVD_IN_MSPIKE_H2=-0.001, 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:288111 Archived-At: Eli Zaretskii writes: > We have this in many places in Emacs already, so adding one more will > not hurt too much. Dispatch on the first element of the list is easy > and produces code that is quite readable and maintainable, IMO. > > Of course, if more elegant ways exist, I don't object to using them, > quite the contrary. But if not, I see nothing especially wrong with > doing what you call "very confusing", because we do it elsewhere. Hmm, do we use keywords anywhere inside Lisp events? If not, then here's a simple way to add a property list to the end of event lists: (defun event-plist (event) "Return the property list of EVENT." (while (and event (not (keywordp (car event)))) (setq event (cdr event))) event) Then, additional information could just be added to the end of each event by appending any property list that associates keywords.