File: spell.tf

package info (click to toggle)
tf5 5.0beta8-3
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 3,372 kB
  • ctags: 2,663
  • sloc: ansic: 25,492; makefile: 131; perl: 103; sh: 79
file content (19 lines) | stat: -rw-r--r-- 539 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
;;; spelling checker
;;; This lets you type ESC-s to check the spelling of the current line.
;;; If any misspellings are found, you will be told.
;;; This requires the "spell" utility on your local system.

/loaded __TFLIB__/spell.tf

/def -i spell_line = \
    /setenv ARGS=$(/recall -i 1)%; \
    /let _errs=$(/quote -S -decho !echo $$ARGS | spell)%; \
    /if ( _errs !~ "" ) \
        /echo MISSPELLINGS: %_errs%; \
    /else \
        /echo No misspellings found.%; \
    /endif%; \
    /@test _errs =~ ""

/def -ib^[s = /spell_line