unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Robert Pluim <rpluim@gmail.com>
To: "Braun Gábor" <braungb88@gmail.com>
Cc: 34686@debbugs.gnu.org
Subject: bug#34686: 26.1; unload-feature doesn't remove functions locally from hooks
Date: Thu, 28 Feb 2019 20:38:11 +0100	[thread overview]
Message-ID: <m2sgw71z6k.fsf@gmail.com> (raw)
In-Reply-To: <1551386357.RvjfsdQ5jE@gabor> ("Braun \=\?utf-8\?Q\?G\=C3\=A1bor\=22\?\= \=\?utf-8\?Q\?'s\?\= message of "Thu, 28 Feb 2019 20:31:20 +0100")


(please donʼt drop the bug address from the CC)

Braun Gábor <braungb88@gmail.com> writes:

> Hi,
>
>> > Standard unloading activities include restoring old autoloads for
>> > functions defined by the library, undoing any additions that the
>> > library has made to hook variables or to ‘auto-mode-alist’[...]
>
> Obviously, this part of the docstring of unload-feature contradicts
> the info manual.
>  
>> In "(elisp) Unloading" it says:
>> 
>>      Before restoring the previous definitions, ‘unload-feature’ runs
>>      ‘remove-hook’ to remove functions in the library from certain
>>      hooks.  These hooks include variables whose names end in ‘-hook’
>>      (or the deprecated suffix ‘-hooks’), plus those listed in
>>      ‘unload-feature-special-hooks’, as well as ‘auto-mode-alist’.  This
>>      is to prevent Emacs from ceasing to function because important
>>      hooks refer to functions that are no longer defined.
>> 
>> and a quick look at the code confirms that it at least *tries* to do
>> that.
>
> And as far as I understand the code, it does remove functions from the 
> global value of the hooks, but not from the buffer-local values.
>
> IMHO, the stated reason in the info manual (keep Emacs functioning) 
> justifies removing functions from the hooks (both their global and local 
> values) which become undefined.

Yes, Iʼd tend to agree. Would you have a patch to offer?

Thanks

Robert





  parent reply	other threads:[~2019-02-28 19:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-23 21:16 bug#34686: 26.1; unload-feature doesn't remove functions locally from hooks Braun Gábor
2019-02-28 18:03 ` Eli Zaretskii
2019-02-28 19:03   ` Robert Pluim
     [not found]     ` <1551386357.RvjfsdQ5jE@gabor>
2019-02-28 19:38       ` Robert Pluim [this message]
2019-02-28 20:08         ` Braun Gábor

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=m2sgw71z6k.fsf@gmail.com \
    --to=rpluim@gmail.com \
    --cc=34686@debbugs.gnu.org \
    --cc=braungb88@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 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).