diff -Pur mutt/OPS mutt-patch/OPS --- mutt/OPS Mon Oct 10 11:21:18 2005 +++ mutt-patch/OPS Sat May 6 05:14:44 2006 @@ -127,6 +127,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/PATCHES mutt-patch/PATCHES --- mutt/PATCHES Wed Dec 31 18:00:00 1969 +++ mutt-patch/PATCHES Sat May 6 05:14:44 2006 @@ -1,0 +1 @@ +patch-1.5.11.dgc.markmsg.2 diff -Pur mutt/curs_main.c mutt-patch/curs_main.c --- mutt/curs_main.c Fri Apr 28 10:39:33 2006 +++ mutt-patch/curs_main.c Sat May 6 05:14:44 2006 @@ -2038,6 +2038,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); + 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/doc/muttrc.man mutt-patch/doc/muttrc.man --- mutt/doc/muttrc.man Fri May 5 19:42:20 2006 +++ mutt-patch/doc/muttrc.man Sat May 6 05:14:44 2006 @@ -2165,6 +2165,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/functions.h mutt-patch/functions.h --- mutt/functions.h Mon Oct 10 11:21:24 2005 +++ mutt-patch/functions.h Sat May 6 05:14:44 2006 @@ -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/globals.h mutt-patch/globals.h --- mutt/globals.h Fri Apr 28 10:39:33 2006 +++ mutt-patch/globals.h Sat May 6 05:15:43 2006 @@ -74,6 +74,7 @@ WHERE char *HeaderCachePageSize; #endif /* HAVE_GDBM || HAVE_DB4 */ #endif /* USE_HCACHE */ +WHERE char *MarkMacroPrefix; WHERE char *MhFlagged; WHERE char *MhReplied; WHERE char *MhUnseen; diff -Pur mutt/init.h mutt-patch/init.h --- mutt/init.h Fri Apr 28 10:39:33 2006 +++ mutt-patch/init.h Sat May 6 05:14:44 2006 @@ -1052,6 +1052,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 Binary files mutt/pattern.o and mutt-patch/pattern.o differ