From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Moving kbd to subr.el Date: Fri, 15 Oct 2021 14:10:07 +0300 Message-ID: <83y26uilww.fsf@gnu.org> References: <20211004081724.6281.11798@vcs0.savannah.gnu.org> <871r4qcs8s.fsf@gnus.org> <87o87ubcnl.fsf@gnus.org> <87h7dm9en7.fsf@gnus.org> <87czoa9e7p.fsf@gnus.org> <878ryxakv9.fsf@gnus.org> <834k9km5no.fsf@gnu.org> <83k0iflsze.fsf@gnu.org> <874k9jzu7a.fsf@gnus.org> <874k9juy0r.fsf@gnus.org> <87mtnbtimj.fsf@gnus.org> <87wnme4m6f.fsf@gnus.org> <83zgraim4f.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21986"; mail-complaints-to="usenet@ciao.gmane.io" Cc: stefankangas@gmail.com, emacs-devel@gnu.org To: larsi@gnus.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Oct 15 13:12:31 2021 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 1mbL8Y-0005SF-DD for ged-emacs-devel@m.gmane-mx.org; Fri, 15 Oct 2021 13:12:30 +0200 Original-Received: from localhost ([::1]:58466 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mbL8W-00015M-Rt for ged-emacs-devel@m.gmane-mx.org; Fri, 15 Oct 2021 07:12:28 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35692) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mbL6x-0008IC-CT for emacs-devel@gnu.org; Fri, 15 Oct 2021 07:10:52 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:44938) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mbL6x-00042t-1k; Fri, 15 Oct 2021 07:10:51 -0400 Original-Received: from [87.69.77.57] (port=2034 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mbL6K-0002wX-8B; Fri, 15 Oct 2021 07:10:21 -0400 In-Reply-To: <83zgraim4f.fsf@gnu.org> (message from Eli Zaretskii on Fri, 15 Oct 2021 14:05:36 +0300) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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:277106 Archived-At: > Date: Fri, 15 Oct 2021 14:05:36 +0300 > From: Eli Zaretskii > Cc: stefankangas@gmail.com, emacs-devel@gnu.org > > > > (if (and (not need-vector) > > > (cl-loop for ch across res > > > always (and (characterp ch) > > > (let ((ch2 (logand ch (lognot ?\M-\^@)))) > > > (and (>= ch2 0) (<= ch2 127)))))) > > > (concat (cl-loop for ch across res > > > collect (if (= (logand ch ?\M-\^@) 0) > > > ch (+ ch 128)))) > > > res) > > > > Yeah, my eyes glazed over when reading that code the first few times. > > :-) > > > > > But that is equivalent to: > > > > > > (<= 0 ch 127) > > > > I think... you're totally right. It looks like a very convoluted way > > to write (<= 0 ch 127). > > I don't read CL-ish very well, so I cannot help you here. (Read: I > have no idea what this code does.) Actually, I have to disagree with the conclusion that this is a complicated way of saying (<= 0 ch 127) That's because 'ch' can include modifier bits set, and the above code resets them before comparing against 127.