--- PATCHES~ never +++ PATCHES Sat Dec 8 18:20:36 CST 2001 @@ -1,0 +1 @@ +mutt-1.3.24.dgc.markmsg.2 diff -Pur mutt-1.3.24-base/OPS mutt-1.3.24/OPS --- mutt-1.3.24-base/OPS Sat Jan 27 07:33:53 2001 +++ mutt-1.3.24/OPS Sat Dec 8 18:20:36 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.24-base/curs_main.c mutt-1.3.24/curs_main.c --- mutt-1.3.24-base/curs_main.c Thu Nov 8 02:56:48 2001 +++ mutt-1.3.24/curs_main.c Sat Dec 8 18:20:36 2001 @@ -1835,6 +1835,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.24-base/doc/muttrc.man mutt-1.3.24/doc/muttrc.man --- mutt-1.3.24-base/doc/muttrc.man Thu Nov 29 03:41:11 2001 +++ mutt-1.3.24/doc/muttrc.man Sat Dec 8 18:20:36 2001 @@ -1826,6 +1826,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.24-base/functions.h mutt-1.3.24/functions.h --- mutt-1.3.24-base/functions.h Tue Sep 11 06:20:34 2001 +++ mutt-1.3.24/functions.h Sat Dec 8 18:20:36 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.24-base/globals.h mutt-1.3.24/globals.h --- mutt-1.3.24-base/globals.h Wed Nov 21 07:56:40 2001 +++ mutt-1.3.24/globals.h Sat Dec 8 18:20:36 2001 @@ -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.3.24-base/init.h mutt-1.3.24/init.h --- mutt-1.3.24-base/init.h Wed Nov 21 07:56:40 2001 +++ mutt-1.3.24/init.h Sat Dec 8 18:20:36 2001 @@ -934,6 +934,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