* wl-score.el (wl-score-put-alike): Use quote instead of backquote.
[elisp/wanderlust.git] / wl / wl-template.el
index b6c910f..b1f9230 100644 (file)
@@ -39,6 +39,7 @@
 (defvar wl-template-cur-num 0)
 (defvar wl-template-max-num 0)
 (defvar wl-template-draft-buffer nil)
+(defvar wl-template-preview nil)
 
 ;;; Code
 
   (define-key wl-template-mode-map "\r"    'wl-template-set)
   (define-key wl-template-mode-map "\n"    'wl-template-set))
 
+(defun wl-template-preview-p ()
+  "Return non-nil when preview template."
+  wl-template-preview)
+
 (defun wl-template-apply (name)
   "Apply NAME template to draft."
   (let (template)
@@ -88,6 +93,8 @@ Entering WL-Template mode calls the value of `wl-template-mode-hook'."
 (defun wl-template-select (&optional arg)
   "Select template from `wl-template-alist'."
   (interactive "P")
+  (unless wl-template-alist
+    (error "Please set `wl-template-alist'"))
   (if (not (if arg
               (not wl-template-visible-select)
             wl-template-visible-select))
@@ -129,6 +136,7 @@ ARG is ignored."                    ; ARG ignored this version (?)
   (save-excursion
     (set-buffer wl-template-buffer-name)
     (let ((buffer-read-only nil)
+         (wl-template-preview t)
          (mail-header-separator  "--header separater--"))
       (erase-buffer)
       (goto-char (point-min))