From: Art Cancro Date: Fri, 17 Oct 2003 02:18:40 +0000 (+0000) Subject: * Replaced the DEFAULT_ENTRY definition in sysconfig.h with a new option X-Git-Tag: v7.86~5749 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=e629d4d03e7e7ed323807139675c6ec4493ce019 * Replaced the DEFAULT_ENTRY definition in sysconfig.h with a new option "reply_with_external_editor" in citadel.rc. --- diff --git a/citadel/ChangeLog b/citadel/ChangeLog index a946acb7c..d2a08b44c 100644 --- a/citadel/ChangeLog +++ b/citadel/ChangeLog @@ -1,4 +1,8 @@ $Log$ + Revision 610.22 2003/10/17 02:18:40 ajc + * Replaced the DEFAULT_ENTRY definition in sysconfig.h with a new option + "reply_with_external_editor" in citadel.rc. + Revision 610.21 2003/10/14 03:09:47 ajc * routines2.c: fixed an off-by-one error in filename sanitization for client file uploads @@ -5048,4 +5052,3 @@ Sat Jul 11 00:20:48 EDT 1998 Nathan Bryant Fri Jul 10 1998 Art Cancro * Initial CVS import - diff --git a/citadel/citadel.rc b/citadel/citadel.rc index 510c97fe3..f768b2970 100644 --- a/citadel/citadel.rc +++ b/citadel/citadel.rc @@ -162,6 +162,13 @@ remember_passwords=0 alternate_semantics=no +# When the user hits the eply key after reading a message, reply_with_editor +# selects whether it uses the built-in editor (select 'no') or an external +# editor (select 'yes'). +# +reply_with_external_editor=no + + # COMMAND SET CONFIGURATION # # All lines starting with "cmd=" are considered to be commands. This allows diff --git a/citadel/citadel_decls.h b/citadel/citadel_decls.h index 4c56ba65c..ee3a658cd 100644 --- a/citadel/citadel_decls.h +++ b/citadel/citadel_decls.h @@ -23,6 +23,7 @@ extern char rc_screen; extern char arg_screen; #endif extern char rc_alt_semantics; +extern char rc_reply_extedit; extern char express_msgs; void logoff(CtdlIPC *ipc, int code); void formout(CtdlIPC *ipc, char *name); diff --git a/citadel/commands.c b/citadel/commands.c index 55ac00454..a057577f7 100644 --- a/citadel/commands.c +++ b/citadel/commands.c @@ -747,6 +747,7 @@ void load_command_set(void) rc_force_mail_prompts = 0; rc_ansi_color = 0; rc_color_use_bg = 0; + rc_reply_extedit = 0; strcpy(rc_url_cmd, ""); strcpy(rc_gotmail_cmd, ""); #ifdef HAVE_OPENSSL @@ -893,6 +894,14 @@ void load_command_set(void) rc_alt_semantics = 0; } } + if (!strncasecmp(buf, "reply_with_external_editor=", 27)) { + if (!strncasecmp(&buf[27], "yes", 3)) { + rc_reply_extedit = 1; + } + else { + rc_reply_extedit = 0; + } + } if (!strncasecmp(buf, "cmd=", 4)) { strcpy(buf, &buf[4]); diff --git a/citadel/messages.c b/citadel/messages.c index 50ca0ccb5..24b051464 100644 --- a/citadel/messages.c +++ b/citadel/messages.c @@ -65,6 +65,7 @@ unsigned long *msg_arr = NULL; int msg_arr_size = 0; int num_msgs; char rc_alt_semantics; +char rc_reply_extedit; extern char room_name[]; extern unsigned room_flags; extern long highest_msg_read; @@ -1619,7 +1620,7 @@ RMSGREAD: scr_flush(); goto RMSGREAD; case 'r': savedpos = num_msgs; - entmsg(ipc, 1, (DEFAULT_ENTRY == 46 ? 2 : 0)); + entmsg(ipc, 1, (rc_reply_extedit ? 2 : 0)); num_msgs = savedpos; goto RMSGREAD; case 'u': diff --git a/citadel/sysconfig.h b/citadel/sysconfig.h index 9f683c68b..39ea373fe 100644 --- a/citadel/sysconfig.h +++ b/citadel/sysconfig.h @@ -35,20 +35,6 @@ */ #define S_KEEPALIVE 30 -/* - * This is the command that gets executed when a user hits nter message: - * presses the nter message key. The possible values are: - * 4 - .nter essage - * 46 - .nter message with ditor - * 36 - .nter message with scii - * Normally, this value will be set to 4, to cause the nter message - * command to run Citadel's built-in editor. However, if you have an external - * editor installed, and you want to make it the default, set this to 46 - * to make it use your editor by default. - */ -#define DEFAULT_ENTRY 4 - - /* * Logging level to use if none is specified on the command line. */