Gnus development mailing list
 help / color / mirror / Atom feed
From: Michael Welsh Duggan <md5i@cs.cmu.edu>
Subject: Re: Yet another washing function.
Date: 07 Oct 1997 10:06:14 -0400	[thread overview]
Message-ID: <u7afglllbd.fsf@peoria.mt.cs.cmu.edu> (raw)
In-Reply-To: "St. Suika Roberts"'s message of "04 Oct 1997 18:47:34 -0600"

"St. Suika Roberts" <wrobert2@mailhost.tcs.tulane.edu> 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)


  parent reply	other threads:[~1997-10-07 14:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-10-05  0:47 St. Suika Roberts
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 [this message]
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=u7afglllbd.fsf@peoria.mt.cs.cmu.edu \
    --to=md5i@cs.cmu.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).