bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#19363: Acknowledgement (24.4.1; Notifications can make ERC unusable)


From: Dima Kogan
Subject: bug#19363: Acknowledgement (24.4.1; Notifications can make ERC unusable)
Date: Sun, 04 Jan 2015 13:26:15 -0800

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> If we have some (eval-after-load 'erc ...) stuff then by the time this
>> (defvar) is evaluated, the list may already have a value, so the defvar
>> then does NOT add its value to the list. The patch explicitly changes
>> the (defvar list default) idiom to
>> (defvar list nil) (add-to-list 'list default) and thus the default value
>> always appears in the list.
>
> But I do wonder: if the function *has* to be on that hook for ERC to
> work correctly, then maybe that function's place is not in the hook but
> right at those places where the hook is run (i.e. hard-coded).
> Could you (or someone who understands the code better than I do) take
> a look to see if such a change would be even better?

Hi. I suspect that hard-coding this would be a very big and unwelcome
change in this case because there's some indirection here. Each ERC
"response handler" has a hook such as this. The (defvar ...)
(add-to-list ...) happens in the macro that defines a response handler:
define-erc-response-handler, and the hooks are invoked in a general way
for all server responses in erc-handle-parsed-server-response.

So the bug I was seeing was due specifically to missing PRIVMSG response
handlers, but the patch fixes all response handlers generically.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]