Ted Zlatanov <[email protected]> writes: > You can catch the offender by redefining rfc822.el functions. This is > rfc822-addresses: > > (defun rfc822-addresses (header-text) > (if (string-match "\\`[ \t]*\\([^][\000-\037 ()<>@,;:\\\".]+\\)[ \t]*\\'" > header-text) > ;; Make very simple case moderately fast. > (list (substring header-text (match-beginning 1) (match-end 1))) > (let ((buf (generate-new-buffer " rfc822"))) > (unwind-protect > (save-excursion > (set-buffer buf) > (make-local-variable 'case-fold-search) > (setq case-fold-search nil) ;For speed(?) > (insert header-text) > ;; unfold continuation lines > (goto-char (point-min)) > > (while (re-search-forward "\\([^\\]\\(\\\\\\\\\\)*\\)\n[ \t]" nil t) > (replace-match "\\1 " t)) > > (goto-char (point-min)) > (let ((list ()) > tem > ;; This is for rfc822-bad-address. Give it a non-nil > ;; initial value to prevent rfc822-bad-address from > ;; raising a wrong-type-argument error > (rfc822-address-start (point))) > (catch 'address ; this is for rfc822-bad-address > (rfc822-nuke-whitespace) > (while (not (eobp)) > (setq rfc822-address-start (point)) > (setq tem > (cond ((rfc822-looking-at ?\,) > nil) > ((looking-at "[][\000-\037@;:\\.>)]") > (debug "list so far %s, remaining text %s" list > (buffer-substring (point) (point-max)) ; *** debug *** > (forward-char) > (rfc822-bad-address > (format "Strange character \\%c found" > (preceding-char)))) > (t > (rfc822-addresses-1 t)))) > (cond ((null tem)) > ((stringp tem) > (setq list (cons tem list))) > (t > (setq list (nconc (nreverse tem) list))))) > (nreverse list)))) > (and buf (kill-buffer buf)))))) > > Note the single debug statement I inserted. Hit `C-x C-e' after the > last parenthesis to use this function; copy it into the *scratch* buffer > to keep playing with it.
Unfortunately I get the following when I evaluate it: ,---- | Debugger entered--Lisp error: (void-variable header-text) | (string-match "\\`[ ]*\\([^][ _______________________________________________ info-gnus-english mailing list [email protected] http://lists.gnu.org/mailman/listinfo/info-gnus-english
