mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-16 09:14:18 +00:00
; 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.
This commit is contained in:
parent
8d5983aa78
commit
56706254a8
4 changed files with 24 additions and 18 deletions
|
|
@ -1230,25 +1230,30 @@ machine Example.Net login aph-bot password sesame
|
||||||
|
|
||||||
(defun my-erc-up (network)
|
(defun my-erc-up (network)
|
||||||
(interactive "Snetwork: ")
|
(interactive "Snetwork: ")
|
||||||
|
(require 'erc-sasl)
|
||||||
(pcase network
|
(or (let ((erc-modules (cons 'sasl erc-modules)))
|
||||||
('libera
|
(pcase network
|
||||||
(let ((erc-sasl-mechanism 'external))
|
('libera
|
||||||
(erc-tls :server "irc.libera.chat" :port 6697
|
(let ((erc-sasl-mechanism 'external))
|
||||||
:client-certificate t)))
|
(erc-tls :server "irc.libera.chat"
|
||||||
('example
|
:client-certificate t)))
|
||||||
(let ((erc-sasl-auth-source-function
|
('example
|
||||||
#'erc-sasl-auth-source-password-as-host))
|
(let ((erc-sasl-auth-source-function
|
||||||
(erc-tls :server "irc.example.net" :port 6697
|
#'erc-sasl-auth-source-password-as-host))
|
||||||
:user "alyssa"
|
(erc-tls :server "irc.example.net"
|
||||||
:password "Example.Net")))))
|
:user "alyssa"
|
||||||
|
:password "Example.Net")))))
|
||||||
|
;; Non-SASL
|
||||||
|
(call-interactively #'erc-tls)))
|
||||||
@end lisp
|
@end lisp
|
||||||
|
|
||||||
You've started storing your credentials with auth-source and have
|
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:
|
decided to try SASL on another network as well. But there's a catch:
|
||||||
this network doesn't support @samp{EXTERNAL}. You use
|
this network doesn't support @samp{EXTERNAL}. You use
|
||||||
@code{let}-binding to get around this and successfully authenticate to
|
@code{let}-binding to work around this and successfully authenticate
|
||||||
both networks.
|
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
|
@end itemize
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -694,8 +694,6 @@ by toggling a provided compatibility switch. See source code around
|
||||||
the function 'erc-send-action' for details.
|
the function 'erc-send-action' for details.
|
||||||
|
|
||||||
*** Miscellaneous changes
|
*** Miscellaneous changes
|
||||||
Two helper macros from GNU ELPA's Compat library are now available to
|
|
||||||
third-party modules as 'erc-compat-call' and 'erc-compat-function'.
|
|
||||||
In 'erc-button-alist', 'Info-goto-node' has been supplanted by plain
|
In 'erc-button-alist', 'Info-goto-node' has been supplanted by plain
|
||||||
old 'info', and the "<URL:...>" entry has been removed because it was
|
old 'info', and the "<URL:...>" entry has been removed because it was
|
||||||
more or less redundant. In all ERC buffers, the "<TAB>" key is now
|
more or less redundant. In all ERC buffers, the "<TAB>" key is now
|
||||||
|
|
|
||||||
|
|
@ -1479,10 +1479,12 @@ for decoding."
|
||||||
(let ((args (erc-response.command-args parsed-response))
|
(let ((args (erc-response.command-args parsed-response))
|
||||||
(decode-target nil)
|
(decode-target nil)
|
||||||
(decoded-args ()))
|
(decoded-args ()))
|
||||||
|
;; FIXME this should stop after the first match.
|
||||||
(dolist (arg args nil)
|
(dolist (arg args nil)
|
||||||
(when (string-match "^[#&].*" arg)
|
(when (string-match "^[#&].*" arg)
|
||||||
(setq decode-target arg)))
|
(setq decode-target arg)))
|
||||||
(when (stringp decode-target)
|
(when (stringp decode-target)
|
||||||
|
;; FIXME `decode-target' should be passed as TARGET.
|
||||||
(setq decode-target (erc-decode-string-from-target decode-target nil)))
|
(setq decode-target (erc-decode-string-from-target decode-target nil)))
|
||||||
(setf (erc-response.unparsed parsed-response)
|
(setf (erc-response.unparsed parsed-response)
|
||||||
(erc-decode-string-from-target
|
(erc-decode-string-from-target
|
||||||
|
|
|
||||||
|
|
@ -2772,8 +2772,9 @@ PORT, NICK, and PASSWORD, along with USER and FULL-NAME when
|
||||||
given a prefix argument. Non-interactively, expect the rarely
|
given a prefix argument. Non-interactively, expect the rarely
|
||||||
needed ID parameter, when non-nil, to be a symbol or a string for
|
needed ID parameter, when non-nil, to be a symbol or a string for
|
||||||
naming the server buffer and identifying the connection
|
naming the server buffer and identifying the connection
|
||||||
unequivocally. (See Info node `(erc) Connecting' for details
|
unequivocally. Once connected, return the server buffer. (See
|
||||||
about all mentioned parameters.)
|
Info node `(erc) Connecting' for details about all mentioned
|
||||||
|
parameters.)
|
||||||
|
|
||||||
Together with `erc-tls', this command serves as the main entry
|
Together with `erc-tls', this command serves as the main entry
|
||||||
point for ERC, the powerful, modular, and extensible IRC client.
|
point for ERC, the powerful, modular, and extensible IRC client.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue