]> git.eshelyaron.com Git - emacs.git/commit
Fix DCC GET flag parsing in erc-dcc
authorDaniel Pettersson <daniel@dpettersson.net>
Sat, 25 Mar 2023 15:25:48 +0000 (16:25 +0100)
committerF. Jason Park <jp@neverwas.me>
Sat, 8 Apr 2023 21:23:50 +0000 (14:23 -0700)
commitcf83f9a0821d1eaf5b1688b1e8a991dd01d05ed6
treee6672cc49ff54ccae9ea06216f4cc465304efdc8
parent2d3ae5d5e68a21e51105168b1d9503f28e9e98c3
Fix DCC GET flag parsing in erc-dcc

* lisp/erc/erc-dcc.el (erc-cmd-DCC): Tokenize raw input line but also
accommodate legacy invocation.
(pcomplete/erc-mode/DCC): Quote file names when suggesting.  Account
for double-hyphen "end-of-options"-like separator.
(erc-dcc-do-GET-command): Simplify signature, subsuming NICK in
variadic args, now ARGS instead of FILE, which changes the arity
from (2 . many) to (1 . many).  Explain usage in doc string.  Honor an
optional separator, "--", if present.  (Bug#62444.)
* test/lisp/erc/erc-dcc-tests.el (erc-dcc-do-GET-command): Call new
parameterized helper with various flag/file combinations.
(erc-dcc-tests--erc-dcc-do-GET-command): New fixture function.
(pcomplete/erc-mode/DCC--get-quoted,
pcomplete/erc-mode/DCC--get-sep): New tests.
lisp/erc/erc-dcc.el
test/lisp/erc/erc-dcc-tests.el