all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Philipp Stephani <p.stephani2@gmail.com>
To: Noam Postavsky <npostavs@gmail.com>
Cc: Lars Ingebrigtsen <larsi@gnus.org>, 31676@debbugs.gnu.org
Subject: bug#31676: 27.0.50; More helpful error message for unescaped character literals
Date: Fri, 19 Apr 2019 18:33:47 +0200	[thread overview]
Message-ID: <CAArVCkQHLdhBjHo0o3fbY-kxOo3P92WYR7f-Vgbb_-bg7B3ZHw@mail.gmail.com> (raw)
In-Reply-To: <CAArVCkQ49fVcw9DD7a5+mRHPixS+=oGExwihB_tQLYi8hoaBbw@mail.gmail.com>

Am Fr., 19. Apr. 2019 um 17:53 Uhr schrieb Philipp Stephani
<p.stephani2@gmail.com>:
>
> Am Fr., 19. Apr. 2019 um 13:43 Uhr schrieb Noam Postavsky <npostavs@gmail.com>:
> >
> > Philipp Stephani <p.stephani2@gmail.com> 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.





  reply	other threads:[~2019-04-19 16:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-01 10:18 bug#31676: 27.0.50; More helpful error message for unescaped character literals Lars Ingebrigtsen
2018-06-02 10:00 ` Philipp Stephani
2018-06-08 14:51   ` Eli Zaretskii
2018-06-09 17:12     ` Philipp Stephani
2018-06-09 17:31       ` Eli Zaretskii
2019-04-19  9:54         ` Philipp Stephani
2019-04-19 11:43           ` Noam Postavsky
2019-04-19 15:53             ` Philipp Stephani
2019-04-19 16:33               ` Philipp Stephani [this message]
2019-04-19 17:22       ` Philipp Stephani

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAArVCkQHLdhBjHo0o3fbY-kxOo3P92WYR7f-Vgbb_-bg7B3ZHw@mail.gmail.com \
    --to=p.stephani2@gmail.com \
    --cc=31676@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    --cc=npostavs@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.