]> diplodocus.org Git - nmh/commitdiff
Added -[no]changecur switches to mhfixmsg(1).
authorDavid Levine <levinedl@acm.org>
Thu, 20 Nov 2014 02:13:01 +0000 (20:13 -0600)
committerDavid Levine <levinedl@acm.org>
Thu, 20 Nov 2014 02:13:01 +0000 (20:13 -0600)
docs/pending-release-notes
man/mhfixmsg.man
uip/mhfixmsg.c

index 58895578d6e704e8c509e1612313dd970dbb522b..cf247dee713717e72ebb87ccb0b7d1790593f1a2 100644 (file)
@@ -25,6 +25,7 @@ NEW FEATURES
 - When building from source, configure will derive ${prefix} from an existing
   nmh installation if it finds one in your $PATH.
 - Added getmymbox and getmyaddr mh-format(5) function escapes.
+- The -changecur and -nochangecur switches have been added to mhfixmsg(1).
 
 -----------------
 OBSOLETE FEATURES
index 81d069bab20112d05d009abbc972d2b441ab2d6d..de5cc611e041d4736d63347a34fffbb47f34f221 100644 (file)
@@ -1,4 +1,4 @@
-.TH MHFIXMSG %manext1% "August 20, 2014" "%nmhversion%"
+.TH MHFIXMSG %manext1% "November 19, 2014" "%nmhversion%"
 .\"
 .\" %nmhwarning%
 .\"
@@ -28,6 +28,7 @@ mhfixmsg \- rewrite MIME messages with various transformations
 .RB [ \-rmmproc
 .IR program ]
 .RB [ \-normmproc ]
+.RB [ \-changecur " | " \-nochangecur ]
 .RB [ \-verbose " | " \-noverbose ]
 .RB [ \-version ]
 .RB [ \-help ]
@@ -346,12 +347,15 @@ is checked.
 .RB ` \-noreplacetextplain '
 .RB ` \-fixboundary '
 .RB ` \-fixcte '
+.RB ` \-changecur '
 .RB ` \-noverbose '
 .fi
 .SH CONTEXT
 If a folder is given, it will become the current folder.  The last
-message selected from a folder will become the current message.  If
+message selected from a folder will become the current message, unless
 the
+.B \-nochangecur
+switch is enabled.  If the
 .B \-file
 switch or an absolute pathname is used, the context will not be
 modified.
index 66b2eacab4e752a18bedadae81095a5cba777773..ffe97acdb7e6b4d421dfa71983c61d2c4d8ae4f7 100644 (file)
@@ -30,6 +30,8 @@
     X("outfile file", 0, OUTFILESW) \
     X("rmmproc program", 0, RPROCSW) \
     X("normmproc", 0, NRPRCSW) \
+    X("changecur", 0, CHGSW) \
+    X("nochangecur", 0, NCHGSW) \
     X("verbose", 0, VERBSW) \
     X("noverbose", 0, NVERBSW) \
     X("version", 0, VERSIONSW) \
@@ -114,6 +116,7 @@ main (int argc, char **argv) {
     CT *ctp;
     FILE *fp;
     int using_stdin = 0;
+    int chgflag = 1;
     int status = OK;
     fix_transformations fx;
     fx.reformat = fx.fixcte = fx.fixboundary = 1;
@@ -212,6 +215,12 @@ main (int argc, char **argv) {
             case NRPRCSW:
                 rmmproc = NULL;
                 continue;
+           case CHGSW:
+               chgflag = 1;
+               continue;
+           case NCHGSW:
+               chgflag = 0;
+               continue;
             case VERBSW:
                 verbosw = 1;
                 continue;
@@ -335,7 +344,9 @@ main (int argc, char **argv) {
             }
         }
 
-        seq_setcur (mp, mp->hghsel);      /* update current message */
+        if (chgflag) {
+            seq_setcur (mp, mp->hghsel);  /* update current message */
+        }
         seq_save (mp);                    /* synchronize sequences  */
         context_replace (pfolder, folder);/* update current folder  */
         context_save ();                  /* save the context file  */