mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-05 22:20:24 -08:00
Return nil from more ERC response handlers
* etc/ERC-NEWS: Mention that certain aberrant response handlers now return nil. * lisp/erc/erc-backend.el (define-erc-response-handler): Mention that body should explicitly return nil. (erc-server-PART) (erc-server-PING): Return nil. * lisp/erc/erc-sasl.el (erc-sasl--destroy): Return nil. * lisp/erc/erc.el (erc-display-message): Mention in doc string that the return value is undefined. (erc-kill-channel-hook): Fix package-version. * test/lisp/erc/erc-networks-tests.el (erc-networks--set-name): Ensure `erc--route-insertion' returns nil because this influences whether response-handler hooks continue running. * test/lisp/erc/erc-sasl-tests.el (erc-sasl-create-client-ecdsa): Fix regression that made test unusable, although it's still relatively useless and therefore skipped by default. * test/lisp/erc/erc-services-tests.el (erc-services-tests--auth-source-standard) (erc-services-tests--auth-source-announced): Clarify annotations. * test/lisp/erc/erc-tests.el (erc-message): Don't return non-nil in mocked `erc-display-message'. (erc-send-modify-hook): Shadow `erc-send-modify-hook' because `erc-stamp--date-mode' modifies it locally.
This commit is contained in:
parent
1a9128e020
commit
8c54a79ec1
8 changed files with 60 additions and 18 deletions
|
|
@ -3987,7 +3987,9 @@ As of ERC 5.6, assume third-party code will use this function
|
|||
instead of lower-level ones, like `erc-insert-line', to insert
|
||||
arbitrary informative messages as if sent by the server. That
|
||||
is, tell modules to treat a \"local\" message for which PARSED is
|
||||
nil like any other server-sent message."
|
||||
nil like any other server-sent message. Finally, expect users to
|
||||
treat the return value of this function as undefined even though
|
||||
various default response handlers may appear to presume nil."
|
||||
(let* ((erc--msg-props
|
||||
(or erc--msg-props
|
||||
(let ((table (make-hash-table))
|
||||
|
|
@ -9626,7 +9628,7 @@ See also `format-spec'."
|
|||
erc-networks-shrink-ids-and-buffer-names
|
||||
erc-networks-rename-surviving-target-buffer)
|
||||
"Invoked whenever a channel-buffer is killed via `kill-buffer'."
|
||||
:package-version '(ERC . "5.5")
|
||||
:package-version '(ERC . "5.6") ; FIXME sync on release
|
||||
:group 'erc-hooks
|
||||
:type 'hook)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue