From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Anders Lindgren Newsgroups: gmane.emacs.bugs Subject: bug#21701: Fwd: cl-typecase broken (was 25.0.50; ert explainer for equal can't handle negative numbers) Date: Fri, 4 Dec 2015 20:42:53 +0100 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a113d39e29defcd052617b655 X-Trace: ger.gmane.org 1449258205 27092 80.91.229.3 (4 Dec 2015 19:43:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 4 Dec 2015 19:43:25 +0000 (UTC) Cc: 21701@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Dec 04 20:43:19 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1a4wGA-0003Ll-Or for geb-bug-gnu-emacs@m.gmane.org; Fri, 04 Dec 2015 20:43:15 +0100 Original-Received: from localhost ([::1]:43145 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a4wGA-0004jf-78 for geb-bug-gnu-emacs@m.gmane.org; Fri, 04 Dec 2015 14:43:14 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45293) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a4wG3-0004jD-6Y for bug-gnu-emacs@gnu.org; Fri, 04 Dec 2015 14:43:11 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a4wFy-0007cY-8D for bug-gnu-emacs@gnu.org; Fri, 04 Dec 2015 14:43:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:49703) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a4wFy-0007cN-4D for bug-gnu-emacs@gnu.org; Fri, 04 Dec 2015 14:43:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1a4wFx-0005tg-QN for bug-gnu-emacs@gnu.org; Fri, 04 Dec 2015 14:43:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Anders Lindgren Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 04 Dec 2015 19:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21701 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 21701-submit@debbugs.gnu.org id=B21701.144925817622656 (code B ref 21701); Fri, 04 Dec 2015 19:43:01 +0000 Original-Received: (at 21701) by debbugs.gnu.org; 4 Dec 2015 19:42:56 +0000 Original-Received: from localhost ([127.0.0.1]:39411 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a4wFr-0005tM-Tu for submit@debbugs.gnu.org; Fri, 04 Dec 2015 14:42:56 -0500 Original-Received: from mail-vk0-f43.google.com ([209.85.213.43]:35505) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a4wFp-0005tC-UQ for 21701@debbugs.gnu.org; Fri, 04 Dec 2015 14:42:54 -0500 Original-Received: by vkha189 with SMTP id a189so71804213vkh.2 for <21701@debbugs.gnu.org>; Fri, 04 Dec 2015 11:42:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=KOzQT9vnTXIqlxW1n8J3RYr0Nz3UuP1vvYZQMPzzBVA=; b=bLauSm4dUv8hm5YEssdOG/9ohvHrQIK1eooBGKm2apUqhaSdc+NMQ/zp1EhSy40Le+ iv0ZszPFezevpMFdzdXTTrbZVvTMsIpD6IAODFdgqt6HPBuSEz48tklHxnd3A2mutIHO xlRotGR6FaPzddabQRyHpexyHJPjmw2ftqMqHEZmO83AMKx3C1vgir3V2yrelcbDq5tl NxmK90FfkfNFzc6bdv2C4zBom5hljj587eDeI5fYB21CbUbowaz0CmUaUuyDAg0Ctbaw 7NNUnpL38xaoasTszR9ejlrxF+R5qsn7jXD/c619lAUyZHmIQTa5XZg96tWekIp5LW+b 0tng== X-Received: by 10.31.152.207 with SMTP id a198mr11561225vke.68.1449258173458; Fri, 04 Dec 2015 11:42:53 -0800 (PST) Original-Received: by 10.31.210.133 with HTTP; Fri, 4 Dec 2015 11:42:53 -0800 (PST) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:109620 Archived-At: --001a113d39e29defcd052617b655 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi! I assumed that `characterp' and the `character' type class was connected in Common Lisp. If they aren't I guess the current system makes sense. I downloaded the ert changes and ran all my local tests and I haven't seen any problems. Thanks! -- Anders On Fri, Dec 4, 2015 at 7:17 PM, Stefan Monnier wrote: > > That's indeed what should be done if ERT needs this to be a plain > > character that can inserted in a string. Common-Lisp's `character' > > includes not just characters but also "characters with modifiers" such > > as ?\M-\H-=C3=A9, which can't appear in a string and are rejected by > > `characterp'. > > I installed a patch which makes ERT use pcase over cl-typecase. > In most cases it doesn't make a big difference, but in a few spots, it > is cleaner because a subsequent cl-destructuring-bind can be merged into > it (and it got rid of those places where we used (member :foo) > as a type to just check equality, which is rather inefficient). > > > Stefan > --001a113d39e29defcd052617b655 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi!

I assumed that `characterp' and= the `character' type class was connected in Common Lisp. If they aren&= #39;t I guess the current system makes sense.

I do= wnloaded the ert changes and ran all my local tests and I haven't seen = any problems.

Thanks!

=C2= =A0 =C2=A0 -- Anders

On Fri, Dec 4, 2015 at 7:17 PM, Stefan Monnier <= monnier@iro.umontreal.ca> wrote:
> That's indeed what should be done if ERT ne= eds this to be a plain
> character that can inserted in a string.=C2=A0 Common-Lisp's `char= acter'
> includes not just characters but also "characters with modifiers&= quot; such
> as ?\M-\H-=C3=A9, which can't appear in a string and are rejected = by
> `characterp'.

I installed a patch which makes ERT use pcase over cl-typecase.
In most cases it doesn't make a big difference, but in a few spots, it<= br> is cleaner because a subsequent cl-destructuring-bind can be merged into it (and it got rid of those places where we used (member :foo)
as a type to just check equality, which is rather inefficient).


=C2=A0 =C2=A0 =C2=A0 =C2=A0 Stefan

--001a113d39e29defcd052617b655--