From: akr Date: Sat, 4 Apr 1998 21:07:43 +0000 (+0000) Subject: * eword-decode.el (eword-analyze-comment): Swallow series of comments X-Git-Tag: akemi-199811302358~3 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=b601756d021e3d7a08a5670db6db520845979e26;p=elisp%2Fsemi.git * eword-decode.el (eword-analyze-comment): Swallow series of comments and unterminated comment. --- diff --git a/ChangeLog b/ChangeLog index 4608544..704d13f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +1998-04-04 Tanaka Akira + + * eword-decode.el (eword-analyze-comment): Swallow series of comments + and unterminated comment. + 1998-04-03 Tanaka Akira * eword-decode.el (eword-analyze-atom): Set enable-multibyte-characters diff --git a/eword-decode.el b/eword-decode.el index 9a953c0..543c2a0 100644 --- a/eword-decode.el +++ b/eword-decode.el @@ -630,12 +630,16 @@ be the result." (std11-analyze-domain-literal string)) (defun eword-analyze-comment (string &optional must-unfold) - (let ((p (std11-check-enclosure string ?\( ?\) t))) - (if p - (cons (cons 'comment - (eword-decode-comment-string (substring string 0 p))) - (substring string p)) - ))) + (let ((len (length string))) + (if (and (< 0 len) (eq (aref string 0) ?\()) + (let ((p 0)) + (while (and p (< p len) (eq (aref string p) ?\()) + (setq p (std11-check-enclosure string ?\( ?\) t p))) + (setq p (or p len)) + (cons (cons 'comment + (eword-decode-comment-string (substring string 0 p))) + (substring string p))) + nil))) (defun eword-analyze-spaces (string &optional must-unfold) (std11-analyze-spaces string))