From mboxrd@z Thu Jan 1 00:00:00 1970
Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail
From: Philipp Stephani
Newsgroups: gmane.emacs.bugs
Subject: bug#31676: 27.0.50;
More helpful error message for unescaped character literals
Date: Fri, 19 Apr 2019 18:33:47 +0200
Message-ID:
References:
<837en9uyaq.fsf@gnu.org>
<83k1r7sw7m.fsf@gnu.org>
<87tveuusng.fsf@gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226";
logging-data="150941"; mail-complaints-to="usenet@blaine.gmane.org"
Cc: Lars Ingebrigtsen , 31676@debbugs.gnu.org
To: Noam Postavsky
Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Apr 19 18:35:14 2019
Return-path:
Envelope-to: geb-bug-gnu-emacs@m.gmane.org
Original-Received: from lists.gnu.org ([209.51.188.17])
by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256)
(Exim 4.89)
(envelope-from )
id 1hHWTp-000d7k-Qo
for geb-bug-gnu-emacs@m.gmane.org; Fri, 19 Apr 2019 18:35:13 +0200
Original-Received: from localhost ([127.0.0.1]:58790 helo=lists.gnu.org)
by lists.gnu.org with esmtp (Exim 4.71)
(envelope-from )
id 1hHWTo-0002hD-OP
for geb-bug-gnu-emacs@m.gmane.org; Fri, 19 Apr 2019 12:35:12 -0400
Original-Received: from eggs.gnu.org ([209.51.188.92]:54671)
by lists.gnu.org with esmtp (Exim 4.71)
(envelope-from ) id 1hHWTg-0002gi-14
for bug-gnu-emacs@gnu.org; Fri, 19 Apr 2019 12:35:04 -0400
Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
(envelope-from ) id 1hHWTf-0006u9-2w
for bug-gnu-emacs@gnu.org; Fri, 19 Apr 2019 12:35:03 -0400
Original-Received: from debbugs.gnu.org ([209.51.188.43]:59234)
by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
(Exim 4.71) (envelope-from )
id 1hHWTe-0006tl-VO
for bug-gnu-emacs@gnu.org; Fri, 19 Apr 2019 12:35:03 -0400
Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2)
(envelope-from ) id 1hHWTd-0006Ta-M5
for bug-gnu-emacs@gnu.org; Fri, 19 Apr 2019 12:35:02 -0400
X-Loop: help-debbugs@gnu.org
Resent-From: Philipp Stephani
Original-Sender: "Debbugs-submit"
Resent-CC: bug-gnu-emacs@gnu.org
Resent-Date: Fri, 19 Apr 2019 16:35:01 +0000
Resent-Message-ID:
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: followup 31676
X-GNU-PR-Package: emacs
Original-Received: via spool by 31676-submit@debbugs.gnu.org id=B31676.155569164724816
(code B ref 31676); Fri, 19 Apr 2019 16:35:01 +0000
Original-Received: (at 31676) by debbugs.gnu.org; 19 Apr 2019 16:34:07 +0000
Original-Received: from localhost ([127.0.0.1]:44545 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from )
id 1hHWSk-0006SC-Mt
for submit@debbugs.gnu.org; Fri, 19 Apr 2019 12:34:06 -0400
Original-Received: from mail-ot1-f41.google.com ([209.85.210.41]:34918)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from ) id 1hHWSi-0006Rh-Un
for 31676@debbugs.gnu.org; Fri, 19 Apr 2019 12:34:05 -0400
Original-Received: by mail-ot1-f41.google.com with SMTP id m10so4766897otp.2
for <31676@debbugs.gnu.org>; Fri, 19 Apr 2019 09:34:04 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
h=mime-version:references:in-reply-to:from:date:message-id:subject:to
:cc; bh=vo0G6dA9HEzl1mGZt1E0ewIX5KRzB2Y++vRRBuChww8=;
b=sUB/zDvvSp7XhAxZmIvRH4+UVy2swxOd2G3MWPyMmLfloodugh6OcNB/M6+CbVuw78
2x8Bfl/mxW2xu6rHxT6DW9/mPLEmFX3YTqhFh94HjDto9J8Cw//iO5U4QtZgH7nf4UkI
JSzfrpJs1txrQdvltIdGOo0jslB44RfniaUbXCm4f5P87sOwWbJ8j48guc6e9vnQOxH9
vABsFN7zwMCXFdybROsGX/VTvx10coXHPC9LRSaCsWQaMzJluvawtRKHgABI7N88bgd+
xTuNuFpDc2BQJvDv5bpt0OhnlZZsMOPOg/E6Xn209HQKyKMG9r66gx/fbYTsq3MZS+n3
5mxQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:mime-version:references:in-reply-to:from:date
:message-id:subject:to:cc;
bh=vo0G6dA9HEzl1mGZt1E0ewIX5KRzB2Y++vRRBuChww8=;
b=CDs1Jcz+G+af/n9qykH1FCIhCACwT0NYxgZNOj8pWZr0II2CtjlM5JV3ZCBvjtuN82
6yPfLVIgWN4AS9ZjHabfbHQ2KLjs4UT8/fbgrs64tBpU0CaPeSN+FLJDsNytJN3P+wpK
PZ8vdcl7QBMhRO6S82EHe8YPCFSL16J+QS6Cgr+xq8vOjEdy+CU49vlQjkloLwFGYAfh
xKOA54QlsbTnmIwuz9XDTIPArnm4SOfua1BoR7BjINAvuUuohvQBcSDo+IvOgKfFcdmr
55pvw2ZSCcRFFIfRU9kczod4PerdorfIFGumxFeEa8ocX/eEDLdkXRF+IKOk5Jrc1rGd
XTTA==
X-Gm-Message-State: APjAAAUoUJIzP4tFC9bcJWVD3rnWxCGL7j10uFLhtY6TAsr4zCF0Qe8J
y1qVWUKxCeUDPZLB2aJHhCxTtPVddj2PSvq/0D8=
X-Google-Smtp-Source: APXvYqzo39gyoNWgjJMkwQQlAIVhxJrwf5bgn9wKzL74iMAQ8ZJcnbiDdG+F/oq1DWnORK4yazu+8fvI0RncAjdQqso=
X-Received: by 2002:a9d:7616:: with SMTP id k22mr2628374otl.51.1555691638912;
Fri, 19 Apr 2019 09:33:58 -0700 (PDT)
In-Reply-To:
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 209.51.188.43
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.org@gnu.org
Original-Sender: "bug-gnu-emacs"
Xref: news.gmane.org gmane.emacs.bugs:157851
Archived-At:
Am Fr., 19. Apr. 2019 um 17:53 Uhr schrieb Philipp Stephani
:
>
> Am Fr., 19. Apr. 2019 um 13:43 Uhr schrieb Noam Postavsky :
> >
> > Philipp Stephani writes:
> >
> > >> > The function uses an uninterned variable, so it has to be in C. I think that's slightly better than interning the
> > >> > variable and having some Lisp function access it (the latter would have one additional internal symbol).
> >
> > >> Why does it need an uninterned variable?
> > >
> > > It doesn't need to be uninterned, but it's cleaner that way because no
> > > other code can access the variable.
> > >
> > >> And if it does, why cannot
> > >> it create a symbol that is not in obarray?
> > >
> > > That's what the patch does.
> >
> > The patch uninterns a symbol after it's interned in the obarray. I
> > think the question is, why put the symbol in the obarray in the first
> > place? Just a C static variable would do (although this would require
> > an additional (trivial) C function, to use with record_unwind_protect
> > instead of specbind). See for example Vloads_in_progress.
> >
>
> Ah, I see. There's no specific reason for this specific
> implementation, it's just the simplest one.
> Since we have a few cases where we need uninterned variables/functions
> (I see 6 existing calls to unintern in the C source code), how about
> extending DEFVAR/defsubr to allow uninterned symbols? That would make
> the implementation of these cases more obvious.
Thinking about this a bit more, I think the overhead of your approach
for most uninterned symbols (a static variable + staticpro) is small
enough to not warrant further complex DEF* macros, so I'll switch the
existing uses to that.