From: okada Date: Wed, 19 Jul 2000 01:35:00 +0000 (+0000) Subject: * wl-summary.el (wl-summary-target-mark-uudecode): Error when X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=991e4a0b9e13636049f6452660a7b2505f9366b3;p=elisp%2Fwanderlust.git * wl-summary.el (wl-summary-target-mark-uudecode): Error when begin-line does not exist. * wl-message.el (wl-message-uu-substring): Ditto. --- diff --git a/wl/ChangeLog b/wl/ChangeLog index 05e5d12..bfa1509 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,9 @@ +2000-07-19 Kenichi OKADA + + * wl-summary.el (wl-summary-target-mark-uudecode): Error when + begin-line does not exist. + * wl-message.el (wl-message-uu-substring): Ditto. + 2000-07-18 Yuuichi Teranishi * wl-summary.el (wl-summary-mode): Call `kill-all-local-variables' to diff --git a/wl/wl-message.el b/wl/wl-message.el index 4746eea..e74bf6e 100644 --- a/wl/wl-message.el +++ b/wl/wl-message.el @@ -589,23 +589,27 @@ (search-forward "\n\n") (let ((sp (point)) ep filename case-fold-search) - (if first - (progn - (re-search-forward "^begin[ \t]+[0-9]+[ \t]+\\([^ ].*\\)" nil t) - (setq filename (buffer-substring (match-beginning 1)(match-end 1)))) - (re-search-forward "^M.*$" nil t)) ; uuencoded string - (beginning-of-line) - (setq sp (point)) - (goto-char (point-max)) - (if last - (re-search-backward "^end" sp t) - (re-search-backward "^M.*$" sp t)) ; uuencoded string - (forward-line 1) - (setq ep (point)) - (set-buffer outbuf) - (goto-char (point-max)) - (insert-buffer-substring buf sp ep) - (set-buffer buf) - filename))) + (catch 'done + (if first + (progn + (if (re-search-forward "^begin[ \t]+[0-9]+[ \t]+\\([^ ].*\\)" nil t) + (setq filename (buffer-substring (match-beginning 1)(match-end 1))) + (throw 'done nil))) + (re-search-forward "^M.*$" nil t)) ; uuencoded string + (beginning-of-line) + (setq sp (point)) + (goto-char (point-max)) + (if last + (re-search-backward "^end" sp t) + (re-search-backward "^M.*$" sp t)) ; uuencoded string + (forward-line 1) + (setq ep (point)) + (set-buffer outbuf) + (goto-char (point-max)) + (insert-buffer-substring buf sp ep) + (set-buffer buf) + filename)))) ;;; wl-message.el ends here + + diff --git a/wl/wl-summary.el b/wl/wl-summary.el index 6b71cca..e29d507 100644 --- a/wl/wl-summary.el +++ b/wl/wl-summary.el @@ -5928,9 +5928,11 @@ Reply to author if invoked with argument." (set-buffer (setq orig-buf (wl-message-get-original-buffer))) (goto-char (point-min)) (cond ((= i 1) ; first - (setq filename (wl-message-uu-substring - orig-buf tmp-buf t - (= i k)))) + (if (setq filename (wl-message-uu-substring + orig-buf tmp-buf t + (= i k))) + nil + (error "Can't find begin line."))) ((< i k) (wl-message-uu-substring orig-buf tmp-buf)) (t ; last