From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/12522 Path: main.gmane.org!not-for-mail From: "St. Suika Roberts" Newsgroups: gmane.emacs.gnus.general Subject: Yet another washing function. Date: 04 Oct 1997 18:47:34 -0600 Message-ID: NNTP-Posting-Host: coloc-standby.netfonds.no X-Trace: main.gmane.org 1035152043 4204 80.91.224.250 (20 Oct 2002 22:14:03 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 22:14:03 +0000 (UTC) Return-Path: Original-Received: from xemacs.org (xemacs.cs.uiuc.edu [128.174.252.16]) by altair.xemacs.org (8.8.7/8.8.7) with ESMTP id UAA16623 for ; Sat, 4 Oct 1997 20:16:25 -0700 Original-Received: from ifi.uio.no (0@ifi.uio.no [129.240.64.2]) by xemacs.org (8.8.5/8.8.5) with SMTP id WAA01813 for ; Sat, 4 Oct 1997 22:09:23 -0500 (CDT) Original-Received: from claymore.vcinet.com (claymore.vcinet.com [208.205.12.23]) by ifi.uio.no with SMTP (8.6.11/ifi2.4) id for ; Sun, 5 Oct 1997 04:21:45 +0200 Original-Received: (qmail 2500 invoked by uid 504); 5 Oct 1997 02:21:38 -0000 Original-Received: (qmail 2497 invoked from network); 5 Oct 1997 02:21:37 -0000 Original-Received: from ppp-108.unm.edu (HELO misa.unm.edu) (kitty@129.24.14.108) by claymore.vcinet.com with SMTP; 5 Oct 1997 02:21:36 -0000 Original-Received: (from kitty@localhost) by misa.unm.edu (8.8.0/8.8.0) id VAA12817; Sat, 4 Oct 1997 21:27:03 -0500 Original-To: ding@gnus.org X-Mailer: Quassia Gnus v0.10/Emacs 20.0 Original-Lines: 35 Original-Xref: misa.genom.com queue:2 Xref: main.gmane.org gmane.emacs.gnus.general:12522 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:12522 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..." lists