aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorF. Jason Park2024-02-21 20:08:37 -0800
committerF. Jason Park2024-02-23 18:29:07 -0800
commit56706254a8ee09e651097fb5075cae75b3bd4e22 (patch)
tree47055b05c90a3d9874047303d4d6ad8d414110e0
parent8d5983aa78e36afa815325e7bce85a81d314e67b (diff)
downloademacs-56706254a8ee09e651097fb5075cae75b3bd4e22.tar.gz
emacs-56706254a8ee09e651097fb5075cae75b3bd4e22.zip
; 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.
-rw-r--r--doc/misc/erc.texi33
-rw-r--r--etc/ERC-NEWS2
-rw-r--r--lisp/erc/erc-backend.el2
-rw-r--r--lisp/erc/erc.el5
4 files changed, 24 insertions, 18 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
1230 1230
1231(defun my-erc-up (network) 1231(defun my-erc-up (network)
1232 (interactive "Snetwork: ") 1232 (interactive "Snetwork: ")
1233 1233 (require 'erc-sasl)
1234 (pcase network 1234 (or (let ((erc-modules (cons 'sasl erc-modules)))
1235 ('libera 1235 (pcase network
1236 (let ((erc-sasl-mechanism 'external)) 1236 ('libera
1237 (erc-tls :server "irc.libera.chat" :port 6697 1237 (let ((erc-sasl-mechanism 'external))
1238 :client-certificate t))) 1238 (erc-tls :server "irc.libera.chat"
1239 ('example 1239 :client-certificate t)))
1240 (let ((erc-sasl-auth-source-function 1240 ('example
1241 #'erc-sasl-auth-source-password-as-host)) 1241 (let ((erc-sasl-auth-source-function
1242 (erc-tls :server "irc.example.net" :port 6697 1242 #'erc-sasl-auth-source-password-as-host))
1243 :user "alyssa" 1243 (erc-tls :server "irc.example.net"
1244 :password "Example.Net"))))) 1244 :user "alyssa"
1245 :password "Example.Net")))))
1246 ;; Non-SASL
1247 (call-interactively #'erc-tls)))
1245@end lisp 1248@end lisp
1246 1249
1247You've started storing your credentials with auth-source and have 1250You've started storing your credentials with auth-source and have
1248decided to try SASL on another network as well. But there's a catch: 1251decided to try SASL on another network as well. But there's a catch:
1249this network doesn't support @samp{EXTERNAL}. You use 1252this network doesn't support @samp{EXTERNAL}. You use
1250@code{let}-binding to get around this and successfully authenticate to 1253@code{let}-binding to work around this and successfully authenticate
1251both networks. 1254to both networks. (Note that this example assumes you've removed
1255@code{sasl} from @code{erc-modules} globally and have instead opted to
1256add it locally when connecting to preconfigured networks.)
1252 1257
1253@end itemize 1258@end itemize
1254 1259
diff --git a/etc/ERC-NEWS b/etc/ERC-NEWS
index b2aceaa9f39..e8082582de3 100644
--- a/etc/ERC-NEWS
+++ b/etc/ERC-NEWS
@@ -694,8 +694,6 @@ by toggling a provided compatibility switch. See source code around
694the function 'erc-send-action' for details. 694the function 'erc-send-action' for details.
695 695
696*** Miscellaneous changes 696*** Miscellaneous changes
697Two helper macros from GNU ELPA's Compat library are now available to
698third-party modules as 'erc-compat-call' and 'erc-compat-function'.
699In 'erc-button-alist', 'Info-goto-node' has been supplanted by plain 697In 'erc-button-alist', 'Info-goto-node' has been supplanted by plain
700old 'info', and the "<URL:...>" entry has been removed because it was 698old 'info', and the "<URL:...>" entry has been removed because it was
701more or less redundant. In all ERC buffers, the "<TAB>" key is now 699more or less redundant. In all ERC buffers, the "<TAB>" key is now
diff --git a/lisp/erc/erc-backend.el b/lisp/erc/erc-backend.el
index 7b782d0ef44..9fc8a4d29f4 100644
--- a/lisp/erc/erc-backend.el
+++ b/lisp/erc/erc-backend.el
@@ -1479,10 +1479,12 @@ for decoding."
1479 (let ((args (erc-response.command-args parsed-response)) 1479 (let ((args (erc-response.command-args parsed-response))
1480 (decode-target nil) 1480 (decode-target nil)
1481 (decoded-args ())) 1481 (decoded-args ()))
1482 ;; FIXME this should stop after the first match.
1482 (dolist (arg args nil) 1483 (dolist (arg args nil)
1483 (when (string-match "^[#&].*" arg) 1484 (when (string-match "^[#&].*" arg)
1484 (setq decode-target arg))) 1485 (setq decode-target arg)))
1485 (when (stringp decode-target) 1486 (when (stringp decode-target)
1487 ;; FIXME `decode-target' should be passed as TARGET.
1486 (setq decode-target (erc-decode-string-from-target decode-target nil))) 1488 (setq decode-target (erc-decode-string-from-target decode-target nil)))
1487 (setf (erc-response.unparsed parsed-response) 1489 (setf (erc-response.unparsed parsed-response)
1488 (erc-decode-string-from-target 1490 (erc-decode-string-from-target
diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el
index f250584e47a..5c8b3785bc6 100644
--- a/lisp/erc/erc.el
+++ b/lisp/erc/erc.el
@@ -2772,8 +2772,9 @@ PORT, NICK, and PASSWORD, along with USER and FULL-NAME when
2772given a prefix argument. Non-interactively, expect the rarely 2772given a prefix argument. Non-interactively, expect the rarely
2773needed ID parameter, when non-nil, to be a symbol or a string for 2773needed ID parameter, when non-nil, to be a symbol or a string for
2774naming the server buffer and identifying the connection 2774naming the server buffer and identifying the connection
2775unequivocally. (See Info node `(erc) Connecting' for details 2775unequivocally. Once connected, return the server buffer. (See
2776about all mentioned parameters.) 2776Info node `(erc) Connecting' for details about all mentioned
2777parameters.)
2777 2778
2778Together with `erc-tls', this command serves as the main entry 2779Together with `erc-tls', this command serves as the main entry
2779point for ERC, the powerful, modular, and extensible IRC client. 2780point for ERC, the powerful, modular, and extensible IRC client.