mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-23 21:37:34 +00:00
Fix edge case with single argument for rcirc-define-command
* rcirc.el (rcirc-define-command): Update regular expression generator
This commit is contained in:
parent
7e5360f322
commit
b5d935bb7f
1 changed files with 5 additions and 5 deletions
|
|
@ -2403,12 +2403,12 @@ that, an interactive form can specified."
|
|||
(insert "\\`")
|
||||
(when arguments
|
||||
(dotimes (_ (1- (length arguments)))
|
||||
(insert "\\(?:\\(.+?\\)"))
|
||||
(insert "\\(?:[[:space:]]+\\(.*\\)\\)")
|
||||
(insert "\\(?:\\(.+?\\)[[:space:]]+"))
|
||||
(dotimes (i (1- (length arguments)))
|
||||
(when (< i optional)
|
||||
(insert "?"))
|
||||
(insert "\\)")))
|
||||
(if (< i optional)
|
||||
(insert "\\)?")
|
||||
(insert "\\)"))))
|
||||
(insert "\\(.*?\\)")
|
||||
(insert "[[:space:]]*\\'")
|
||||
(buffer-string)))
|
||||
(argument (gensym))
|
||||
|
|
|
|||
Loading…
Reference in a new issue