From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#7631: 24.0.50; inconsistency in event-convert-list and event-basic-type Date: Sun, 18 Jul 2021 14:20:30 +0200 Message-ID: <871r7vu835.fsf@gnus.org> 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="14969"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 7631@debbugs.gnu.org, Stefan Monnier To: Don March Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jul 18 14:21:10 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1m55nC-0003ge-Sq for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 18 Jul 2021 14:21:10 +0200 Original-Received: from localhost ([::1]:48256 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m55nA-0006RE-UI for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 18 Jul 2021 08:21:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41724) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m55n4-0006QY-DD for bug-gnu-emacs@gnu.org; Sun, 18 Jul 2021 08:21:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43807) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m55n4-0003Rh-5r for bug-gnu-emacs@gnu.org; Sun, 18 Jul 2021 08:21:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m55n3-0002o1-SU for bug-gnu-emacs@gnu.org; Sun, 18 Jul 2021 08:21:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 18 Jul 2021 12:21:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 7631 X-GNU-PR-Package: emacs Original-Received: via spool by 7631-submit@debbugs.gnu.org id=B7631.162661084310716 (code B ref 7631); Sun, 18 Jul 2021 12:21:01 +0000 Original-Received: (at 7631) by debbugs.gnu.org; 18 Jul 2021 12:20:43 +0000 Original-Received: from localhost ([127.0.0.1]:55350 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m55mk-0002mm-RD for submit@debbugs.gnu.org; Sun, 18 Jul 2021 08:20:43 -0400 Original-Received: from quimby.gnus.org ([95.216.78.240]:33502) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m55mi-0002mR-Eg for 7631@debbugs.gnu.org; Sun, 18 Jul 2021 08:20:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=B2CQezc4ZiKecRv13gV+Y2qeoFyt/AUeeEUm1OZy3g4=; b=NIHVDUl8BpDv3FcXtnCSQ9nG0j kPjVATT0YZpnezUgn3f9pDO8KQcP/7KXwMisuB8OFLm3j9wPU3Y06p7mDMVosV30EuDLRgUuEy0wD TaKX4P2/IWosbYNFM4URvRQ0xSr6c5M+7/wwxYuDQQG7xt/jSMe1Uw/1lx13abiA7+0M=; Original-Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m55mZ-0000Rk-Cg; Sun, 18 Jul 2021 14:20:33 +0200 X-Now-Playing: The Meters's _Gettin' Funkier All The Time (1): Here Comes The Meter Man & Looka-Ya Py Py_: "Live Wire" In-Reply-To: (Don March's message of "Mon, 13 Dec 2010 22:36:20 -0500") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:210172 Archived-At: Don March writes: >>> (event-convert-list '(t)) ; => 116 >> >>> There's good reason to want this to eval to t (i.e. the symbol, not >>> the char). >> >> Could you explain what is this good reason? > > I guess it boils down to the expected result of: > > (setq event t) > > (event-convert-list > (append (event-modifiers event) > (list (event-basic-type event)))) ; => 116, not t Or simpler: (event-convert-list (list nil 's)) => 115 (115 is the same as the character ?s.) The doc string says: --- EVENT-DESC should contain one base event type (a character or symbol) and zero or more modifier names (control, meta, hyper, super, shift, alt, drag, down, double or triple). The base must be last. The return value is an event type (a character or symbol) which has the same base event type and all the specified modifiers. --- (event-basic-type 's) => s So if this isn't a bug (and I think it would be problematic to change the return value at this point), the doc string is at least slightly misleading here, and shouldn't claim that it returns exactly the same base event type. Any opinions? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no