2002-01-23 Kenichi OKADA <okada@opaopa.org>
+ * wl-draft.el (wl-draft-delete-field): Optional argument.
+ (wl-draft-delete-fields): Ditto.
+
+2002-01-23 Kenichi OKADA <okada@opaopa.org>
+
* wl-message.el (toplevel): Eliminated byte-compile warning.
for `itimer-function', `delete-timer' and `itimer-list'.
(let ((wl-interactive-send t))
(wl-draft-send-and-exit)))
-(defun wl-draft-delete-field (field &optional delimline)
- (wl-draft-delete-fields (regexp-quote field) delimline))
+(defun wl-draft-delete-field (field &optional delimline replace)
+ (wl-draft-delete-fields (regexp-quote field) delimline replace))
-(defun wl-draft-delete-fields (regexp &optional delimline)
+(defun wl-draft-delete-fields (regexp &optional delimline replace)
(save-restriction
(unless delimline
(if (search-forward "\n\n" nil t)
(narrow-to-region (point-min) delimline)
(goto-char (point-min))
(let ((regexp (concat "^" regexp ":"))
- (case-fold-search t)
- last)
+ (case-fold-search t))
(while (not (eobp))
(if (looking-at regexp)
(progn
(forward-line 1)
(if (re-search-forward "^[^ \t]" nil t)
(goto-char (match-beginning 0))
- (point-max)))))
+ (point-max))))
+ (if replace
+ (insert (concat field ": " replace "\n"))))
(forward-line 1)
(if (re-search-forward "^[^ \t]" nil t)
(goto-char (match-beginning 0))