patch 8.0.1649: no completion for argument list commands

Problem:    No completion for argument list commands.
Solution:   Add arglist completion. (Yegappan Lakshmanan, closes #2706)
diff --git a/src/ex_cmds2.c b/src/ex_cmds2.c
index ae4ce33..d4ddb82 100644
--- a/src/ex_cmds2.c
+++ b/src/ex_cmds2.c
@@ -3314,6 +3314,21 @@
 
 #endif /* FEAT_LISTCMDS */
 
+#if defined(FEAT_CMDL_COMPL) || defined(PROTO)
+/*
+ * Function given to ExpandGeneric() to obtain the possible arguments of the
+ * argedit and argdelete commands.
+ */
+    char_u *
+get_arglist_name(expand_T *xp UNUSED, int idx)
+{
+    if (idx >= ARGCOUNT)
+	return NULL;
+
+    return alist_name(&ARGLIST[idx]);
+}
+#endif
+
 #ifdef FEAT_EVAL
 /*
  * ":compiler[!] {name}"
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index 97bbd04..c2d6967 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -4293,6 +4293,13 @@
 	    break;
 #endif
 
+	case CMD_argdelete:
+	    while ((xp->xp_pattern = vim_strchr(arg, ' ')) != NULL)
+		arg = xp->xp_pattern + 1;
+	    xp->xp_context = EXPAND_ARGLIST;
+	    xp->xp_pattern = arg;
+	    break;
+
 #endif /* FEAT_CMDL_COMPL */
 
 	default:
@@ -5879,6 +5886,7 @@
     char    *name;
 } command_complete[] =
 {
+    {EXPAND_ARGLIST, "arglist"},
     {EXPAND_AUGROUP, "augroup"},
     {EXPAND_BEHAVE, "behave"},
     {EXPAND_BUFFERS, "buffer"},
diff --git a/src/ex_getln.c b/src/ex_getln.c
index 6119ad2..48cccf1 100644
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -4989,6 +4989,7 @@
 #endif
 	    {EXPAND_ENV_VARS, get_env_name, TRUE, TRUE},
 	    {EXPAND_USER, get_users, TRUE, FALSE},
+	    {EXPAND_ARGLIST, get_arglist_name, TRUE, FALSE},
 	};
 	int	i;
 
diff --git a/src/proto/ex_cmds2.pro b/src/proto/ex_cmds2.pro
index 63d377d..a7d19d7 100644
--- a/src/proto/ex_cmds2.pro
+++ b/src/proto/ex_cmds2.pro
@@ -67,6 +67,7 @@
 void ex_argadd(exarg_T *eap);
 void ex_argdelete(exarg_T *eap);
 void ex_listdo(exarg_T *eap);
+char_u *get_arglist_name(expand_T *xp, int idx);
 void ex_compiler(exarg_T *eap);
 void ex_runtime(exarg_T *eap);
 int do_in_path(char_u *path, char_u *name, int flags, void (*callback)(char_u *fname, void *ck), void *cookie);
diff --git a/src/testdir/test_cmdline.vim b/src/testdir/test_cmdline.vim
index 832413e..8755fbf 100644
--- a/src/testdir/test_cmdline.vim
+++ b/src/testdir/test_cmdline.vim
@@ -137,6 +137,11 @@
   let l = getcompletion('v:notexists', 'var')
   call assert_equal([], l)
 
+  args a.c b.c
+  let l = getcompletion('', 'arglist')
+  call assert_equal(['a.c', 'b.c'], l)
+  %argdelete
+
   let l = getcompletion('', 'augroup')
   call assert_true(index(l, 'END') >= 0)
   let l = getcompletion('blahblah', 'augroup')
diff --git a/src/version.c b/src/version.c
index 00a07bc..1e27712 100644
--- a/src/version.c
+++ b/src/version.c
@@ -767,6 +767,8 @@
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    1649,
+/**/
     1648,
 /**/
     1647,
diff --git a/src/vim.h b/src/vim.h
index 42007ed..626c0ad 100644
--- a/src/vim.h
+++ b/src/vim.h
@@ -781,6 +781,7 @@
 #define EXPAND_PACKADD		45
 #define EXPAND_MESSAGES		46
 #define EXPAND_MAPCLEAR		47
+#define EXPAND_ARGLIST		48
 
 /* Values for exmode_active (0 is no exmode) */
 #define EXMODE_NORMAL		1