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#50946: Emacs-28: Inadequate coding in hack-elisp-shorthands Date: Fri, 1 Oct 2021 22:15:03 +0100 Message-ID: References: <831r54einq.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000024dd4405cd510fe7" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39453"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Alan Mackenzie , 50946@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Oct 01 23:16:28 2021 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 1mWPtL-000A4U-8o for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 01 Oct 2021 23:16:27 +0200 Original-Received: from localhost ([::1]:58698 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mWPtJ-0001GU-RP for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 01 Oct 2021 17:16:25 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48634) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mWPsx-0001DA-1r for bug-gnu-emacs@gnu.org; Fri, 01 Oct 2021 17:16:06 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:45940) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mWPsw-0007Lv-Pg for bug-gnu-emacs@gnu.org; Fri, 01 Oct 2021 17:16:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mWPsw-0001ye-Gc for bug-gnu-emacs@gnu.org; Fri, 01 Oct 2021 17:16:02 -0400 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: Fri, 01 Oct 2021 21:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50946 X-GNU-PR-Package: emacs Original-Received: via spool by 50946-submit@debbugs.gnu.org id=B50946.16331229237547 (code B ref 50946); Fri, 01 Oct 2021 21:16:02 +0000 Original-Received: (at 50946) by debbugs.gnu.org; 1 Oct 2021 21:15:23 +0000 Original-Received: from localhost ([127.0.0.1]:57486 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mWPsJ-0001xf-Gl for submit@debbugs.gnu.org; Fri, 01 Oct 2021 17:15:23 -0400 Original-Received: from mail-pl1-f178.google.com ([209.85.214.178]:44943) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mWPsF-0001xQ-NI for 50946@debbugs.gnu.org; Fri, 01 Oct 2021 17:15:21 -0400 Original-Received: by mail-pl1-f178.google.com with SMTP id t11so7088614plq.11 for <50946@debbugs.gnu.org>; Fri, 01 Oct 2021 14:15:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=fIbfpvYYsmftqR3B0vZrmo3cvgJQk7GGQ0rtJ4oZ56E=; b=UindRaTnVBn7rIQ40ljc3WGVaTcWcP0uAKEgdoFUKmb5c/C7HasBkbiJw9A5lzOVIL QW8tqSaafwK5tSPoxY+je35RLDDB+GPrbJ8EYoTBW6nNwucVN9C4/a2HOC5YGiFQ1nqE oOvVRJFSc+E1s1hZyl5kAvsxm+EbQqYpc881gZMcoK+NSzZYPzohqO01kkfpBxWKOhZ9 dFkC9+4mQZWehUplftAAdOXLq5/sqnN6Wt0ARDyl6lolCVx90tIq568nVX0YGMhvJ9D9 OFf5UWfdAxrUEbdDPzM7uysIlsOATht50FdrGrKFzhAitO4XhqNWe1vmUY9Qc43cJFRN CTFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=fIbfpvYYsmftqR3B0vZrmo3cvgJQk7GGQ0rtJ4oZ56E=; b=67XQJiSFFZC7BIP722jbPbGfWZPMTuwRXSHw7Ib6MuAK4kPRHkvauIjCnUmA4iTPmc ji9cw5zaYa6ucXIYVCHqw3vRSJLSr5+zZR+sbF1wH9KZUz9yb/YosjNhvnltciJia1Dv +Qzv3QEPk5p7L4+I6xfGjvLkRApVnME7LiMQC46XbEqw8BXUxr8tWKhxatiAxnVGiUp5 kxHztMocuY9RoIxlcAQDWkDxIpL7kYTyDiA7JEtNQPF6CQ3DWwzlJALz9Q+wUSGCjSo0 V2I4QLEK9nvfeJ77aAs+WQvw99jZlBjhPDgJmdW+FkU5KWKDNmpb/+eubmPv7bQ05q42 SGwg== X-Gm-Message-State: AOAM533g3wTNJTZtWrOhYbE3ENxplOILO3m/tMVdOuBAjBu3uSbonXjb zjaQre1ExkMUTepMQFajCxuOgBy+XmouGH+mj7o= X-Google-Smtp-Source: ABdhPJzUmDFmNcGs/KAK5uPY87sqh1R9r70xJ47pBSU24lFig4GKDt7okJYYjc027ajC6EGLdtMnCDcy6MWvG84WL/U= X-Received: by 2002:a17:902:edc3:b0:13c:957d:63fa with SMTP id q3-20020a170902edc300b0013c957d63famr11346349plk.79.1633122913671; Fri, 01 Oct 2021 14:15:13 -0700 (PDT) In-Reply-To: <831r54einq.fsf@gnu.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" Xref: news.gmane.io gmane.emacs.bugs:216087 Archived-At: --00000000000024dd4405cd510fe7 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Ok, no problem. I'm afraid I'm the original author though. Frankly, what a pityful request... Jo=C3=A3o On Fri, Oct 1, 2021, 18:53 Eli Zaretskii wrote: > > Date: Fri, 1 Oct 2021 17:10:57 +0000 > > From: Alan Mackenzie > > > > In emacs -Q in the emacs-28 branch, create the following two line file, > > foobar.el, and try to load it: > > > > ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; > > (defvar foo-baz "foobar-baz") > > FOOBARELISP-SHORTHANDS: (("foo" . "foobar"))) > > ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; > > > > This will throw an error, but that isn't important. > > > > What is important is that the symbol foobar-baz is created by the > > elisp-shorthands facility. > > > > This shouldn't happen since: > > 1/- There is no Local Variables section. > > 2/- There is no variable elisp-shorthands in that non-existent section. > > > > The following errors are evident in hack-elisp-shorthands: > > 1/- The code doesn't check for a correctly formatted Local Variables > > section. > > 2/- The code, even if it did check, would only check the last 3000 byte= s > > in the file. The section can occur anywhere in the last 3000 > > CHARACTERS. > > 3/- The code doesn't do a case-sensitive search for "elisp-shorthands". > > 4/- The code doesn't check for "elisp-shorthands" being a complete > > symbol. > > 5/- The code doesn't even check that "elisp-shorthands" is in a comment= . > > Thanks. > > Jo=C3=A3o, could you please look into this? > --00000000000024dd4405cd510fe7 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Ok, no problem.=C2=A0

I'm afraid I'm the original author though. Frankly, what = a pityful request...

Jo=C3=A3o=

On Fri, Oct 1, 2021, 18:53 Eli Zaretskii <eliz@gnu.org> wrote:
> Date: Fri, 1 Oct 2021 17:10:57 +0000
> From: Alan Mackenzie <acm@muc.de>
>
> In emacs -Q in the emacs-28 branch, create the following two line file= ,
> foobar.el, and try to load it:
>
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> (defvar foo-baz "foobar-baz")
> FOOBARELISP-SHORTHANDS: (("foo" . "foobar")))
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
>
> This will throw an error, but that isn't important.
>
> What is important is that the symbol foobar-baz is created by the
> elisp-shorthands facility.
>
> This shouldn't happen since:
> 1/- There is no Local Variables section.
> 2/- There is no variable elisp-shorthands in that non-existent section= .
>
> The following errors are evident in hack-elisp-shorthands:
> 1/- The code doesn't check for a correctly formatted Local Variabl= es
>=C2=A0 =C2=A0section.
> 2/- The code, even if it did check, would only check the last 3000 byt= es
>=C2=A0 =C2=A0in the file.=C2=A0 The section can occur anywhere in the l= ast 3000
>=C2=A0 =C2=A0CHARACTERS.
> 3/- The code doesn't do a case-sensitive search for "elisp-sh= orthands".
> 4/- The code doesn't check for "elisp-shorthands" being = a complete
>=C2=A0 =C2=A0symbol.
> 5/- The code doesn't even check that "elisp-shorthands" = is in a comment.

Thanks.

Jo=C3=A3o, could you please look into this?
--00000000000024dd4405cd510fe7--