File: spell.tf

package info (click to toggle)
tf5 5.0beta8-14
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,976 kB
  • sloc: ansic: 25,499; perl: 103; makefile: 79; sh: 70
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