home *** CD-ROM | disk | FTP | other *** search
/ Mega CD-ROM 1 / megacd_rom_1.zip / megacd_rom_1 / FREEMACS / CONTRIB.ZIP / ISPELL.MIN < prev    next >
Text File  |  1990-03-09  |  3KB  |  146 lines

  1. Attempt to guess the correct spelling of a word using speller.com.  A little
  2. slow.
  3.  
  4.  
  5. Name:F:spell-word
  6. Spell check the word to the left of point.
  7. [*]#(g?,##(sc,,2),0,(
  8.     #(ds,temp,##(rm,-))
  9.     #(mp,temp,,(,),(;),.,!,##(bc,41,d,a))
  10.     #(==,##(temp),,(
  11.         #(pm,2)
  12.         #(sp,-)
  13.         #(ds,temp,##(rm,{))
  14.         #(mp,temp,,0,1,2,3,4,5,6,7,8,9)
  15.         #(sm,1,{)
  16.         #(==,##(temp),,,(
  17.             #(Fspell-word,##(temp))
  18.         ))
  19.         #(sp,0)
  20.         #(pm)
  21.     ))
  22. ),(
  23.     #(Ferror,Speller not installed)
  24. ))[*]
  25.  
  26.  
  27. Name:Fspell-word
  28. [*]#(==,#(sc,arg1,0),-3,(
  29.     #(##(F-spell-action),arg1)
  30. ))
  31. [*]
  32.  
  33.  
  34. Name:F-spell-action
  35. What should be done when a word is spelled incorrectly.  When set to "bl",
  36. the only action is to ring the bell.  When set to Uispell-word, the user
  37. will have a chance to correct their spelling.
  38. [*]bl[*]
  39.  
  40.  
  41. rash,cash,
  42. #(is,#(ds,word,crash)#(Uispell-word-delete))#(Fcrlf)
  43.  
  44. cash,dash,hash,lash,mash,rash,sash,wash,
  45. #(is,#(Uispell-word-insert-do,,ash,97))#(Fcrlf)
  46.  
  47. cash,dash,hash,lash,mash,rash,sash,wash,
  48. #(is,#(ds,word,ash)#(Uispell-word-insert))#(Fcrlf)
  49.  
  50. gas,has,was,ads,ass,
  51. #(is,#(ds,word,as)#(Uispell-word-insert))#(Fcrlf)
  52.  
  53. bat,cat,fat,hat,mat,pat,rat,sat,act,aft,apt,art,
  54. #(is,#(ds,word,at)#(Uispell-word-insert))#(Fcrlf)
  55.  
  56. spat,peat,part,past,
  57. #(is,#(ds,word,pat)#(Uispell-word-insert))#(Fcrlf)
  58.  
  59. apt,pat,
  60. #(is,#(ds,word,pat)#(Uispell-word-twiddle))#(Fcrlf)
  61.  
  62. apart,
  63. #(is,#(ds,word,apatr)#(Uispell-word-twiddle))#(Fcrlf)
  64.  
  65. #(Uispell-word,seporate)
  66.  
  67.  
  68. Name:Uispell-word
  69. Tell the user that the word given in arg1 is spelled incorrectly, and try
  70. to deduce the correct spelling.
  71. [*]#(ds,word,arg1)
  72. #(ds,value)
  73. #(Fcompleting-readline,Correct spelling of arg1 is: ,(
  74.     #(is,##(value))
  75. ),(
  76.     #(Uispell-word-delete)
  77.     #(Uispell-word-insert)
  78.     #(Uispell-word-twiddle)
  79. ),-)
  80. [*]
  81.  
  82.  
  83. Name:Uispell-word-delete
  84. Check the spelling of #(word) by deleting single characters beginning at the
  85. arg1th character, counting from zero.  Return all correctly spelled words.
  86. [*]#(g?,##(nc,##(word)),arg1,(
  87.     #(Uispell-word-candidate,
  88.         ##(gn,word,arg1)
  89.         #(..,##(go,word))
  90.         ##(gn,word,10000)
  91.         #(rs,word)
  92.     )
  93.     #(SELF,##(++,arg1,1))
  94. ))[*]
  95.  
  96.  
  97.  
  98. Name:Uispell-word-twiddle
  99. Check the spelling of #(word) by twiddling two characters starting at the
  100. arg1th character, counting from zero.  Return all correctly spelled words.
  101. [*]#(g?,##(nc,##(word)),arg1,(
  102.     #(Uispell-word-candidate,
  103.         ##(gn,word,arg1)
  104.         #(ds,temp,##(go,word))
  105.         ##(go,word)
  106.         ##(temp)
  107.         ##(gn,word,10000)
  108.         #(rs,word)
  109.     )
  110.     #(SELF,##(++,arg1,1))
  111. ))[*]
  112.  
  113.  
  114. Name:Uispell-word-insert
  115. Check the spelling of #(word) by inserting and replacing single characters
  116. beginning at the arg1th character, counting from zero.  Return all correctly
  117. spelled words.
  118. [*]#(g?,##(nc,##(word)),arg1,(
  119.     #(SELF-do,##(gn,word,arg1),##(gn,word,10000),97)
  120.     #(rs,word)
  121.     #(SELF-do,##(gn,word,arg1),
  122.         #(..,##(go,word))##(gn,word,10000),97)
  123.     #(rs,word)
  124.     #(SELF,##(++,arg1,1))
  125. ))[*]
  126.  
  127.  
  128. Name:Uispell-word-insert-do
  129. arg1 is the first part of the word.
  130. arg2 is the second part of the word.
  131. arg3 is the letter we're currently trying.
  132. [*]#(g?,arg3,122,,(
  133.     #(Uispell-word-candidate,arg1##(bc,arg3,d,a)arg2)
  134.     #(SELF,arg1,arg2,##(++,arg3,1))
  135. ))[*]
  136.  
  137.  
  138. Name:Uispell-word-candidate
  139. [*]#(an,arg1)
  140. #(==,##(sc,arg1),-3,,(
  141.     #(ds,temp,arg1)
  142.     #(==,##(value),##(gn,temp,##(nc,##(value))),(
  143.         arg1(,)
  144.     ))
  145. ))[*]
  146.