From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alex =?UTF-8?Q?Benn=C3=A9e?= Newsgroups: gmane.emacs.bugs Subject: bug#30749: 26.0.91; (cl-)case is confused when a nil atom is used instead of a keylist Date: Thu, 08 Mar 2018 10:28:11 +0000 Message-ID: <87fu5azwsk.fsf@linaro.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1520505505 11643 195.159.176.226 (8 Mar 2018 10:38:25 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 8 Mar 2018 10:38:25 +0000 (UTC) User-Agent: mu4e 1.1.0; emacs 26.0.91 To: 30749@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Mar 08 11:38:21 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1etslP-0000ll-3H for geb-bug-gnu-emacs@m.gmane.org; Thu, 08 Mar 2018 11:27:07 +0100 Original-Received: from localhost ([::1]:37858 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1etsnR-0001Wm-Sw for geb-bug-gnu-emacs@m.gmane.org; Thu, 08 Mar 2018 05:29:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59459) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1etsnL-0001WX-8m for bug-gnu-emacs@gnu.org; Thu, 08 Mar 2018 05:29:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1etsnG-0001BV-HU for bug-gnu-emacs@gnu.org; Thu, 08 Mar 2018 05:29:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:42317) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1etsnG-0001BR-D5 for bug-gnu-emacs@gnu.org; Thu, 08 Mar 2018 05:29:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1etsnG-00055F-6j for bug-gnu-emacs@gnu.org; Thu, 08 Mar 2018 05:29:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Alex =?UTF-8?Q?Benn=C3=A9e?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 08 Mar 2018 10:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 30749 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.152050490919495 (code B ref -1); Thu, 08 Mar 2018 10:29:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 8 Mar 2018 10:28:29 +0000 Original-Received: from localhost ([127.0.0.1]:50214 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1etsmi-00054N-MZ for submit@debbugs.gnu.org; Thu, 08 Mar 2018 05:28:28 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:40092) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1etsmg-000549-Ue for submit@debbugs.gnu.org; Thu, 08 Mar 2018 05:28:27 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1etsma-0000wW-LN for submit@debbugs.gnu.org; Thu, 08 Mar 2018 05:28:21 -0500 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:48123) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1etsma-0000wM-IT for submit@debbugs.gnu.org; Thu, 08 Mar 2018 05:28:20 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59286) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1etsmZ-00017N-F1 for bug-gnu-emacs@gnu.org; Thu, 08 Mar 2018 05:28:20 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1etsmU-0000lw-Qu for bug-gnu-emacs@gnu.org; Thu, 08 Mar 2018 05:28:19 -0500 Original-Received: from mail-wr0-x22f.google.com ([2a00:1450:400c:c0c::22f]:44955) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1etsmU-0000lG-Jh for bug-gnu-emacs@gnu.org; Thu, 08 Mar 2018 05:28:14 -0500 Original-Received: by mail-wr0-x22f.google.com with SMTP id v65so5115056wrc.11 for ; Thu, 08 Mar 2018 02:28:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=user-agent:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=IPKEaaQP3yVF54miTnhYAT3KcyRQC61MH7Qhh8mNcGk=; b=XlpnG0ggoQLu0rVr+yt5eIJfUkjPBnujZP0J0An2+ETn3MkQbIERhcF/9V+KWe/7qn i9WHoIqmZREV/IgX/4s93lEOzrnWYUFUbFgfzRGMPWecEYeISGyWwGNCC2/Lmcx6CSOh LaS6E0IuQF74vqaCp+sqLYSLHRwPdtkctghIk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:user-agent:from:to:subject:date:message-id :mime-version:content-transfer-encoding; bh=IPKEaaQP3yVF54miTnhYAT3KcyRQC61MH7Qhh8mNcGk=; b=IPkGZiaOxwWnkUJXxLSUkNrokMY11cxBd3fuSyP1Gnf/8rSQOfslvTZmKVKaYMUqAk IpspVrHq4zu6zr75rjnuUmIuyM1d6b1u1XtEtJXbYQSKyXHetycT+oCDqAe3EvmGAbiH SdmlGTKnoaPZhKbXQhQDl4HE9cSMiVNPdieWnUWLnPUzjAK+FxhomVsIj4LGUBiAGZQW SOg3emnpgbXLtzvlafcdxvK8VO/oSqBWaMQr7huQP/n3Wd9iqcJ/17nj4g1aUXAshLs1 +mgtjjU9bMYR/JV1lWTa4PRjI5Br+F+rlJLlFKQgjgNg+0Qum7ILBws+mpoF03hb+RYB mI/w== X-Gm-Message-State: APf1xPDJY0rNA+vXQhTh14tMFLOXY5m8sHORVv5tkOjlW0xJfFxhUX9I sQqrzICU7hQbxGwRqVdGP0AkXTFwpGQ= X-Google-Smtp-Source: AG47ELu6G0V+6uykGg/Ig3HkQL5OjcKKHKmJfYPrFva4jpVf3tmXtWWB0sKuIFwcDjoGWJCJzU45Jw== X-Received: by 10.223.133.214 with SMTP id 22mr23147281wru.130.1520504893023; Thu, 08 Mar 2018 02:28:13 -0800 (PST) Original-Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id c14sm17752548wmh.15.2018.03.08.02.28.12 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 08 Mar 2018 02:28:12 -0800 (PST) Original-Received: from zen (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTPS id D64D63E0192 for ; Thu, 8 Mar 2018 10:28:11 +0000 (GMT) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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" Xref: news.gmane.org gmane.emacs.bugs:143999 Archived-At: I got confused why my case statement was failing as I'd used the second form assuming that having nil as an atom would work. I'm not sure why the quoting fixed it but it's certainly a confusing inconsistency. The following behaviour shows up on emacs -Q: (require 'cl) (case nil ((nil) "nil") ((t) "default")) "nil" (case nil (nil "nil") (t "default")) "default" (case nil ('nil "nil") ('t "default")) "nil" (case t ('nil "nil") ('t "default")) "default" I think this is probably fixable with just making the docstring clearer as the results of handling the duel atom/list of nil might have unexpected results. In GNU Emacs 26.0.91 (build 16, x86_64-pc-linux-gnu, X toolkit, Xaw3d scrol= l bars) of 2018-03-06 built on zen Repository revision: 0efe0bd233de20bfb5bd9d06b255fc8ecf04602b Windowing system distributor 'The X.Org Foundation', version 11.0.11804000 System Description: Ubuntu 16.04.3 LTS -- Alex Benn=C3=A9e