From: "St. Suika Roberts" <wrobert2@mailhost.tcs.tulane.edu>
Subject: Yet another washing function.
Date: 04 Oct 1997 18:47:34 -0600 [thread overview]
Message-ID: <m2iuvdghnd.fsf@misa.genom.com> (raw)
I started working on this one back in May, but I only got it to where
I like it today ^^;;
It fixes M$Word style `smart quotes' back to normal ascii ones.
------------------------------ cut here ------------------------------
(defun gnus-article-fix-m$word ()
"Fix M$Word smartquotes in an article."
(interactive)
(save-excursion
(with-current-buffer gnus-article-buffer
(let ((buffer-read-only nil))
(goto-char (point-min))
(while (search-forward "\221" nil t)
(replace-match "`" t t))
(goto-char (point-min))
(while (search-forward "\222" nil t)
(replace-match "'" t t))
(goto-char (point-min))
(while (search-forward "\223" nil t)
(replace-match "\"" t t))
(goto-char (point-min))
(while (search-forward "\224" nil t)
(replace-match "\"" t t))))))
------------------------------ cut here ------------------------------
I was thinking `W W m' might be a good binding for it.
Thanks,
Suika (yes, this makes four passes through the buffer. If
elisp has a way to do this in one pass I'd be interested in
learning about it)
--
wroberts@tvi.cc.nm.us
"Amazing what caffeine and no sense of self-preservation can do..."
<a href="http://studentweb.tulane.edu/~wrobert2">lists</a>
next reply other threads:[~1997-10-05 0:47 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-10-05 0:47 St. Suika Roberts [this message]
1997-10-05 11:27 ` Kim-Minh Kaplan
[not found] ` <x7iuvc8f0r.fsf@peorth.gweep.net>
1997-10-06 0:57 ` Greg Stark
1997-10-08 16:23 ` Lars Balker Rasmussen
1997-11-13 18:06 ` Lars Balker Rasmussen
1997-11-13 21:37 ` Lars Magne Ingebrigtsen
1997-10-06 19:57 ` William M. Perry
1997-10-07 14:06 ` Michael Welsh Duggan
1997-10-12 14:53 ` Lars Magne Ingebrigtsen
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=m2iuvdghnd.fsf@misa.genom.com \
--to=wrobert2@mailhost.tcs.tulane.edu \
/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).