1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-06 06:20:55 -08:00
emacs/lisp/erc
F. Jason Park 4c4936fab2
Support local ERC modules in erc-mode buffers
* doc/misc/erc.texi: Mention local modules in Modules chapter.

* etc/ERC-NEWS: Mention changes to `erc-update-modules'.

* lisp/erc/erc.el (erc-migrate-modules): Add some missing mappings.
(erc-modules): When a user removes a module, disable it and kill its
local variable in all ERC buffers.
(erc-update-modules): Move body of `erc-update-modules' to new
internal function.
(erc--update-modules): Add new function, a renamed and slightly
modified version of `erc-update-modules'.  Specifically, change return
value from nil to a list of minor-mode commands for local modules.
Use `custom-variable-p' to detect flavor.
(erc--merge-local-modes): Add helper for finding local modules
already active as minor modes in an ERC buffer.
(erc-open): Replace `erc-update-modules' with `erc--update-modules'.
Defer enabling of local modules via `erc--update-modules' until after
buffer is initialized with other local vars.  Also defer major-mode
hooks so they can detect things like whether the buffer is a server or
target buffer.  Also ensure local module setup code can detect when
`erc-open' was called with a non-nil `erc--server-reconnecting'.

* lisp/erc/erc-common.el (erc--module-name-migrations,
erc--features-to-modules, erc--modules-to-features): Add alists of
old-to-new module names to support module-name migrations.
(erc--assemble-toggle): Add new helper for constructing mode toggles,
like `erc-sasl-enable'.
(define-erc-modules): Defer to `erc--assemble-toggle' to create toggle
commands.
(erc--normalize-module-symbol): Add helper for `erc-migrate-modules'.

* lisp/erc/erc-goodies.el: Require cl-lib.

* test/lisp/erc/erc-tests.el (erc-migrate-modules,
erc--update-modules): Add rudimentary unit tests asserting correct
module-name mappings.
(erc--merge-local-modes): Add test for helper.
(define-erc-module--global, define-erc-module--local): Add tests
asserting module-creation macro.  (Bug#57955.)
2022-11-23 19:56:31 -05:00
..
ChangeLog.1 ; Fix typos 2022-11-20 12:59:39 +01:00
ChangeLog.2
erc-autoaway.el
erc-backend.el Make erc--server-reconnecting non-buffer-local 2022-11-23 19:55:39 -05:00
erc-button.el Remove redundant let-bindings of inhibit-point-motion-hooks 2022-10-07 12:16:47 -04:00
erc-capab.el ; Fix several symbol name typos 2022-10-26 23:04:23 +02:00
erc-common.el Support local ERC modules in erc-mode buffers 2022-11-23 19:56:31 -05:00
erc-compat.el Improve new connections in erc-handle-irc-url 2022-11-16 21:34:36 -08:00
erc-dcc.el Offer completions for GET subcommand flags in erc-dcc 2022-11-04 19:32:23 -07:00
erc-desktop-notifications.el
erc-ezbounce.el
erc-fill.el
erc-goodies.el Support local ERC modules in erc-mode buffers 2022-11-23 19:56:31 -05:00
erc-ibuffer.el
erc-identd.el
erc-imenu.el
erc-join.el
erc-lang.el
erc-list.el
erc-log.el Revert "Decrease use of the word "Emacsen" in docs" 2022-10-01 22:34:47 +02:00
erc-match.el Offer to regexp-quote new items in erc-match commands 2022-09-19 17:54:46 -07:00
erc-menu.el
erc-netsplit.el
erc-networks.el Don't set erc-networks--id until network is known 2022-11-23 19:54:40 -05:00
erc-notify.el
erc-page.el
erc-pcomplete.el Improve auto-reconnect visibility in ERC 2022-11-16 21:34:36 -08:00
erc-replace.el
erc-ring.el
erc-services.el
erc-sound.el
erc-speedbar.el Make point-at-eol and point-at-bol obsolete 2022-08-23 04:54:57 +02:00
erc-spelling.el
erc-stamp.el Make point-at-eol and point-at-bol obsolete 2022-08-23 04:54:57 +02:00
erc-status-sidebar.el
erc-track.el
erc-truncate.el
erc-xdcc.el
erc.el Support local ERC modules in erc-mode buffers 2022-11-23 19:56:31 -05:00