[Top][All Lists]

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

Re: bug#57955: 29.0.50; Allow session-local ERC modules

From: J.P.
Subject: Re: bug#57955: 29.0.50; Allow session-local ERC modules
Date: Sun, 08 Oct 2023 21:02:02 -0700
User-agent: Gnus/5.13 (Gnus v5.13)

It turns out these changes removed some behavior involving the loading
of modules that's long been part of ERC's implicit interface. Basically,
when encountering a third-party module `mymod', ERC has always attempted
to `require' the (possibly nonexistent) feature `erc-mymod', and to do
so unconditionally. However, this bug changed that policy to instead
only attempt such loading if the corresponding command `erc-mymod-mode'
is undefined. That was likely unwise because some packages do
questionable things like

  (eval-after-load 'erc
    '(define-erc-module mymod nil "Doc" () ()))

which fails to provide the vital `symbol-file' association between the
minor-mode command and the library (because the command itself isn't
autoloaded). Such uses ignore the decades-old example in the doc string
of `define-erc-module', which clearly recommends

  ;;;###autoload(autoload 'erc-mymode-mode "erc-mymode")
  (define-erc-module mymod nil "Doc" () ())

as the surefire approach. That said, in cases where the library's name
matches the (prefixed) module name, no autoload cookie is necessary.
Unfortunately, many of these packages are in maintenance mode, with
authors unwilling to respond to suggestions to update such aberrant
uses. Thus, I think it's in ERC's best interest to accommodate them as
it always has. Please see the second patch below. Thanks.

Attachment: 0001-5.6-Honor-nil-values-in-erc-restore-initialize-prior.patch
Description: Text Data

Attachment: 0002-5.6-Sort-and-dedupe-when-loading-modules-in-erc-open.patch
Description: Text Data

reply via email to

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