;;; wl-template.el -- Draft template feature for Wanderlust.
-;; Copyright 1998,1999,2000 Masahiro MURATA <muse@ba2.so-net.ne.jp>
-;; Yuuichi Teranishi <teranisi@gohome.org>
+;; Copyright (C) 1998,1999,2000 Masahiro MURATA <muse@ba2.so-net.ne.jp>
+;; Copyright (C) 1998,1999,2000 Yuuichi Teranishi <teranisi@gohome.org>
;; Author: Masahiro MURATA <muse@ba2.so-net.ne.jp>
;; Keywords: mail, net news
-;; Time-stamp: <2000-03-03 13:18:35 teranisi>
;; This file is part of Wanderlust (Yet Another Message Interface on Emacsen).
(define-key wl-template-mode-map "\n" 'wl-template-set))
(defun wl-template-apply (name)
+ "Apply NAME template to draft."
(let (template)
(when name
(if (string= name "")
(run-hooks 'wl-template-mode-hook))
(defun wl-template-select ()
+ "Select template from `wl-template-alist'."
(interactive)
(if (not wl-template-visible-select)
(wl-template-apply
(wl-template-show))))
(defun wl-template-show (&optional arg)
- "Show reference INDEX in wl-template-alist."
+ "Show reference INDEX in `wl-template-alist'.
+ARG is ignored." ; ARG ignored this version (?)
(save-excursion
(set-buffer wl-template-buffer-name)
(let ((buffer-read-only nil)
mail-header-separator)
(wl-highlight-message (point-min) (point-max) t)
(and wl-highlight-x-face-func
- (funcall
- wl-highlight-x-face-func
+ (funcall
+ wl-highlight-x-face-func
(point-min) (re-search-forward mail-header-separator nil t)))
(setq mode-line-process (concat ":" wl-template))
(set-buffer-modified-p nil))))
(if win (select-window win))))))
(defun wl-template-insert (name &optional mail-header)
+ "Insert NAME template.
+Set header-separator is MAIL-HEADER."
(let ((template (cdr (assoc name wl-template-alist)))
(mail-header-separator (or mail-header
mail-header-separator)))
(insert mail-header-separator "\n"))
(wl-draft-config-exec-sub template))))
-(provide 'wl-template)
+(require 'product)
+(product-provide (provide 'wl-template) (require 'wl-version))
;;; wl-template.el ends here