diff -ur mutt-1.5.4/PATCHES mutt-1.5.4.ddm/PATCHES --- mutt-1.5.4/PATCHES 2003-03-19 16:33:37.000000000 -0500 +++ mutt-1.5.4.ddm/PATCHES 2003-08-10 12:32:38.000000000 -0400 @@ -0,0 +1 @@ +patch-1.5.4.ddm.pgp-auto-decode.1 diff -ur mutt-1.5.4/commands.c mutt-1.5.4.ddm/commands.c --- mutt-1.5.4/commands.c 2003-03-04 02:49:43.000000000 -0500 +++ mutt-1.5.4.ddm/commands.c 2003-08-10 12:20:01.000000000 -0400 @@ -943,6 +943,7 @@ rv = 1; } + h->security |= PGP_TRADITIONAL_CHECKED; mx_close_message (&msg); return rv; } diff -ur mutt-1.5.4/curs_main.c mutt-1.5.4.ddm/curs_main.c --- mutt-1.5.4/curs_main.c 2003-01-23 17:04:28.000000000 -0500 +++ mutt-1.5.4.ddm/curs_main.c 2003-08-10 12:59:10.000000000 -0400 @@ -1070,7 +1070,7 @@ case OP_DISPLAY_HEADERS: /* don't weed the headers */ CHECK_MSGCOUNT; - CHECK_VISIBLE; + CHECK_VISIBLE; /* * toggle the weeding of headers so that a user can press the key * again while reading the message. @@ -1088,6 +1088,8 @@ menu->current = mutt_thread_next_unread (Context, CURHDR); } + if (option (OPTPGPAUTODEC) && !(tag ? 0 : (CURHDR->security & PGP_TRADITIONAL_CHECKED))) + mutt_check_traditional_pgp (tag ? NULL : CURHDR, &menu->redraw); if ((op = mutt_display_message (CURHDR)) == -1) { unset_option (OPTNEEDRESORT); @@ -1764,6 +1766,8 @@ CHECK_IMAP_ACL(IMAP_ACL_INSERT); #endif + if (option (OPTPGPAUTODEC) && !(tag ? 0 : (CURHDR->security & PGP_TRADITIONAL_CHECKED))) + mutt_check_traditional_pgp (tag ? NULL : CURHDR, &menu->redraw); mutt_edit_message (Context, tag ? NULL : CURHDR); menu->redraw = REDRAW_FULL; @@ -1774,6 +1778,8 @@ CHECK_MSGCOUNT; CHECK_VISIBLE; CHECK_ATTACH; + if (option (OPTPGPAUTODEC) && !(tag ? 0 : (CURHDR->security & PGP_TRADITIONAL_CHECKED))) + mutt_check_traditional_pgp (tag ? NULL : CURHDR, &menu->redraw); ci_send_message (SENDFORWARD, NULL, NULL, Context, tag ? NULL : CURHDR); menu->redraw = REDRAW_FULL; break; @@ -1788,6 +1794,8 @@ CHECK_MSGCOUNT; CHECK_VISIBLE; CHECK_ATTACH; + if (option (OPTPGPAUTODEC) && !(tag ? 0 : (CURHDR->security & PGP_TRADITIONAL_CHECKED))) + mutt_check_traditional_pgp (tag ? NULL : CURHDR, &menu->redraw); ci_send_message (SENDREPLY|SENDGROUPREPLY, NULL, NULL, Context, tag ? NULL : CURHDR); menu->redraw = REDRAW_FULL; break; @@ -1797,6 +1805,8 @@ CHECK_ATTACH; CHECK_MSGCOUNT; CHECK_VISIBLE; + if (option (OPTPGPAUTODEC) && !(tag ? 0 : (CURHDR->security & PGP_TRADITIONAL_CHECKED))) + mutt_check_traditional_pgp (tag ? NULL : CURHDR, &menu->redraw); ci_send_message (SENDREPLY|SENDLISTREPLY, NULL, NULL, Context, tag ? NULL : CURHDR); menu->redraw = REDRAW_FULL; break; @@ -1912,6 +1922,8 @@ CHECK_ATTACH; CHECK_MSGCOUNT; CHECK_VISIBLE; + if (option (OPTPGPAUTODEC) && !(tag ? 0 : (CURHDR->security & PGP_TRADITIONAL_CHECKED))) + mutt_check_traditional_pgp (tag ? NULL : CURHDR, &menu->redraw); ci_send_message (SENDREPLY, NULL, NULL, Context, tag ? NULL : CURHDR); menu->redraw = REDRAW_FULL; break; diff -ur mutt-1.5.4/init.h mutt-1.5.4.ddm/init.h --- mutt-1.5.4/init.h 2003-03-04 04:28:12.000000000 -0500 +++ mutt-1.5.4.ddm/init.h 2003-08-10 12:27:26.000000000 -0400 @@ -1432,6 +1432,17 @@ ** This option overrides ``$$pgp_create_traditional'' ** (PGP only) */ + { "pgp_auto_decode", DT_BOOL, R_NONE, OPTPGPAUTODEC, 0 }, + /* + ** .pp + ** If set, mutt will automatically attempt to decrypt traditional PGP + ** messages whenever the user performs an operation which ordinarily would + ** result in the contents of the message being operated on. For example, + ** if the user displays a pgp-traditional message which has not been manually + ** checked with the check-traditional-pgp function, mutt will automatically + ** check the message for traditional pgp. + */ + /* XXX Default values! */ diff -ur mutt-1.5.4/mutt.h mutt-1.5.4.ddm/mutt.h --- mutt-1.5.4/mutt.h 2003-03-04 02:49:48.000000000 -0500 +++ mutt-1.5.4.ddm/mutt.h 2003-08-10 12:29:13.000000000 -0400 @@ -437,6 +437,7 @@ OPTPGPIGNORESUB, OPTPGPLONGIDS, OPTPGPAUTOTRAD, + OPTPGPAUTODEC, #if 0 OPTPGPENCRYPTSELF, #endif diff -ur mutt-1.5.4/mutt_crypt.h mutt-1.5.4.ddm/mutt_crypt.h --- mutt-1.5.4/mutt_crypt.h 2003-01-30 18:54:28.000000000 -0500 +++ mutt-1.5.4.ddm/mutt_crypt.h 2003-08-10 12:31:44.000000000 -0400 @@ -36,8 +36,9 @@ #define BADSIGN (1 << 3) /* FIXME: value also used below for PGPKEY */ #define SIGNOPAQUE (1 << 4) -#define APPLICATION_PGP (1 << 5) -#define APPLICATION_SMIME (1 << 6) +#define APPLICATION_PGP (1 << 5) +#define APPLICATION_SMIME (1 << 6) +#define PGP_TRADITIONAL_CHECKED (1 << 7) #define PGPENCRYPT (APPLICATION_PGP | ENCRYPT) #define PGPSIGN (APPLICATION_PGP | SIGN)