diff -ur mutt-1.3.13/OPS mutt-1.3.13-dgc/OPS --- mutt-1.3.13/OPS Fri Oct 27 05:25:55 2000 +++ mutt-1.3.13-dgc/OPS Sun Jan 21 05:04:38 2001 @@ -119,6 +119,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 -ur mutt-1.3.13/curs_main.c mutt-1.3.13-dgc/curs_main.c --- mutt-1.3.13/curs_main.c Mon Nov 27 07:00:56 2000 +++ mutt-1.3.13-dgc/curs_main.c Sun Jan 21 13:24:32 2001 @@ -1733,6 +1733,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 -ur mutt-1.3.13/doc/muttrc.man mutt-1.3.13-dgc/doc/muttrc.man --- mutt-1.3.13/doc/muttrc.man Sun Dec 31 04:11:45 2000 +++ mutt-1.3.13-dgc/doc/muttrc.man Sun Jan 21 13:24:35 2001 @@ -1685,6 +1674,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 -ur mutt-1.3.13/functions.h mutt-1.3.13-dgc/functions.h --- mutt-1.3.13/functions.h Fri Nov 17 03:15:28 2000 +++ mutt-1.3.13-dgc/functions.h Sun Jan 21 05:16:58 2001 @@ -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, ";" }, { "shell-escape", OP_SHELL_ESCAPE, "!" }, diff -ur mutt-1.3.13/globals.h mutt-1.3.13-dgc/globals.h --- mutt-1.3.13/globals.h Tue Nov 21 04:31:18 2000 +++ mutt-1.3.13-dgc/globals.h Sun Jan 21 05:11:29 2001 @@ -60,6 +60,7 @@ WHERE char *Locale; WHERE char *MailcapPath; WHERE char *Maildir; +WHERE char *MarkMacroPrefix; WHERE char *MsgFmt; #ifdef USE_SOCKET diff -ur mutt-1.3.13/init.h mutt-1.3.13-dgc/init.h --- mutt-1.3.13/init.h Thu Dec 21 03:19:23 2000 +++ mutt-1.3.13-dgc/init.h Sun Jan 21 13:22:33 2001 @@ -867,6 +867,13 @@ ** to maildir-style mailboxes. Setting it will have no effect on other ** mailbox types. */ + { "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. + */ { "mark_old", DT_BOOL, R_BOTH, OPTMARKOLD, 1 }, /* ** .pp