--- mutt-1.5.6/PATCHES~ never +++ mutt-1.5.6/PATCHES Mon Feb 9 22:48:48 CST 2004 @@ -1,0 +1 @@ +patch-1.5.6.dgc.markmsg.2 diff -Pur mutt-1.5.6-base/OPS mutt-1.5.6-dgc.markmsg.2/OPS --- mutt-1.5.6-base/OPS Wed Nov 5 03:41:31 2003 +++ mutt-1.5.6-dgc.markmsg.2/OPS Mon Feb 9 22:48:48 2004 @@ -125,6 +125,7 @@ OP_MAIN_TAG_PATTERN "tag messages matching a pattern" OP_MAIN_UNDELETE_PATTERN "undelete messages matching a pattern" OP_MAIN_UNTAG_PATTERN "untag messages matching a pattern" +OP_MARK_MSG "create a hot-key macro for the current message" OP_MIDDLE_PAGE "move to the middle of the page" OP_NEXT_ENTRY "move to the next entry" OP_NEXT_LINE "scroll down one line" diff -Pur mutt-1.5.6-base/curs_main.c mutt-1.5.6-dgc.markmsg.2/curs_main.c --- mutt-1.5.6-base/curs_main.c Wed Nov 5 03:41:31 2003 +++ mutt-1.5.6-dgc.markmsg.2/curs_main.c Mon Feb 9 22:48:48 2004 @@ -1925,6 +1925,32 @@ } break; + + case OP_MARK_MSG: + + if (CURHDR->env->message_id) + { + char str[STRING], macro[STRING]; + char buf[128]; + + buf[0] = '\0'; + if (!mutt_get_field ("Enter macro stroke: ", buf, sizeof(buf), + M_CLEAR) && buf[0]) + { + snprintf(str, sizeof(str), "%s%s", MarkMacroPrefix, buf); + snprintf(macro, sizeof(macro), + "~i \"%s\"\n", CURHDR->env->message_id); + km_bind(str, MENU_GENERIC, OP_MACRO, macro, "Message hotkey"); + + snprintf(buf, sizeof(buf), _("Message bound to %s."), str, macro); + mutt_message(buf); + dprint (1, (debugfile, "Mark: %s => %s\n", str, macro)); + } + } + else + mutt_error _("No message ID to macro."); + break; + case OP_RECALL_MESSAGE: CHECK_ATTACH; diff -Pur mutt-1.5.6-base/doc/muttrc.man mutt-1.5.6-dgc.markmsg.2/doc/muttrc.man --- mutt-1.5.6-base/doc/muttrc.man Sun Feb 1 12:22:19 2004 +++ mutt-1.5.6-dgc.markmsg.2/doc/muttrc.man Mon Feb 9 22:48:48 2004 @@ -1967,6 +1967,18 @@ .TP +.B mark_macro_prefix +.nf +Type: string +Default: \(lq'\(rq +.fi +.IP +Prefix for macros created using mark-message. A new macro +automatically generated with \fIa\fP will be composed +from this prefix and the letter \fIa\fP. + + +.TP .B mark_old .nf Type: boolean diff -Pur mutt-1.5.6-base/functions.h mutt-1.5.6-dgc.markmsg.2/functions.h --- mutt-1.5.6-base/functions.h Wed Nov 5 03:41:31 2003 +++ mutt-1.5.6-dgc.markmsg.2/functions.h Mon Feb 9 22:48:48 2004 @@ -49,6 +49,7 @@ { "previous-line", OP_PREV_LINE, "<" }, { "half-up", OP_HALF_UP, "[" }, { "half-down", OP_HALF_DOWN, "]" }, + { "mark-message", OP_MARK_MSG, "~" }, { "help", OP_HELP, "?" }, { "tag-prefix", OP_TAG_PREFIX, ";" }, { "tag-prefix-cond", OP_TAG_PREFIX_COND, NULL }, diff -Pur mutt-1.5.6-base/globals.h mutt-1.5.6-dgc.markmsg.2/globals.h --- mutt-1.5.6-base/globals.h Sun Feb 1 11:15:17 2004 +++ mutt-1.5.6-dgc.markmsg.2/globals.h Mon Feb 9 22:48:48 2004 @@ -63,6 +63,7 @@ WHERE char *Locale; WHERE char *MailcapPath; WHERE char *Maildir; +WHERE char *MarkMacroPrefix; WHERE char *MhFlagged; WHERE char *MhReplied; WHERE char *MhUnseen; diff -Pur mutt-1.5.6-base/init.h mutt-1.5.6-dgc.markmsg.2/init.h --- mutt-1.5.6-base/init.h Sun Feb 1 11:15:17 2004 +++ mutt-1.5.6-dgc.markmsg.2/init.h Mon Feb 9 22:48:48 2004 @@ -959,6 +959,14 @@ ** The locale used by \fIstrftime(3)\fP to format dates. Legal values are ** the strings your system accepts for the locale variable \fILC_TIME\fP. */ + /* this absurd location avoids conflict with ats.mark_old patch */ + { "mark_macro_prefix",DT_STR, R_NONE, UL &MarkMacroPrefix, UL "'" }, + /* + ** .pp + ** Prefix for macros created using mark-message. A new macro + ** automatically generated with \fIa\fP will be composed + ** from this prefix and the letter \fIa\fP. + */ { "mail_check", DT_NUM, R_NONE, UL &BuffyTimeout, 5 }, /* ** .pp