--- mutt-x.y.z/PATCHES~ never +++ mutt-x.y.z/PATCHES Thu Jun 13 18:24:29 CDT 2002 @@ -1,0 +1 @@ +dgc.markmsg.2 diff -Pur mutt-1.5.1-base/OPS mutt-1.5.1/OPS --- mutt-1.5.1-base/OPS Thu Apr 25 08:26:01 2002 +++ mutt-1.5.1/OPS Thu Jun 13 17:31:32 2002 @@ -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.5.1-base/curs_main.c mutt-1.5.1/curs_main.c --- mutt-1.5.1-base/curs_main.c Thu Feb 28 02:23:32 2002 +++ mutt-1.5.1/curs_main.c Thu Jun 13 17:31:32 2002 @@ -1852,6 +1852,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.1-base/doc/muttrc.man mutt-1.5.1/doc/muttrc.man --- mutt-1.5.1-base/doc/muttrc.man Wed May 1 18:22:03 2002 +++ mutt-1.5.1/doc/muttrc.man Thu Jun 13 17:31:32 2002 @@ -1878,6 +1878,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.1-base/functions.h mutt-1.5.1/functions.h --- mutt-1.5.1-base/functions.h Thu Jan 24 15:12:15 2002 +++ mutt-1.5.1/functions.h Thu Jun 13 17:31:32 2002 @@ -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.5.1-base/globals.h mutt-1.5.1/globals.h --- mutt-1.5.1-base/globals.h Thu Jan 24 15:12:15 2002 +++ mutt-1.5.1/globals.h Thu Jun 13 17:31:32 2002 @@ -62,6 +62,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.1-base/init.h mutt-1.5.1/init.h --- mutt-1.5.1-base/init.h Thu Apr 25 08:26:01 2002 +++ mutt-1.5.1/init.h Thu Jun 13 17:32:22 2002 @@ -930,6 +930,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