Index: commands.c
===================================================================
--- commands.c	(revision 697221fc51f0060043c93821f0358317f6bc6ab0)
+++ commands.c	(revision 3b8a563ae4e07b1064fe005714793565ac720dc4)
@@ -281,6 +281,6 @@
   OWLCMD_ARGS("punt", owl_command_punt, OWL_CTX_ANY,
 	      "suppress an arbitrary filter",
-	      "punt <filter-name>\n"
-	      "punt <filter-text (multiple words)>",
+	      "punt <filter-text>",
+	      "punt <filter-text (multiple words)>\n"
 	      "The punt command will suppress messages to the specified\n"
 	      "filter\n\n"
@@ -289,10 +289,10 @@
   OWLCMD_ARGS("unpunt", owl_command_unpunt, OWL_CTX_ANY,
 	      "remove an entry from the punt list",
-	      "unpunt <number>\n"
-	      "unpunt <filter-name>\n"
-	      "unpunt <filter-text (multiple words)>",
+	      "unpunt <filter-text>\n"
+	      "unpunt <filter-text>\n"
+	      "unpunt <number>\n",
 	      "The unpunt command will remove an entry from the puntlist.\n"
-	      "The last two forms correspond to the two forms of the :punt\n"
-	      "command. The first allows you to remove a specific entry from\n"
+	      "The first two forms correspond to the first two forms of the :punt\n"
+	      "command. The latter allows you to remove a specific entry from the\n"
 	      "the list (see :show zpunts)\n\n"
 	      "SEE ALSO:  punt, zpunt, zunpunt, show zpunts\n"),
@@ -2464,4 +2464,5 @@
   owl_list * fl;
   owl_filter * f;
+  char * text;
   int i;
 
@@ -2479,12 +2480,12 @@
         return;
       } else {
-        owl_function_makemsg("No such filter number: %d.", i+1);
+        owl_function_error("No such filter number: %d", i+1);
       }
     }
-    const char *filter[] = {"filter", argv[1]};
-    owl_function_punt(2, filter, unpunt);
+    text = owl_string_build_quoted("filter %q", argv[1]);
+    owl_function_punt(text, unpunt);
+    g_free(text);
   } else {
-    /* Pass in argv[1]..argv[argc-1]. */
-    owl_function_punt(argc - 1, argv + 1, unpunt);
+    owl_function_punt(skiptokens(buff, 1), unpunt);
   }
 }
Index: functions.c
===================================================================
--- functions.c	(revision 697221fc51f0060043c93821f0358317f6bc6ab0)
+++ functions.c	(revision 47128d939b8cf3c9833095b626efc1efcee0744f)
@@ -2781,30 +2781,24 @@
 void owl_function_zpunt(const char *class, const char *inst, const char *recip, int direction)
 {
-  GPtrArray *argv;
+  GString *buf;
   char *quoted;
 
-  argv = g_ptr_array_new();
+  buf = g_string_new("");
   if (!strcmp(class, "*")) {
-    g_ptr_array_add(argv, g_strdup("class"));
-    g_ptr_array_add(argv, g_strdup(".*"));
+    g_string_append(buf, "class .*");
   } else {
     quoted=owl_text_quote(class, OWL_REGEX_QUOTECHARS, OWL_REGEX_QUOTEWITH);
-    g_ptr_array_add(argv, g_strdup("class"));
-    g_ptr_array_add(argv, g_strdup_printf("^(un)*%s(\\.d)*$", quoted));
+    owl_string_appendf_quoted(buf, "class ^(un)*%q(\\.d)*$", quoted);
     g_free(quoted);
   }
   if (!strcmp(inst, "*")) {
-    g_ptr_array_add(argv, g_strdup("and"));
-    g_ptr_array_add(argv, g_strdup("instance"));
-    g_ptr_array_add(argv, g_strdup(".*"));
+    g_string_append(buf, " and instance .*");
   } else {
     quoted=owl_text_quote(inst, OWL_REGEX_QUOTECHARS, OWL_REGEX_QUOTEWITH);
-    g_ptr_array_add(argv, g_strdup("and"));
-    g_ptr_array_add(argv, g_strdup("instance"));
-    g_ptr_array_add(argv, g_strdup_printf("^(un)*%s(\\.d)*$", quoted));
+    owl_string_appendf_quoted(buf, " and instance ^(un)*%q(\\.d)*$", quoted);
     g_free(quoted);
   }
   if (!strcmp(recip, "*")) {
-    /* nothing */
+    /* g_string_append(buf, ""); */
   } else {
     if(!strcmp(recip, "%me%")) {
@@ -2812,16 +2806,13 @@
     }
     quoted=owl_text_quote(recip, OWL_REGEX_QUOTECHARS, OWL_REGEX_QUOTEWITH);
-    g_ptr_array_add(argv, g_strdup("and"));
-    g_ptr_array_add(argv, g_strdup("recipient"));
-    g_ptr_array_add(argv, g_strdup_printf("^%s$", quoted));
+    owl_string_appendf_quoted(buf, " and recipient ^%q$", quoted);
     g_free(quoted);
   }
 
-  owl_function_punt(argv->len, (const char *const*) argv->pdata, direction);
-  g_ptr_array_foreach(argv, (GFunc)g_free, NULL);
-  g_ptr_array_free(argv, true);
-}
-
-void owl_function_punt(int argc, const char *const *argv, int direction)
+  owl_function_punt(buf->str, direction);
+  g_string_free(buf, true);
+}
+
+void owl_function_punt(const char *filter, int direction)
 {
   owl_filter *f;
@@ -2831,5 +2822,6 @@
 
   /* first, create the filter */
-  f = owl_filter_new("punt-filter", argc, argv);
+  owl_function_debugmsg("About to filter %s", filter);
+  f = owl_filter_new_fromstring("punt-filter", filter);
   if (f == NULL) {
     owl_function_error("Error creating filter for zpunt");
@@ -2858,11 +2850,9 @@
   }
 
-  if (direction == 0) {
-    owl_function_debugmsg("punting");
-    /* If we're punting, add the filter to the global punt list */
+  owl_function_debugmsg("punting");
+  /* If we're punting, add the filter to the global punt list */
+  if (direction==0) {
     owl_list_append_element(fl, f);
-  } else if (direction == 1) {
-    owl_function_makemsg("No matching punt filter");
- }
+  }
 }
 
