summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--message-templ.el21
1 files changed, 21 insertions, 0 deletions
diff --git a/message-templ.el b/message-templ.el
index 333d8ac..c76ae33 100644
--- a/message-templ.el
+++ b/message-templ.el
@@ -349,5 +349,26 @@ Set header-separator is MAIL-HEADER."
(insert mail-header-separator "\n"))
(messsage-templ-config-exec-sub template))))
+(defun message-templ-config-exec (&optional config-alist)
+ "Change headers according to the value of `message-templ-config-alist'."
+ (interactive)
+ (let ((case-fold-search t)
+ (alist (or config-alist message-templ-config-alist))
+ local-variables key clist found)
+ (save-excursion
+ (while alist
+ (setq key (caar alist)
+ clist (cdar alist))
+ (cond
+ ((stringp key)
+ (if (save-restriction
+ (message-narrow-to-headers)
+ (goto-char (point-min))
+ (re-search-forward key nil t))
+ (message-templ-config-exec-sub clist)))
+ ((eval key)
+ (message-templ-config-exec-sub clist)))
+ (setq alist (cdr alist))))))
+
(provide 'message-templ)
;;; message-templ.el ends here