🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.bug
Article #98996

hack-local-variable

#98996
From: macrakis
Date: Wed, 19 Dec 1990 04:29
20 lines
1557 bytes
GNU Emacs 18.53.11 on NeXT 1.0.1

There is an extremely minor bug in hack-local-variable, namely that it
accepts any `suffix' which is a prefix of the real suffix.  That is,
if the local-variables line is "*** Local Variables: ***", it will not
only accept "*** mode: text ***" but also "*** mode: text *** !!!".

This wouldn't be worth mentioning except that I was looking at the
code, which goes to great lengths to special-case the null prefix and
suffix cases, and in the process screws up on this (admittedly very
minor) point.  This complicates and lengthens the code, and probably
doesn't save much time.  If the null-regexp case of looking-at or
cons'ing up a fresh null string are too expensive (and I doubt that
they are), then this should be optimized within the C code, and not by
user functions.

I think it would be cleaner simply to let suffix include the closing
newline.  Instant correctness, simpler code.

	-s
Technical Details
Message-ID: <9012181532.AA06378@dupuis.gr.osf.org>
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!tut.cis.ohio-state.edu!gr.osf.org!macrakis

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fb2f1,b202dcb1f180a1f4,start
X-Google-Attributes: gidfb2f1,public
X-Google-ArrivalTime: 1990-12-18 20:29:01 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!tut.cis.ohio-state.edu!gr.osf.org!macrakis
From: macrakis@gr.osf.org
Newsgroups: gnu.emacs.bug
Subject: hack-local-variable
Message-ID: <9012181532.AA06378@dupuis.gr.osf.org>
Date: 19 Dec 90 04:29:01 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 20
Approved: bug-gnu-emacs@prep.ai.mit.edu
X-Unparsable-Date: Tue, 18 Dec 90 16:36:24 GMT+0100