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: Wed, 29 Nov 2023 13:30:22 +0000 Message-ID: References: <87a5r5ph3p.fsf@bernoul.li> <87msv2vmzf.fsf@bernoul.li> <878r6mzezo.fsf@ushin.org> <87sf4tg6ts.fsf@bernoul.li> 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="18882"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Joseph Turner , 67390@debbugs.gnu.org, Adam Porter To: Jonas Bernoulli Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Nov 29 14:31:16 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 1r8Keq-0004k3-CZ for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 29 Nov 2023 14:31:16 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r8Kec-0001Xy-8w; Wed, 29 Nov 2023 08:31:02 -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 1r8KeW-0001Rz-Me for bug-gnu-emacs@gnu.org; Wed, 29 Nov 2023 08:30:56 -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 1r8KeV-0006po-Fl for bug-gnu-emacs@gnu.org; Wed, 29 Nov 2023 08:30:55 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r8Kec-0000u6-EN for bug-gnu-emacs@gnu.org; Wed, 29 Nov 2023 08:31: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: Wed, 29 Nov 2023 13:31: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.17012646522046 (code B ref 67390); Wed, 29 Nov 2023 13:31:02 +0000 Original-Received: (at 67390) by debbugs.gnu.org; 29 Nov 2023 13:30:52 +0000 Original-Received: from localhost ([127.0.0.1]:49133 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r8KeR-0000W4-GV for submit@debbugs.gnu.org; Wed, 29 Nov 2023 08:30:51 -0500 Original-Received: from mail-lf1-x12c.google.com ([2a00:1450:4864:20::12c]:42284) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r8KeO-0000DT-KB for 67390@debbugs.gnu.org; Wed, 29 Nov 2023 08:30:50 -0500 Original-Received: by mail-lf1-x12c.google.com with SMTP id 2adb3069b0e04-50bb92811c0so906955e87.1 for <67390@debbugs.gnu.org>; Wed, 29 Nov 2023 05:30:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701264634; x=1701869434; 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=xmDdKT7PqhoJTPHKxQ3qAxG2j7oH+E/LMwnMF9VrTHo=; b=DD8o0iyMXSZARBgPHHNNruvPXOo11mDRHo/djqulOyLIb82PJAtrusmUU7m7O547Ub ZilYcsz79QtzSg92f22YGs/3SuAJ+LGCuB08CTIAtAtZKKdGFx2VJlpvEPaKUw27uOxH XkjwsaobgNwx9aL2Ihfx8SqqN53GUoT2AedXLaHji+DF0aor9YAjxE913vNiUvUEJeQT 4RDtU5pn21GxPu0v4VKqiudAkBpNcL9UY9345rmAVl2gBelc0KudBgMm81lbRg9gjY15 HFlWwZndWggnXVnzjvZx/9nEyba0FF9ChtvdSCsyo+Hr/0tKMahHiMHdbGVSW+EBvt2R 3eBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701264634; x=1701869434; 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=xmDdKT7PqhoJTPHKxQ3qAxG2j7oH+E/LMwnMF9VrTHo=; b=gDylr8COj3bMkDKazhviFzcHJdoqe1UgNqZe+uOOz2hJV+VTGPJ+bu9LBuE7idB8Gk yl3+/E95x6WRpWSgboDt8ITKE0tDzB0Fvvv7kszdIJ1rhYloLAvUmQpy0MtW4D6OW4UE DAcQFIYxaGpQwo4zlSYE13h6OIBh+/Aq0w1eTcHE0Sncx1a/cySe+2y2MWgkHDAeOYts X8V/DjHc7MV4SfEybzTcJPTTrc5GV1UPmn1Sxn6HCNBFuKPTByqxlrns5qfvDxrpqxwM 2wdcwbBQ6uLyAkaUbPFPrWprXg3x5TVCc25n0rkg+6lmLuRsUWS89kZ3EH2xxHnpc7D1 CPOg== X-Gm-Message-State: AOJu0YwesyG41UrNYw9f+UNmCPRVYmTPjYFbVkrqKvgq/PehTrDKV3GW CJJFO9QFYpwlFHi5kFjiNdOgryZ098FAOpy/sj/A5D/nviw6SA== X-Google-Smtp-Source: AGHT+IFX6s+xpsXR7PU5u9SXJs0Tb5Wwmxr3EgGBEfZvdvkLWRk4ms+k4D+fmOR2xSBEGI3pnliXSxlbyQMeihZLnBM= X-Received: by 2002:a05:6512:41c:b0:50b:c5b3:6445 with SMTP id u28-20020a056512041c00b0050bc5b36445mr530077lfk.8.1701264633982; Wed, 29 Nov 2023 05:30:33 -0800 (PST) In-Reply-To: <87sf4tg6ts.fsf@bernoul.li> 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:275225 Archived-At: On Sat, Nov 25, 2023 at 4:03=E2=80=AFPM Jonas Bernoulli via Bug reports for GNU Emacs, the Swiss army knife of text editors wrote: > > Joseph Turner writes: > > > + (car (shorthands--find-if > > + (lambda (short) > > + (string-prefix-p short (match-string= 1))) > > + read-symbol-shorthands #'car))))) > > Or simply: > (car (assoc (match-string 1) > read-symbol-shorthands > #'string-prefix-p)) I don't think it works, at least in my 'assoc', the order of string-prefix-p arguments must be switched. Pity assoc or string-prefix-p decs didn't coordinate this. (assoc probe read-symbol-shorthands (lambda (a b) (string-prefix-p b a))) works