From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Newsgroups: gmane.emacs.bugs Subject: bug#67390: 28; shorthands-font-lock-shorthands assumes shorthand uses same separator Date: Sat, 3 Feb 2024 14:50:01 +0000 Message-ID: References: <87a5r5ph3p.fsf@bernoul.li> <87msv2vmzf.fsf@bernoul.li> <878r6mzezo.fsf@ushin.org> <87sf4tg6ts.fsf@bernoul.li> <87ttoqnxci.fsf@ushin.org> <87sf2at44r.fsf@ushin.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31863"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 67390@debbugs.gnu.org, Adam Porter , Eli Zaretskii , Jonas Bernoulli To: Joseph Turner Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Feb 03 15:51:17 2024 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 1rWHMS-0007y6-1n for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 03 Feb 2024 15:51:16 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rWHM5-0005sd-EF; Sat, 03 Feb 2024 09:50:53 -0500 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 1rWHM3-0005sV-Eg for bug-gnu-emacs@gnu.org; Sat, 03 Feb 2024 09:50:51 -0500 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 1rWHM3-00052w-6w for bug-gnu-emacs@gnu.org; Sat, 03 Feb 2024 09:50:51 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rWHME-0007XC-7a for bug-gnu-emacs@gnu.org; Sat, 03 Feb 2024 09:51:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 03 Feb 2024 14:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67390 X-GNU-PR-Package: emacs Original-Received: via spool by 67390-submit@debbugs.gnu.org id=B67390.170697183328927 (code B ref 67390); Sat, 03 Feb 2024 14:51:02 +0000 Original-Received: (at 67390) by debbugs.gnu.org; 3 Feb 2024 14:50:33 +0000 Original-Received: from localhost ([127.0.0.1]:46011 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rWHLk-0007WV-QN for submit@debbugs.gnu.org; Sat, 03 Feb 2024 09:50:33 -0500 Original-Received: from mail-lj1-x22b.google.com ([2a00:1450:4864:20::22b]:47497) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rWHLi-0007WH-Ss for 67390@debbugs.gnu.org; Sat, 03 Feb 2024 09:50:31 -0500 Original-Received: by mail-lj1-x22b.google.com with SMTP id 38308e7fff4ca-2cf206e4d56so40169081fa.3 for <67390@debbugs.gnu.org>; Sat, 03 Feb 2024 06:50:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706971813; x=1707576613; darn=debbugs.gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=QMXq86IN/lpt4VFJOL1OdxF4HRDY8Pzl0STK0ruGeNE=; b=ErW//pJcuxhO5zu91e2EyFpt2Nag0LPVp0cgDmdHNvEIPfq86SYSeePVHiavf0zJMK 2/3RhxnisohPZ8iUT6t/iYiAc73QakJO3cW3eaOULcLzo1ZVKFY1nIdDfzj1vBbh9aXQ uOHDlcwdikSE517IanTDjuVACTEV9Dbj+6alDhwb7XhfYy7JCo1BdbBpTvn7uZDEZ7xK C3gUUieV4S/t2kJrDnzbRTWNkbe8kJT1cL1KZRcNF2LuG7gFVfycd1hjB3sMP4KCcPEk m4Pe03JI5dpT540TlR3OnYEj1KDwphwhig7tvBkBatFyNtr/O5EJ8b1Z8u2BTftd2wUS vveQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706971813; x=1707576613; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=QMXq86IN/lpt4VFJOL1OdxF4HRDY8Pzl0STK0ruGeNE=; b=mttH1CP0CMqSrsQCFI6HwpS92dlt7RvAQBA48p0QiudbHKc4s2UzpUrDnkPxa/Hub4 2Wc2K2Z1JOJd6JQxNaVT7QyxD2MuRhKUCZlpYBbyVur8k4R1FTkhZH2P2fk0I2UAJ4Gu WUnFtaXEd1fxYkDQbNfc+U7uXmeWrBvecZUEoTHqMKdgzdQ8HjCp/wgglEdvexqoE9Xt /IC11DQTudgqNox39ubNZSytZcgCinnT6cyjT6GrjKHwSpCHCe9mcXcRg/GdM17l23+O EpwnKGoDr+ITPeaCk0ZG31PuUsCzFmbDrJNintTVTkyJd2AExPhStIbVgJC59vrigTkL 0SNQ== X-Gm-Message-State: AOJu0YwiIM73ivmIcQugrVTC5tAoBUqK8I8nXVosgURwFHU2mPA/9vxb NeeDCb/5W1ICeJTTar7Scd2Iv87KAHOlaG/3qlRrgZ7l9QJ2gPCJ1rA605ZpwlC90reKcJPe/Px vMBf4MZ6xTL7EqxRJc+Scf0jLHr4= X-Google-Smtp-Source: AGHT+IECW4fUuDef8kr/Vl03/CNTZOdzc+QIapGO9wKSMEH24wG4DiM8RsxxOavvVWXvjMq/PQDKwQfnz+1quNClgc0= X-Received: by 2002:a2e:8781:0:b0:2d0:9f2f:e94 with SMTP id n1-20020a2e8781000000b002d09f2f0e94mr649943lji.34.1706971812966; Sat, 03 Feb 2024 06:50:12 -0800 (PST) In-Reply-To: <87sf2at44r.fsf@ushin.org> 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:279374 Archived-At: Sorry, this flew under the radar. I thought I had already pushed to master but didn't. So I went through the commits again, addressed your concerns, = and applied your suggestions. Pushed to master now. On Sat, Feb 3, 2024 at 7:10=E2=80=AFAM Joseph Turner wro= te: >> -[ \t]*%s\\([ \t;]+\\|$\\)") >> - (regexp-opt (mapcar 'cadr fnlist) t))) >> +[ \t]*\\(\\(?:\\sw\\|\\s_\\)+\\)\\([ \t;]+\\|$\\)")) > > Would you explain what this regexp is intended to match? A very complicated one, right? Well ask the author, but I think it's inten= ded to find many definition-like forms. No idea why this is done with regexps= and not with 'read' as it is a classical parsing pitfall in the long run. Maybe there was a reason. Anyway, I just added a bit of logic so that it considers read-symbol-shorthands if there are any. > Are you able to reproduce this on your machine? Yes, and I fixed it. > ...then this form will allocate two strings almost as long as the file. > > Here's an alternative hack attempting to uncomment and read the minimum: Thanks, I think that's a good idea and I added a commit in your name. > A couple typo nits on the commit message of "Improve > shorthands-font-lock-shorthands (bug#67390)": > > - h//thingy ; hilits "//" reads to 'hyperdrive--thingy' > + h//thingy ; hilits "h//" reads to 'hyperdrive--thingy' > > - Co-authored-by: Jo=C3=A3o T=C3=A1vora > + Co-authored-by: Joseph Turner I fixed these, too. If you succesfully test this, I think we can close thi= s bug (and the other ones, too). Jo=C3=A3o