From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/12547 Path: main.gmane.org!not-for-mail From: Michael Welsh Duggan Newsgroups: gmane.emacs.gnus.general Subject: Re: Yet another washing function. Date: 07 Oct 1997 10:06:14 -0400 Message-ID: References: NNTP-Posting-Host: coloc-standby.netfonds.no X-Trace: main.gmane.org 1035152064 4361 80.91.224.250 (20 Oct 2002 22:14:24 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 22:14:24 +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 JAA26471 for ; Tue, 7 Oct 1997 09:00:02 -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 KAA23197 for ; Tue, 7 Oct 1997 10:52:44 -0500 (CDT) Original-Received: from peoria.mt.cs.cmu.edu (PEORIA.MT.CS.CMU.EDU [128.2.110.42]) by ifi.uio.no with SMTP (8.6.11/ifi2.4) id for ; Tue, 7 Oct 1997 16:06:17 +0200 Original-Received: by peoria.mt.cs.cmu.edu (AIX 4.1/UCB 5.64/4.03) id AA06550; Tue, 7 Oct 1997 10:06:15 -0400 Original-To: ding@ifi.uio.no In-Reply-To: "St. Suika Roberts"'s message of "04 Oct 1997 18:47:34 -0600" Original-Lines: 53 X-Mailer: Gnus v5.4.59/Emacs 19.34 Xref: main.gmane.org gmane.emacs.gnus.general:12547 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:12547 "St. Suika Roberts" writes: > 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. Hmm... I do something similar in mine: (defun md5i-special-display-table () (let ((bdt (make-display-table))) (aset bdt 13 []) ;Zap ^Ms (aset bdt 25 []) ;Zap ^Ys (aset bdt 133 [?. ?. ?.]) ;\205 = ... (aset bdt 145 [?`]) ;\221 = ` (aset bdt 146 [?']) ;\222 = ' (aset bdt 147 [?\"]) ;\223 = " (aset bdt 148 [?\"]) ;\224 = " (aset bdt 149 [?*]) ;\225 = * (aset bdt 150 [?- ?-]) ;\226 = -- (aset bdt 151 [?- ?- ?-]) ;\227 = --- (aset bdt 153 [?( ?T ?m ?)]) ;\231 = (Tm) (setq buffer-display-table bdt))) I then placed this in the gnus-article-display-hook. (The list is not complete, however, as I have added the entries as I have come across them.) -- Michael Duggan (md5i@cs.cmu.edu)