+2004-02-19 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * 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 <yamaoka@jpl.org>
+
+ * 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 <yoichi@geiin.org>
+
+ * 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 <colin.rafferty@morganstanley.com>
* wl-highlight.el (wl-highlight-message): Change to strict regexp
(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.
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)))
(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
(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)