From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mauro Aranda Newsgroups: gmane.emacs.bugs Subject: bug#66178: 30.0.50; cperl-mode inconsistent hash key fontification Date: Sun, 24 Sep 2023 19:21:02 -0300 Message-ID: <8b2fff5e-dffe-1c3d-af6e-e61fb0774ced@gmail.com> References: <1817567d-4fce-cd09-a34f-89e30186c0b3@gmail.com> <8734z3y9cp.fsf@oook.m.uunet.de> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6254"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 To: Harald =?UTF-8?Q?J=C3=B6rg?= , 66178@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Sep 25 00:22:12 2023 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 1qkXUS-0001QV-CC for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 25 Sep 2023 00:22:12 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qkXU7-0006Xx-De; Sun, 24 Sep 2023 18:21:51 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qkXU6-0006Xh-9I for bug-gnu-emacs@gnu.org; Sun, 24 Sep 2023 18:21:50 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qkXU6-0007z9-1e for bug-gnu-emacs@gnu.org; Sun, 24 Sep 2023 18:21:50 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qkXUI-0004a5-0p for bug-gnu-emacs@gnu.org; Sun, 24 Sep 2023 18:22:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Mauro Aranda Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 24 Sep 2023 22:22:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66178 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: wontfix Original-Received: via spool by 66178-submit@debbugs.gnu.org id=B66178.169559408717555 (code B ref 66178); Sun, 24 Sep 2023 22:22:01 +0000 Original-Received: (at 66178) by debbugs.gnu.org; 24 Sep 2023 22:21:27 +0000 Original-Received: from localhost ([127.0.0.1]:43714 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qkXTi-0004Z3-Qe for submit@debbugs.gnu.org; Sun, 24 Sep 2023 18:21:27 -0400 Original-Received: from mail-ot1-x330.google.com ([2607:f8b0:4864:20::330]:61721) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qkXTf-0004Yl-WB; Sun, 24 Sep 2023 18:21:26 -0400 Original-Received: by mail-ot1-x330.google.com with SMTP id 46e09a7af769-6c4e7951dc1so532411a34.3; Sun, 24 Sep 2023 15:21:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695594066; x=1696198866; darn=debbugs.gnu.org; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=3T0U+a7YjfnacUYm0RqYBlGrvQjiBdIFrEV7y5grL08=; b=aQo1YUWChAMrwTU0SULJHs5ADEde0u6n0PsFxpJ+w8CKyd0Hv5MJ/pXJw2V7HEq8Dj dutjmaJmnp1q6rg6ms9D55JhEFq/42mCEu+jUVv0e2erE6I7/HScjLBlhXwViDuyNZ5b IYVDoMrI5AWTJRMUsTYZrcILL2H3PTUqMkUhpiiXbHJeEwSFem+ToGA19o5IWzsXXYF7 zcz9Q2eXHmn7Tt/Wl2xqq5ghMXraSnct9uh9sNv0HD+70fM/d+0t265F7SGJLIeh4Xb1 MaKwHjvkaaKL+20zkz2eju7IIRT/XPxxRGKve6TI6xbZLxDZZL5KY7G8I+mvRVxbBBOQ G1Bw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695594066; x=1696198866; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=3T0U+a7YjfnacUYm0RqYBlGrvQjiBdIFrEV7y5grL08=; b=SoBFfmjM10Imu3FU74yhVRBzdMz0WgA4HpLQW4otznt8agassHqbpe3gnBvtvsg/xE ydQxxayuT8vBHmfB6h+K3ArP+xZaD3cmE28iiUmGQ1OMFtMyVPdRodSnmFMrqIGCdHPk pJhe60R74Mh02HUYDg16eqCpDRC1M0/qy2KTYdRAt3KVNM6Vc73BFRO9Cbc8wmjNxxQy 9RAxnpMaoO1GvH4VCg4Jq07IY23CBSyjCTA9mtE97q7uMu/SAr4E+a4tnuUCHPfKbk8H WALD/6Vxd0df/Qfl5xYGxQ6o18yvl4+seJP3vXfUQZZbvpKkyP/mg0wwi8flhM9wWby0 ZMxQ== X-Gm-Message-State: AOJu0YxLKELi6SWLldty56GjyD3npc5b6oLWJau9eWQm8pv2cPqzrf4+ YImtkRpEXNEu0Th2QJZ3s8M= X-Google-Smtp-Source: AGHT+IFFzvPUEX0nz4U2Kgxc6+fFaH2Q38JQw8+FkrKf0R3+/2M0++U8ZAikRUwhOGir8hpmNGkACA== X-Received: by 2002:a05:6830:19a:b0:6bd:836:4fc2 with SMTP id q26-20020a056830019a00b006bd08364fc2mr6164708ota.17.1695594066009; Sun, 24 Sep 2023 15:21:06 -0700 (PDT) Original-Received: from [192.168.0.234] ([152.168.142.156]) by smtp.gmail.com with ESMTPSA id ge8-20020a17090b0e0800b00267ee71f463sm6934152pjb.0.2023.09.24.15.21.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 24 Sep 2023 15:21:05 -0700 (PDT) Content-Language: en-US In-Reply-To: <8734z3y9cp.fsf@oook.m.uunet.de> 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:271278 Archived-At: tags 66178 notabug close 66178 quit On 24/9/23 10:44, Harald Jörg wrote: > tags 66178 + wontfix > thanks > > Mauro Aranda writes: > >> emacs -Q >> C-x C-f bug.pl >> M-x cperl-mode >> my %factorial = ( >> 0 => 1, >> zero => 1 >> ); >> >> zero is recognized as a string, 0 is not. > > This might look surprising, but it is intentional. > > zero is a bareword which undergoes hash-key stringification. > > The digit 0, on the other hand, is converted to a string according to > Perl's type conversion rules. That is a different thing: Perl's type > conversion converts all of 0, 000, 0.0, 0E0 to the hash key "0". > > Let me expand your example to demonstrate some more cases where the hash > key is (correctly) not fontified as a string: > > my %hash = ( > "0" => 'The string "0"', > "00" => 'The string "00"', > 0 => 'A number which is converted to the string "0"', > 00 => 'A number which is converted to the string "0"', > 0.0 => 'A number which is converted to the string "0"', > 0E0 => 'A number which is converted to the string "0"', > zero => "A bareword which is stringified", > zero() => "The function's return value is the key", > +zero => "The function's return value is the key", > ); Thank you for the explanation, it makes more sense to me now. I'm tagging this one as notabug and closing.