unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "João Távora" <joaotavora@gmail.com>
To: Noam Postavsky <npostavs@gmail.com>
Cc: Glenn Morris <rgm@gnu.org>, emacs-devel <emacs-devel@gnu.org>
Subject: Re: master 9ade7ea: Fix Eldoc problem when loading on Emacs 26.3
Date: Fri, 10 Jul 2020 18:54:17 +0100	[thread overview]
Message-ID: <87lfjrdzna.fsf@gmail.com> (raw)
In-Reply-To: <CAM-tV-_dSf=hVfU4Ra5_zAu4x8h-+maHaO8_PpcoYDAqRWnm4A@mail.gmail.com> (Noam Postavsky's message of "Fri, 10 Jul 2020 13:36:04 -0400")

Noam Postavsky <npostavs@gmail.com> writes:

> On Fri, 10 Jul 2020 at 13:10, João Távora <joaotavora@gmail.com> wrote:
>
>> makunbound, as Noam suggested, doesn't work.
>>
>> Is there an easy way to "unlocalize" a symbol?
>
> Oh, maybe kill-local-variable?

No, that doesn't work either.  I was looking at data.c and alloc.c and
apparently the only way is really to unintern and re-intern the symbol.
But of course that seems to break code that you've loaded before and
that expects that symbol in its pre-uninterned state.

I've even tried `garbage-collect` to see if I could trigger the
sym->u.s.redirect = SYMBOL_PLAINVAL from Elisp, but it seems hard.

So I'm a bit lost for options to be honest.  The problem here, seems to
be the fact that eldoc.el is pre-loaded and somehwere in that process
the eldoc-documentation-function variable is localized in some buffer.

Of course, the problem only manifests itself in practice when you're
loading eldoc via package.el in previous Emacs versions, so maybe
there's some way to unintern the symbol at package-initialize time.  But
that probably would break something, too.

Maybe come up with a better idea, or maybe, like Stefan suggests, don't
make it an alias at all, just deprecate it and keep using it instead of
eldoc-documentation-strategy when we find it to be bound.

João



  reply	other threads:[~2020-07-10 17:54 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20200710004934.18557.69586@vcs0.savannah.gnu.org>
     [not found] ` <20200710004936.2935520A27@vcs0.savannah.gnu.org>
2020-07-10 16:09   ` master 9ade7ea: Fix Eldoc problem when loading on Emacs 26.3 Glenn Morris
2020-07-10 17:09     ` João Távora
2020-07-10 17:36       ` Noam Postavsky
2020-07-10 17:54         ` João Távora [this message]
2020-07-10 19:57           ` João Távora
2020-07-10 21:35             ` Stefan Monnier
2020-07-10 21:58               ` João Távora
2020-07-10 22:16                 ` Stefan Monnier
2020-07-10 22:41                   ` João Távora
2020-07-10 23:44                     ` Stefan Monnier
2020-07-11  8:06                       ` João Távora

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=87lfjrdzna.fsf@gmail.com \
    --to=joaotavora@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=npostavs@gmail.com \
    --cc=rgm@gnu.org \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).