diff options
| author | F. Jason Park | 2024-02-21 20:08:37 -0800 |
|---|---|---|
| committer | F. Jason Park | 2024-02-23 18:29:07 -0800 |
| commit | 56706254a8ee09e651097fb5075cae75b3bd4e22 (patch) | |
| tree | 47055b05c90a3d9874047303d4d6ad8d414110e0 | |
| parent | 8d5983aa78e36afa815325e7bce85a81d314e67b (diff) | |
| download | emacs-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.texi | 33 | ||||
| -rw-r--r-- | etc/ERC-NEWS | 2 | ||||
| -rw-r--r-- | lisp/erc/erc-backend.el | 2 | ||||
| -rw-r--r-- | lisp/erc/erc.el | 5 |
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 | ||
| 1247 | You've started storing your credentials with auth-source and have | 1250 | You've started storing your credentials with auth-source and have |
| 1248 | decided to try SASL on another network as well. But there's a catch: | 1251 | decided to try SASL on another network as well. But there's a catch: |
| 1249 | this network doesn't support @samp{EXTERNAL}. You use | 1252 | this 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 |
| 1251 | both networks. | 1254 | to both networks. (Note that this example assumes you've removed |
| 1255 | @code{sasl} from @code{erc-modules} globally and have instead opted to | ||
| 1256 | add 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 | |||
| 694 | the function 'erc-send-action' for details. | 694 | the function 'erc-send-action' for details. |
| 695 | 695 | ||
| 696 | *** Miscellaneous changes | 696 | *** Miscellaneous changes |
| 697 | Two helper macros from GNU ELPA's Compat library are now available to | ||
| 698 | third-party modules as 'erc-compat-call' and 'erc-compat-function'. | ||
| 699 | In 'erc-button-alist', 'Info-goto-node' has been supplanted by plain | 697 | In 'erc-button-alist', 'Info-goto-node' has been supplanted by plain |
| 700 | old 'info', and the "<URL:...>" entry has been removed because it was | 698 | old 'info', and the "<URL:...>" entry has been removed because it was |
| 701 | more or less redundant. In all ERC buffers, the "<TAB>" key is now | 699 | more 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 | |||
| 2772 | given a prefix argument. Non-interactively, expect the rarely | 2772 | given a prefix argument. Non-interactively, expect the rarely |
| 2773 | needed ID parameter, when non-nil, to be a symbol or a string for | 2773 | needed ID parameter, when non-nil, to be a symbol or a string for |
| 2774 | naming the server buffer and identifying the connection | 2774 | naming the server buffer and identifying the connection |
| 2775 | unequivocally. (See Info node `(erc) Connecting' for details | 2775 | unequivocally. Once connected, return the server buffer. (See |
| 2776 | about all mentioned parameters.) | 2776 | Info node `(erc) Connecting' for details about all mentioned |
| 2777 | parameters.) | ||
| 2777 | 2778 | ||
| 2778 | Together with `erc-tls', this command serves as the main entry | 2779 | Together with `erc-tls', this command serves as the main entry |
| 2779 | point for ERC, the powerful, modular, and extensible IRC client. | 2780 | point for ERC, the powerful, modular, and extensible IRC client. |