From: markus schnalke Date: Wed, 5 Oct 2011 10:25:09 +0000 (+0200) Subject: Reworked LINK, now named `altmsglink', similar to BACKUP_PREFIX. X-Git-Tag: mmh-thesis-end~500 X-Git-Url: http://git.marmaro.de/?p=mmh;a=commitdiff_plain;h=e87123959d15f3b190494dffdd8bce335c137874;hp=104b36e0a37bafe6620062334fa78d484dce321c Reworked LINK, now named `altmsglink', similar to BACKUP_PREFIX. --- diff --git a/acconfig.h b/acconfig.h index 2547602..8162798 100644 --- a/acconfig.h +++ b/acconfig.h @@ -84,11 +84,6 @@ #define BUILTIN_FTP 1 /* - * Name of link to file to which you are replying. - */ -#define LINK "@" - -/* * Define to 1 if your vi has ATT bug, such that it returns * non-zero exit codes on `pseudo-errors'. */ diff --git a/config/config.c b/config/config.c index cc3bb00..9b64e29 100644 --- a/config/config.c +++ b/config/config.c @@ -352,6 +352,12 @@ char *backup_prefix = ","; char *defaulteditor = "vi"; +/* + * Name of link to file to which you are replying or which you are + * redistributing. See `$mhaltmsg' in the mh-profile(5) man page. + */ +char *altmsglink = "@"; + /* * This is the global nmh alias file. It is somewhat obsolete, since * global aliases should be handled by the Mail Transport Agent (MTA). diff --git a/h/mh.h b/h/mh.h index 31b5f4d..25bb475 100644 --- a/h/mh.h +++ b/h/mh.h @@ -299,6 +299,7 @@ extern struct node *m_defs; /* list of profile/context entries */ */ extern char *buildmimeproc; extern char *backup_prefix; +extern char *altmsglink; extern char *catproc; extern char *components; extern char *context; diff --git a/man/mh-profile.man b/man/mh-profile.man index b7e24ca..635fc32 100644 --- a/man/mh-profile.man +++ b/man/mh-profile.man @@ -162,6 +162,14 @@ are "removed" by rmm. This should typically be `,' or `#'. (profile, default: `,') .RE .PP +.BR AltMsg-Link : +@ +.RS 5 +Name of the link to the file to which you are replying or which you are +redistributing. See `$mhaltmsg' below. +(profile, default: `@') +.RE +.PP .BR automimeproc : .RS 5 If defined and set to 1, then the @@ -764,11 +772,12 @@ This is set by .B dist and .B repl -during edit sessions so you can -peruse the message being distributed or replied to. The message is also -available through a link called \*(lq@\*(rq in the current directory if -your current working directory and the folder the message lives in are -on the same UNIX filesystem. +during edit sessions so you can peruse the message being distributed or +replied to. The message is also available through a link called +\*(lq@\*(rq (if not changed by +.BR altmsg-link ) +in the current directory if your current working directory +and the message's folder are on the same UNIX filesystem. .RE .PP .B $mhdraft diff --git a/sbr/folder_read.c b/sbr/folder_read.c index d59e731..f642ed3 100644 --- a/sbr/folder_read.c +++ b/sbr/folder_read.c @@ -109,8 +109,8 @@ folder_read (char *name) if (!strncmp (dp->d_name, backup_prefix, prefix_len)) continue; - /* skip the LINK file */ - if (!strcmp (dp->d_name, LINK)) + /* skip the altmsg link file */ + if (!strcmp (dp->d_name, altmsglink)) continue; /* indicate that there are other files in folder */ diff --git a/sbr/readconfig.c b/sbr/readconfig.c index 30585a2..6eca286 100644 --- a/sbr/readconfig.c +++ b/sbr/readconfig.c @@ -20,6 +20,7 @@ static struct procstr procs[] = { { "context", &context }, { "mh-sequences", &mh_seq }, { "backup-prefix", &backup_prefix }, + { "altmsg-link", &altmsglink }, { "buildmimeproc", &buildmimeproc }, { "faceproc", &faceproc }, { "fileproc", &fileproc }, diff --git a/uip/mhparam.c b/uip/mhparam.c index 80b52a1..137a635 100644 --- a/uip/mhparam.c +++ b/uip/mhparam.c @@ -15,8 +15,6 @@ extern char *mhlibdir; extern char *mhetcdir; -char *slink = LINK; - static struct swit switches[] = { #define COMPSW 0 { "components", 0 }, @@ -69,7 +67,7 @@ static struct proc procs [] = { { "etcdir", &mhetcdir }, { "libdir", &mhlibdir }, { "backup-prefix", &backup_prefix }, - { "link", &slink }, + { "altmsg-link", &altmsglink }, { NULL, NULL }, }; diff --git a/uip/rmf.c b/uip/rmf.c index 878f22a..12473f8 100644 --- a/uip/rmf.c +++ b/uip/rmf.c @@ -181,7 +181,7 @@ rmf (char *folder) default: if (m_atoi (dp->d_name)) break; - if (strcmp (dp->d_name, LINK) == 0 + if (strcmp (dp->d_name, altmsglink) == 0 || strncmp (dp->d_name, backup_prefix, j) == 0) break; diff --git a/uip/whatnowsbr.c b/uip/whatnowsbr.c index 4a29a64..f5f78d7 100644 --- a/uip/whatnowsbr.c +++ b/uip/whatnowsbr.c @@ -246,7 +246,7 @@ WhatNow (int argc, char **argv) snprintf (prompt, sizeof(prompt), myprompt, invo_name); for (;;) { if (!(argp = getans (prompt, aleqs))) { - unlink (LINK); + unlink (altmsglink); done (1); } switch (smatch (*argp, aleqs)) { @@ -667,9 +667,9 @@ editfile (char **ed, char **arg, char *file, int use, struct msgs *mp, else snprintf (altpath, sizeof(altpath), "%s/%s", mp->foldpath, altmsg); if (cwd == NULL) - strncpy (linkpath, LINK, sizeof(linkpath)); + strncpy (linkpath, altmsglink, sizeof(linkpath)); else - snprintf (linkpath, sizeof(linkpath), "%s/%s", cwd, LINK); + snprintf (linkpath, sizeof(linkpath), "%s/%s", cwd, altmsglink); } if (altmsg) {