diff options
author | F. Jason Park <jp@neverwas.me> | 2024-02-21 20:08:37 -0800 |
---|---|---|
committer | F. Jason Park <jp@neverwas.me> | 2024-02-23 18:29:07 -0800 |
commit | 56706254a8ee09e651097fb5075cae75b3bd4e22 (patch) | |
tree | 47055b05c90a3d9874047303d4d6ad8d414110e0 /doc/misc | |
parent | 8d5983aa78e36afa815325e7bce85a81d314e67b (diff) | |
download | emacs-56706254a8ee09e651097fb5075cae75b3bd4e22.tar.gz |
; Don't mention erc-branded Compat macros in ERC-NEWS
* doc/misc/erc.texi: Change fancy SASL example to also demonstrate
`let'-binding a local module.
* etc/ERC-NEWS: Don't mention `erc-compat-call' and
`erc-compat-function' because Emacs now ships with a compat.el stub
library.
* lisp/erc/erc-backend.el (erc-decode-parsed-server-response): Add
comments.
* lisp/erc/erc.el (erc): Mention return value.
Diffstat (limited to 'doc/misc')
-rw-r--r-- | doc/misc/erc.texi | 33 |
1 files changed, 19 insertions, 14 deletions
diff --git a/doc/misc/erc.texi b/doc/misc/erc.texi index f877fb681fe..c7ab7e7bf21 100644 --- a/doc/misc/erc.texi +++ b/doc/misc/erc.texi @@ -1230,25 +1230,30 @@ machine Example.Net login aph-bot password sesame (defun my-erc-up (network) (interactive "Snetwork: ") - - (pcase network - ('libera - (let ((erc-sasl-mechanism 'external)) - (erc-tls :server "irc.libera.chat" :port 6697 - :client-certificate t))) - ('example - (let ((erc-sasl-auth-source-function - #'erc-sasl-auth-source-password-as-host)) - (erc-tls :server "irc.example.net" :port 6697 - :user "alyssa" - :password "Example.Net"))))) + (require 'erc-sasl) + (or (let ((erc-modules (cons 'sasl erc-modules))) + (pcase network + ('libera + (let ((erc-sasl-mechanism 'external)) + (erc-tls :server "irc.libera.chat" + :client-certificate t))) + ('example + (let ((erc-sasl-auth-source-function + #'erc-sasl-auth-source-password-as-host)) + (erc-tls :server "irc.example.net" + :user "alyssa" + :password "Example.Net"))))) + ;; Non-SASL + (call-interactively #'erc-tls))) @end lisp You've started storing your credentials with auth-source and have decided to try SASL on another network as well. But there's a catch: this network doesn't support @samp{EXTERNAL}. You use -@code{let}-binding to get around this and successfully authenticate to -both networks. +@code{let}-binding to work around this and successfully authenticate +to both networks. (Note that this example assumes you've removed +@code{sasl} from @code{erc-modules} globally and have instead opted to +add it locally when connecting to preconfigured networks.) @end itemize |