From: Mark Borges <mdb@cdc.noaa.gov>
Cc: Steven L Baur <steve@miranova.com>
Subject: Re: September Gnus 0.48 is released
Date: 01 Mar 1996 20:04:47 -0700 [thread overview]
Message-ID: <vkzqa0gpps.fsf@roberts.cdc.noaa.gov> (raw)
In-Reply-To: Steven L Baur's message of 29 Feb 1996 11:25:35 -0800
>> On 29 Feb 1996 11:25:35 -0800,
>> Steven L Baur(sb) wrote:
sb> The following patch works around this problem. A 19.14 beta
sb> tester should check to see if mail-strip-quoted-names (in
sb> utils/mail-utils.el) still has the same bug.
Maybe. The defun from 19.14-beta12 is appended below (I'm not sure
what I'm looking for).
If it is a bug/incompatability, could you please let us know.
Thanks,
-mb-
(defun mail-strip-quoted-names (address)
"Delete comments and quoted strings in an address list ADDRESS.
Also delete leading/trailing whitespace and replace FOO <BAR> with just BAR.
Return a modified address list."
(if (null address)
nil
(if mail-use-rfc822
(progn (require 'rfc822)
(mapconcat 'identity (rfc822-addresses address) ", "))
(let (pos)
(string-match "\\`[ \t\n]*" address)
;; strip surrounding whitespace
(setq address (substring address
(match-end 0)
(string-match "[ \t\n]*\\'" address
(match-end 0))))
;; Detect nested comments.
(if (string-match "[ \t]*(\\([^)\"\\]\\|\\\\.\\|\\\\\n\\)*(" address)
;; Strip nested comments.
(save-excursion
(set-buffer (get-buffer-create " *temp*"))
(erase-buffer)
(insert address)
(set-syntax-table lisp-mode-syntax-table)
(goto-char 1)
(while (search-forward "(" nil t)
(forward-char -1)
(skip-chars-backward " \t")
(delete-region (point)
(save-excursion
(condition-case ()
(forward-sexp 1)
(error (goto-char (point-max))))
(point))))
(setq address (buffer-string))
(erase-buffer))
;; Strip non-nested comments an easier way.
(while (setq pos (string-match
;; This doesn't hack rfc822 nested comments
;; `(xyzzy (foo) whinge)' properly. Big deal.
"[ \t]*(\\([^)\"\\]\\|\\\\.\\|\\\\\n\\)*)"
address))
(setq address
(mail-string-delete address
pos (match-end 0)))))
;; strip `quoted' names (This is supposed to hack `"Foo Bar" <bar@host>')
(setq pos 0)
(while (setq pos (string-match
"[ \t]*\"\\([^\"\\]\\|\\\\.\\|\\\\\n\\)*\"[ \t\n]*"
address pos))
;; If the next thing is "@", we have "foo bar"@host. Leave it.
(if (and (> (length address) (match-end 0))
(= (aref address (match-end 0)) ?@))
(setq pos (match-end 0))
(setq address
(mail-string-delete address
pos (match-end 0)))))
;; Retain only part of address in <> delims, if there is such a thing.
(while (setq pos (string-match "\\(,\\s-*\\|\\`\\)[^,]*<\\([^>,]*>\\)"
address))
(let ((junk-beg (match-end 1))
(junk-end (match-beginning 2))
(close (match-end 0)))
(setq address (mail-string-delete address (1- close) close))
(setq address (mail-string-delete address junk-beg junk-end))))
address))))
(or (and (boundp 'rmail-default-dont-reply-to-names)
(not (null rmail-default-dont-reply-to-names)))
(setq rmail-default-dont-reply-to-names "info-"))
next prev parent reply other threads:[~1996-03-02 3:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-02-29 13:35 Lars Magne Ingebrigtsen
1996-02-29 19:25 ` Steven L Baur
1996-03-02 3:04 ` Mark Borges [this message]
1996-03-02 18:02 ` Mark Borges
1996-03-02 18:53 ` Steven L Baur
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=vkzqa0gpps.fsf@roberts.cdc.noaa.gov \
--to=mdb@cdc.noaa.gov \
--cc=steve@miranova.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).