From: kaoru Date: Mon, 24 May 2004 14:30:17 +0000 (+0000) Subject: Backport changes: X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e5df70a5913a442a7faf610b2052e4052424428f;p=elisp%2Fwanderlust.git Backport changes: 2004-02-19 Katsumi Yamaoka * wl-highlight.el (wl-highlight-signature-search): Don't use re-search-backward for a long word since it is possible to crash XEmacs because of a bug. 2004-01-15 Katsumi Yamaoka * wl-draft.el (wl-draft-highlight-and-recenter): Redraw frame just before calling `recenter' in order to cope with an XEmacs bug. 2004-01-03 Yoichi NAKAYAMA * wl-address.el (wl-address-delete): Avoid mis-deleting. * wl-address.el (wl-address-add-or-change): Don't add empty address. --- diff --git a/wl/ChangeLog b/wl/ChangeLog index 2149610..769c24a 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,20 @@ +2004-02-19 Katsumi Yamaoka + + * wl-highlight.el (wl-highlight-signature-search): Don't use + re-search-backward for a long word since it is possible to crash + XEmacs because of a bug. + +2004-01-15 Katsumi Yamaoka + + * wl-draft.el (wl-draft-highlight-and-recenter): Redraw frame just + before calling `recenter' in order to cope with an XEmacs bug. + +2004-01-03 Yoichi NAKAYAMA + + * wl-address.el (wl-address-delete): Avoid mis-deleting. + * wl-address.el (wl-address-add-or-change): Don't add empty + address. + 2004-04-03 Colin Rafferty * wl-highlight.el (wl-highlight-message): Change to strict regexp diff --git a/wl/wl-address.el b/wl/wl-address.el index d168f52..b8b0e12 100644 --- a/wl/wl-address.el +++ b/wl/wl-address.el @@ -641,7 +641,7 @@ Group list contents is not included." (with-temp-buffer (message "Deleting Address...") (insert-file-contents wl-address-file) - (delete-matching-lines (concat "^[ \t]*" the-email)) + (delete-matching-lines (concat "^[ \t]*" the-email "[ \t]+\".*\"[ \t]+\".*\"$")) (write-region (point-min) (point-max) wl-address-file nil 'no-msg) ;; Delete entries. @@ -665,9 +665,16 @@ If already registerd, change it." the-realname))) (when change-address (setq new-addr (read-from-minibuffer "E-Mail: " address)) - (if (and (not (string= address new-addr)) - (assoc new-addr wl-address-list)) - (error "'%s' already exists" new-addr))) + (cond + ((or (not (stringp new-addr)) + (string-match "^[ \t]*$" new-addr)) + (error "empty address")) + ((and (not (string= address new-addr)) + (assoc new-addr wl-address-list)) + (error "'%s' already exists" new-addr)) + (t + ;; do nothing + ))) ;; writing to ~/.address (let ((output-coding-system (mime-charset-to-coding-system wl-mime-charset))) diff --git a/wl/wl-draft.el b/wl/wl-draft.el index 42f7d67..a13f870 100644 --- a/wl/wl-draft.el +++ b/wl/wl-draft.el @@ -2352,6 +2352,10 @@ Automatically applied in draft sending time." (put-text-property (point-min) (point-max) 'face nil) (wl-highlight-message (point-min) (point-max) t)) (set-buffer-modified-p modified)))) + (static-when (featurep 'xemacs) + ;; Cope with one of many XEmacs bugs that `recenter' takes + ;; a long time if there are a lot of invisible text lines. + (redraw-frame)) (recenter n)) ;;;; user-agent support by Sen Nagata diff --git a/wl/wl-highlight.el b/wl/wl-highlight.el index e4fde9d..f039c4e 100644 --- a/wl/wl-highlight.el +++ b/wl/wl-highlight.el @@ -1046,17 +1046,25 @@ Returns start point of signature." (goto-char end) (or ;; look for legal signature separator (check at first for fasten) - (re-search-backward "\n-- \n" beg t) + (search-backward "\n-- \n" beg t) ;; look for dual separator - (save-excursion - (and - (re-search-backward "^[^A-Za-z0-9> \t\n]+ *$" beg t) - (> (- (match-end 0) (match-beginning 0)) 10);; "10" is a magic number. - (re-search-backward - (concat "^" - (regexp-quote (buffer-substring (match-beginning 0) (match-end 0))) - "$") beg t))) + (let ((pt (point)) + separator) + (prog1 + (and (re-search-backward "^[^A-Za-z0-9> \t\n]+ *$" beg t) + ;; `10' is a magic number. + (> (- (match-end 0) (match-beginning 0)) 10) + (setq separator (buffer-substring (match-beginning 0) + (match-end 0))) + ;; We should not use `re-search-backward' for a long word + ;; since it is possible to crash XEmacs because of a bug. + (if (search-backward (concat "\n" separator "\n") beg t) + (1+ (point)) + (and (search-backward (concat separator "\n") beg t) + (bolp) + (point)))) + (goto-char pt))) ;; look for user specified signature-separator (if (stringp wl-highlight-signature-separator)