Index: perl/lib/BarnOwl.pm
===================================================================
--- perl/lib/BarnOwl.pm	(revision a130fc5ed65377322966cc9423b3e4674197922c)
+++ perl/lib/BarnOwl.pm	(revision 8ad3964885f1491ed791b5266e62245dadde6948)
@@ -9,4 +9,5 @@
                     zephyr_stylestrip zephyr_smartstrip_user zephyr_getsubs
                     queue_message admin_message
+                    start_edit
                     start_question start_password start_edit_win
                     get_data_dir get_config_dir popless_text popless_ztext
@@ -105,6 +106,5 @@
 Enqueue a message in the BarnOwl message list, logging it and
 processing it appropriately. C<MESSAGE> should be an instance of
-BarnOwl::Message or a subclass.  Returns the queued message.  This
-is useful for, e.g., deleting a message from the message list.
+BarnOwl::Message or a subclass.
 
 =head2 admin_message HEADER BODY
@@ -112,20 +112,74 @@
 Display a BarnOwl B<Admin> message, with the given header and body.
 
+=head2 start_edit %ARGS
+
+Displays a prompt on the screen and lets the user enter text,
+and calls a callback when the editwin is closed.
+
+C<%ARGS> must contain the following keys:
+
+=over 4
+
+=item prompt
+
+The line to display on the screen
+
+=item type
+
+One of:
+
+=over 4
+
+=item edit_win
+
+Displays the prompt on a line of its own and opens the edit_win.
+
+=item question
+
+Displays prompt on the screen and lets the user enter a line of
+text.
+
+=item password
+
+Like question, but echoes the user's input as C<*>s when they
+input.
+
+=back
+
+=item callback
+
+A Perl subroutine that is called when the user closes the edit_win.
+
+=back
+
 =head2 start_question PROMPT CALLBACK
 
-Displays C<PROMPT> on the screen and lets the user enter a line of
-text, and calls C<CALLBACK>, which must be a perl subroutine
-reference, with the text the user entered
-
 =head2 start_password PROMPT CALLBACK
 
-Like C<start_question>, but echoes the user's input as C<*>s when they
-input.
-
 =head2 start_edit_win PROMPT CALLBACK
 
-Like C<start_question>, but displays C<PROMPT> on a line of its own
-and opens the editwin. If the user cancels the edit win, C<CALLBACK>
-is not invoked.
+Equivalent to C<start_edit> called with the appropriate parameters.
+
+=cut
+
+sub start_edit {
+    my %args = (@_);
+    BarnOwl::Internal::start_edit($args{type}, $args{prompt}, $args{callback});
+}
+
+sub start_question {
+    my ($prompt, $callback) = @_;
+    BarnOwl::start_edit(type => 'question', prompt => $prompt, callback => $callback);
+}
+
+sub start_password {
+    my ($prompt, $callback) = @_;
+    BarnOwl::start_edit(type => 'password', prompt => $prompt, callback => $callback);
+}
+
+sub start_edit_win {
+    my ($prompt, $callback) = @_;
+    BarnOwl::start_edit(type => 'edit_win', prompt => $prompt, callback => $callback);
+}
 
 =head2 get_data_dir
Index: perlglue.xs
===================================================================
--- perlglue.xs	(revision 11d55e56c3c8aafdbd8ee7a23e97cd65d815c2e6)
+++ perlglue.xs	(revision 8ad3964885f1491ed791b5266e62245dadde6948)
@@ -167,60 +167,4 @@
 	}
 
-void
-start_question(line, callback)
-	const char *line
-	SV *callback
-	PREINIT:
-		owl_editwin *e;
-	CODE:
-	{
-		if(!SV_IS_CODEREF(callback))
-			croak("Callback must be a subref");
-
-		e = owl_function_start_question(line);
-
-		owl_editwin_set_cbdata(e,
-				       newSVsv(callback),
-				       owl_perlconfig_dec_refcnt);
-		owl_editwin_set_callback(e, owl_perlconfig_edit_callback);
-	}
-
-void
-start_password(line, callback)
-	const char *line
-	SV *callback
-	PREINIT:
-		owl_editwin *e;
-	CODE:
-	{
-		if(!SV_IS_CODEREF(callback))
-			croak("Callback must be a subref");
-
-		e = owl_function_start_password(line);
-
-		owl_editwin_set_cbdata(e,
-				       newSVsv(callback),
-				       owl_perlconfig_dec_refcnt);
-		owl_editwin_set_callback(e, owl_perlconfig_edit_callback);
-	}
-
-void
-start_edit_win(line, callback)
-	const char *line
-	SV *callback
-	PREINIT:
-		owl_editwin *e;
-	CODE:
-	{
-		if(!SV_IS_CODEREF(callback))
-			croak("Callback must be a subref");
-
-		e = owl_function_start_edit_win(line);
-		owl_editwin_set_cbdata(e,
-				       newSVsv(callback),
-				       owl_perlconfig_dec_refcnt);
-		owl_editwin_set_callback(e, &owl_perlconfig_edit_callback);
-	}
-
 
 const char * 
@@ -499,4 +443,29 @@
 				      ival);
 
+void
+start_edit(edit_type, line, callback)
+	const char *edit_type
+	const char *line
+	SV *callback
+	PREINIT:
+		owl_editwin *e;
+	CODE:
+	{
+		if (!SV_IS_CODEREF(callback))
+			croak("Callback must be a subref");
+
+		if (!strcmp(edit_type, "question"))
+			e = owl_function_start_question(line);
+		else if (!strcmp(edit_type, "password"))
+			e = owl_function_start_password(line);
+		else if (!strcmp(edit_type, "edit_win"))
+			e = owl_function_start_edit_win(line);
+		else
+			croak("edit_type must be one of 'password', 'question', 'edit_win', not '%s'", edit_type);
+
+		owl_editwin_set_cbdata(e, newSVsv(callback), owl_perlconfig_dec_refcnt);
+		owl_editwin_set_callback(e, owl_perlconfig_edit_callback);
+	}
+
 MODULE = BarnOwl		PACKAGE = BarnOwl::Editwin
 
