diff -Pur mutt-1.3.23-base/OPS mutt-1.3.23/OPS --- mutt-1.3.23-base/OPS Tue Sep 11 05:50:50 2001 +++ mutt-1.3.23/OPS Fri Oct 12 16:09:00 2001 @@ -121,6 +121,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.3.23-base/curs_main.c mutt-1.3.23/curs_main.c --- mutt-1.3.23-base/curs_main.c Tue Sep 11 06:58:17 2001 +++ mutt-1.3.23/curs_main.c Fri Oct 12 16:09:00 2001 @@ -1814,6 +1814,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.3.23-base/doc/muttrc.man mutt-1.3.23/doc/muttrc.man --- mutt-1.3.23-base/doc/muttrc.man Tue Oct 9 03:44:20 2001 +++ mutt-1.3.23/doc/muttrc.man Fri Oct 12 16:09:00 2001 @@ -1768,6 +1768,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.3.23-base/functions.h mutt-1.3.23/functions.h --- mutt-1.3.23-base/functions.h Tue Sep 11 05:51:39 2001 +++ mutt-1.3.23/functions.h Fri Oct 12 16:09:00 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 -Pur mutt-1.3.23-base/globals.h mutt-1.3.23/globals.h --- mutt-1.3.23-base/globals.h Mon Sep 3 07:39:21 2001 +++ mutt-1.3.23/globals.h Fri Oct 12 16:09:47 2001 @@ -61,6 +61,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.3.23-base/init.h mutt-1.3.23/init.h --- mutt-1.3.23-base/init.h Tue Sep 11 05:38:00 2001 +++ mutt-1.3.23/init.h Fri Oct 12 16:09:00 2001 @@ -896,6 +896,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