Greetings,
A few days ago, a friend asked me to write him a pod only
spell checker. I did so and sent it to him; he liked it and said I
ought to send it to the cperl maintainers and see if they want it.
When I read through cperl.el, I found xemacs(a)xemacs.org as the
maintainer address, is this correct? The function I wrote is super simple and
attached below.
Have a nice day,
-Trey
(defun pod-spell ()
"A function to only check pod documentation"
(interactive "*")
(save-excursion
(let ((element 0)
(my-list (make-pod-list)))
(while (< element (length my-list))
(setq the-first (car (nth element my-list)))
(setq the-second (cadr (nth element my-list)))
(ispell-region (car (nth element my-list)) (cadr (nth element my-list)))
(setq element (1+ element))))))
(defun make-pod-list ()
"A function to make a list of syntactic elements which are pod/here
documentation"
(interactive)
(goto-char (point-min))
(let (
(current 0)
(pod-list '())
(last-state nil)
(done nil)
(line 0)
(pod-start 0))
(while (not done)
(setq the-state
(get-text-property
current 'in-pod))
(cond
((and (eq last-state nil) (eq the-state t)) ;; a new pod is starting
(setq last-state the-state)
(setq pod-start current))
((and (eq last-state t) (eq the-state nil)) ;; the end of a pod
(setq last-state the-state)
(setq pod-list (cons (list pod-start current) pod-list)))
((eq current (point-max))
(setq done t)))
(setq line (1+ line))
(goto-line line)
(setq current (point))) ;; end of the while loop.
(reverse pod-list))) ;; I reversed it just to make it prettier
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Ashton Trey Belew
Phone: 860 305 6040
e-mail: trey(a)veggie.wesleyan.edu
http://veggie.wesleyan.edu/trey/
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Hi Jimbo. Dennis. Really appreciate the help on the income tax. You wanna
help on the audit now?
-- "The Rockford Files"