emacs/lisp/erc
F. Jason Park cca7956c82 Favor ISUPPORT params for MODE processing in ERC
* etc/ERC-NEWS: Mention shift toward CHANMODES ISUPPORT parameter for
dictating MODE parsing behavior.
* lisp/erc/erc-backend.el (erc--init-channel-modes, erc--update-modes,
erc-set-modes, erc-update-modes): Forward declarations, the last two
being removals.
(erc-server-MODE, erc-server-221): Use `erc--update-modes' instead of
`erc-update-modes'.
(erc-server-324): Use `erc--init-channel-modes' instead of
`erc-set-modes'.
* lisp/erc/erc-common.el (erc--channel-mode-types): New struct for
stashing processed \"CHANMODES\" data for the current server.
* lisp/erc/erc.el (erc-channel-modes): Fix doc string.
(erc-set-initial-user-mode): Display a local notice when requesting
redundant user MODE operations.
(erc-set-modes, erc-parse-modes, erc-update-modes): Deprecate for
reasons explained in associated ERC-NEWS entry.
(erc--update-membership-prefix): New function, a helper for specifying
arguments to the rather unruly `erc-update-current-channel-member'.
(erc--channel-modes): New variable to record channel-mode state in a
hash table.
(erc--channel-mode-types): New variable and getter to stash
and retrieve server-local instance of the struct of the same name.
(erc--process-channel-modes): New function to parse channel-mode
changes, dispatch handlers for unary modes, and update the local
variables `erc-channel-modes' and `erc--channel-modes'.
(erc--user-modes): New local variable for remembering user modes per
server.  New function of the same name, a "getter" for the variable.
(erc--parse-user-modes): New function to parse user modes only.
(erc--update-user-modes): New function to update and sort
`erc--user-modes'.
(erc--update-channel-modes): New function to replace much of
`erc-update-modes', currently a thin wrapper around
`erc--process-channel-modes' to ensure it updates status prefixes.
(erc--update-modes): New function to call appropriate mode-updating
function for the current buffer.
(erc--init-channel-modes): New function to update channel mode letters
without status prefixes.
(erc--handle-channel-mode): New generic function, a placeholder for an
eventual API to handle specific "unary" mode letters, meaning those
that specify a single parameter for setting or unsetting.
(erc-update-channel-limit): Update doc string and answer question
posed by ancient comment.
(erc-message-english-user-mode-redundant-add,
erc-message-english-user-mode-redundant-drop): New English catalog
messages.
* test/lisp/erc/erc-scenarios-base-chan-modes.el: New file.
* test/lisp/erc/erc-tests.el (erc-parse-modes,
erc--update-channel-modes, erc--update-user-modes, erc--user-modes,
erc--parse-user-modes): New tests.
* test/lisp/erc/resources/base/modes/chan-changed.eld: New test data
file.  (Bug#67220)
2023-11-18 12:34:56 -08:00
..
ChangeLog.1 ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
ChangeLog.2 ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
erc-autoaway.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
erc-backend.el Favor ISUPPORT params for MODE processing in ERC 2023-11-18 12:34:56 -08:00
erc-button.el ; Prepare for ERC 5.6 release 2023-11-12 20:37:49 -08:00
erc-capab.el Don't associate ERC modules with undefined groups 2023-04-08 14:23:51 -07:00
erc-common.el Favor ISUPPORT params for MODE processing in ERC 2023-11-18 12:34:56 -08:00
erc-compat.el Prefer ticks/hz pairs for some ERC timestamps on 29+ 2023-10-02 17:31:28 -07:00
erc-dcc.el Fix command-line parsing regression in erc-cmd-DCC 2023-07-13 18:45:31 -07:00
erc-desktop-notifications.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
erc-ezbounce.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
erc-fill.el ; Prepare for ERC 5.6 release 2023-11-12 20:37:49 -08:00
erc-goodies.el ; Prepare for ERC 5.6 release 2023-11-12 20:37:49 -08:00
erc-ibuffer.el Fix wrong "User" column count in erc-ibuffer 2023-10-02 17:23:29 -07:00
erc-identd.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
erc-imenu.el Define missing groups for ERC modules 2023-06-11 20:53:48 -07:00
erc-join.el Allow custom display-buffer actions in ERC 2023-07-13 18:45:31 -07:00
erc-lang.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
erc-list.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
erc-log.el Rename erc-server-buffer-p 2023-10-20 15:22:56 -07:00
erc-match.el Revive erc-command-indicator as new module 2023-11-12 20:37:49 -08:00
erc-menu.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
erc-netsplit.el ; Silence byte compiler in erc-netsplit-JOIN 2023-05-21 18:59:33 -07:00
erc-networks.el ; Prepare for ERC 5.6 release 2023-11-12 20:37:49 -08:00
erc-nicks.el ; Prepare for ERC 5.6 release 2023-11-12 20:37:49 -08:00
erc-notify.el Rename erc-server-buffer-p 2023-10-20 15:22:56 -07:00
erc-page.el Don't require erc-goodies in erc.el 2023-04-08 14:23:51 -07:00
erc-pcomplete.el Leverage loaddefs for migrating ERC modules 2023-04-08 14:23:50 -07:00
erc-replace.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
erc-ring.el Preprocess prompt input linewise in ERC 2023-05-05 17:18:01 -07:00
erc-sasl.el Add helper for restoring local session vars in ERC 2023-05-13 07:05:22 -07:00
erc-services.el Redo erc-nickname-in-use-functions as a local module 2023-07-01 07:21:30 -07:00
erc-sound.el Define missing groups for ERC modules 2023-06-11 20:53:48 -07:00
erc-speedbar.el ; Prepare for ERC 5.6 release 2023-11-12 20:37:49 -08:00
erc-spelling.el Define missing groups for ERC modules 2023-06-11 20:53:48 -07:00
erc-stamp.el ; Prepare for ERC 5.6 release 2023-11-12 20:37:49 -08:00
erc-status-sidebar.el ; Prepare for ERC 5.6 release 2023-11-12 20:37:49 -08:00
erc-track.el Ignore date stamps completely in erc-track 2023-10-27 13:08:44 -07:00
erc-truncate.el Manage some text props for ERC insertion-hook members 2023-10-13 07:47:01 -07:00
erc-xdcc.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
erc.el Favor ISUPPORT params for MODE processing in ERC 2023-11-18 12:34:56 -08:00