X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=wl%2Fwl-template.el;h=b6c910f409337fc24fa612c3053d98ac169a102c;hb=c50cc4923f2b8db952b90cba5534e12a436b1a5a;hp=d1436962112fe7bef36fcc329eb778f3f8375e19;hpb=0f37bbd8fd715034efcabd939d59573cf6a4c60a;p=elisp%2Fwanderlust.git diff --git a/wl/wl-template.el b/wl/wl-template.el index d143696..b6c910f 100644 --- a/wl/wl-template.el +++ b/wl/wl-template.el @@ -1,7 +1,7 @@ -;;; wl-template.el -- Draft template feature for Wanderlust. +;;; wl-template.el --- Draft template feature for Wanderlust. -;; Copyright 1998,1999,2000 Masahiro MURATA -;; Yuuichi Teranishi +;; Copyright (C) 1998,1999,2000 Masahiro MURATA +;; Copyright (C) 1998,1999,2000 Yuuichi Teranishi ;; Author: Masahiro MURATA ;; Keywords: mail, net news @@ -27,7 +27,7 @@ ;;; Commentary: ;;; Code: -;; +;; ;; Variables @@ -77,7 +77,7 @@ See info under Wanderlust for full documentation. \\{wl-template-mode} -Enterring WL-Template mode calls the value of `wl-template-mode-hook'." +Entering WL-Template mode calls the value of `wl-template-mode-hook'." (kill-all-local-variables) (setq mode-name "Wl-Template" major-mode 'wl-template-mode) @@ -85,10 +85,12 @@ Enterring WL-Template mode calls the value of `wl-template-mode-hook'." (setq buffer-read-only t) (run-hooks 'wl-template-mode-hook)) -(defun wl-template-select () +(defun wl-template-select (&optional arg) "Select template from `wl-template-alist'." - (interactive) - (if (not wl-template-visible-select) + (interactive "P") + (if (not (if arg + (not wl-template-visible-select) + wl-template-visible-select)) (wl-template-apply (completing-read (format "Template (%s): " wl-template-default-name) wl-template-alist)) @@ -134,25 +136,24 @@ ARG is ignored." ; ARG ignored this version (?) (setq wl-template (car (nth wl-template-cur-num wl-template-alist))) mail-header-separator) (wl-highlight-message (point-min) (point-max) t) - (and wl-highlight-x-face-func - (funcall - wl-highlight-x-face-func - (point-min) (re-search-forward mail-header-separator nil t))) + (when wl-highlight-x-face-function + (funcall wl-highlight-x-face-function + (point-min) (re-search-forward mail-header-separator nil t))) (setq mode-line-process (concat ":" wl-template)) (set-buffer-modified-p nil)))) (defun wl-template-next () "Display next reference in other buffer." (interactive) - (if (eq wl-template-max-num - (setq wl-template-cur-num (1+ wl-template-cur-num))) + (if (= wl-template-max-num + (setq wl-template-cur-num (1+ wl-template-cur-num))) (setq wl-template-cur-num 0)) (wl-template-show)) (defun wl-template-prev () "Display previous reference in other buffer." (interactive) - (setq wl-template-cur-num (if (eq wl-template-cur-num 0) + (setq wl-template-cur-num (if (zerop wl-template-cur-num) (1- wl-template-max-num) (1- wl-template-cur-num))) (wl-template-show))