home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / gnu / emacs / help / 3513 < prev    next >
Encoding:
Text File  |  1992-07-27  |  2.2 KB  |  57 lines

  1. Path: sparky!uunet!cis.ohio-state.edu!pacific.mps.ohio-state.edu!linac!uwm.edu!ogicse!orstcs!orstnews!talon.ucs.orst.edu!palmerp
  2. From: palmerp@math.orst.edu (Paul A Palmer)
  3. Newsgroups: gnu.emacs.help
  4. Subject: Re: ispell interface
  5. Message-ID: <PALMERP.92Jul27151734@phoebus.math.orst.edu>
  6. Date: 27 Jul 92 23:17:34 GMT
  7. Article-I.D.: phoebus.PALMERP.92Jul27151734
  8. References: <CAH.92Jul27154436@peter.bham.ac.uk>
  9. Sender: usenet@talon.ucs.orst.edu (Usenet News admin)
  10. Reply-To: palmerp@math.orst.edu
  11. Organization: Dept. of Math, Oregon State University
  12. Lines: 41
  13. In-Reply-To: cah@cs.bham.ac.uk's message of 27 Jul 92 15:44:36 GMT
  14. Nntp-Posting-Host: phoebus.math.orst.edu
  15.  
  16. In article <CAH.92Jul27154436@peter.bham.ac.uk> cah@cs.bham.ac.uk (Ceri Hopkins) writes:
  17.  
  18.    Has anyone updated ispell.el so that it can be used on mail composed
  19.    in Emacs, i.e. ignore headers etc.. Does this already work for some
  20.    mail readers? I am using mh-e -- however that shouldn't be much of a
  21.    problem.
  22.  
  23. Well, I didn't update ispell.el, but I do have one solution. I use mh-e, and
  24. my solution is specific to that. Here are the lines from my .emacs:
  25.  
  26. (defun mh-find-body () "Return location of start of body."
  27.   (save-excursion
  28.     (goto-char (point-min))
  29.     (mh-goto-header-end 1)
  30.     (point)))
  31. (defun mh-ispell-letter ()
  32.   "Run ispell on the body of an mh letter, skipping quoted material beginning
  33.   with >>" 
  34.   (interactive)
  35.   (setq comment-start ">>")
  36.   (setq comment-start-skip "^>+ *")
  37.   (ispell-region (mh-find-body) (point-max)))
  38. (define-key mh-letter-mode-map "\C-ci" 'mh-ispell-letter)
  39.  
  40. If anyone improves on this, please send me the improved version. I'm a pretty
  41. novice elisp hacker.
  42.  
  43.    Not only does my version (to work with ispell version 3) attempt to
  44.    correct the spelling of the header it tends to take the first few
  45.    characters of the first mail address and move it to after the first
  46.    paragraph! I've had trouble with it trying to correct errors in the
  47.    first line of files too (similar behaviour to the above, screwing up
  48.    the file).
  49.  
  50. I've never seen this behaviour.
  51.  
  52. --
  53. Paul Palmer
  54. Department of Mathematics         E-mail: palmerp@math.orst.edu
  55. Kidder Hall 368
  56. Oregon State University, Corvallis, Oregon 97331-4605
  57.