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 23:27:00 +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="10619"; 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 Thu Nov 30 00:28:14 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 1r8TyX-0002Xk-TW for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 30 Nov 2023 00:28:13 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r8TyG-0003RJ-JN; Wed, 29 Nov 2023 18:27:56 -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 1r8TyE-0003Qs-Mt for bug-gnu-emacs@gnu.org; Wed, 29 Nov 2023 18:27:54 -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 1r8TyE-0004HN-FC for bug-gnu-emacs@gnu.org; Wed, 29 Nov 2023 18:27:54 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r8TyL-0006bY-Rh for bug-gnu-emacs@gnu.org; Wed, 29 Nov 2023 18:28:01 -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 23:28:01 +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.170130044925349 (code B ref 67390); Wed, 29 Nov 2023 23:28:01 +0000 Original-Received: (at 67390) by debbugs.gnu.org; 29 Nov 2023 23:27:29 +0000 Original-Received: from localhost ([127.0.0.1]:51708 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r8Txp-0006am-CC for submit@debbugs.gnu.org; Wed, 29 Nov 2023 18:27:29 -0500 Original-Received: from mail-lf1-x134.google.com ([2a00:1450:4864:20::134]:43017) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r8Txm-0006aX-TZ for 67390@debbugs.gnu.org; Wed, 29 Nov 2023 18:27:28 -0500 Original-Received: by mail-lf1-x134.google.com with SMTP id 2adb3069b0e04-50bb8ff22e6so1493756e87.0 for <67390@debbugs.gnu.org>; Wed, 29 Nov 2023 15:27:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701300433; x=1701905233; 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=rcS+YXczQRd9WNtwPEoAro9rkASLuybMpdsZbZuFCI4=; b=ap50IUK99+Arc9xv7m9ZQpIQhQyMVvkC/9b2EaC5VxsBGnmKK84pjKP6mKlhpCTiq+ 8GwvBgyiVgOUX+g7awZtpMEw2Hkc6Z1CEhvq4TClmy1AEHbnMZoeCPu/AXzrwWmVtGwN aSkNKzQPybrkwRpFANIvK2jMi5kOgIzpyIGLKujRwWVy6mXawZfbk+zQ4Gusn+wvEXGQ ZXFGuGjSQ7XIGd1bHYGgBzEaSiwSUTDy1RDBsPzX7ZyJNUUAROqiH9Ov5bK84yFo2IE1 pLfz+F2CFhgfgshXlDbvJyxV31UNKsPJtfS9FqRJb2XogF04Js7o4aheU7IxqP/gWXqe 8h5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701300433; x=1701905233; 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=rcS+YXczQRd9WNtwPEoAro9rkASLuybMpdsZbZuFCI4=; b=FthUrHz6onpLCbcf+f8+En/7LvewID3P/fkrKj54d8S+VL8adamoLbDiZ3RvZawKuq h+TdUJu0Wpo9hR9uNtdGnbd1QFVWQY7pLyZv8gsbqiQ9QOG+DkMmNjx1lBzc7h4+28H2 /i4TFwmH4LOf38zAN6QZyKgQRouYK16wqHj7FDh2THppmA8T3WeHI4oF5zbq66p4Z7tf AgkICe9vjUB7IuSCcar2HxRGul56ciCxJDDFQdUu/i1vVj5fkbPdNdPnumzZMfmC2X6Y Ds2x64Q/6pdVsD8rwzwKzmJFzu1P3mGh1RGZzFbG25BSP3tL1s6Xu5GTbHxSPTBkQmmj YMVw== X-Gm-Message-State: AOJu0YwZ3m0ePG5lY27iQvCDbJxCTN4CFzkmIenZElxnvFsHhDHHu1t3 /+d+5CeOEvS1RjeSJ4+ZjIK39Q17ffc/eZPghnthcrtK X-Google-Smtp-Source: AGHT+IHMH4pYPwAMzyoSwmEhQ1Ao2oLJsCK5uyG9yRxKWsmbfV85fwSOtgkYPlKSY/QvqrPKYmSUwKWKLBLNxP1te74= X-Received: by 2002:a05:6512:108d:b0:50b:c8c3:4580 with SMTP id j13-20020a056512108d00b0050bc8c34580mr714519lfg.10.1701300432311; Wed, 29 Nov 2023 15:27:12 -0800 (PST) In-Reply-To: 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:275261 Archived-At: On Wed, Nov 29, 2023 at 1:30=E2=80=AFPM Jo=C3=A3o T=C3=A1vora wrote: > > On Sat, Nov 25, 2023 at 4:03=E2=80=AFPM Jonas Bernoulli via Bug reports f= or > GNU Emacs, the Swiss army knife of text editors > wrote: > > > > Joseph Turner writes: > > > > > + (car (shorthands--find-if > > > + (lambda (short) > > > + (string-prefix-p short (match-stri= ng 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. nevermind, it does work if what you want is to see if the cars of the alist are prefixes to the key, which is probably your intention in this snippet.