-button .b-anagram -text "Anagram" -underline 0 \
- -command { run-search "-anagram" $word }
-button .b-subgram -text "Subgram" -underline 0 \
- -command { run-search "-subgram" $word }
-button .b-glob -text "Crossword" -underline 5 \
- -command { run-search "-wildcard" $word }
-button .b-track -text "Trackword" -underline 0 \
- -command { run-search "-trackword" $word }
-button .b-regexp -text "Regexp" -underline 0 \
- -command { run-search "-regexp" $word }
+foreach {opt text mnem} {
+ anagram Anagram a
+ subgram Subgram s
+ wildcard Crossword w
+ trackword Trackword t
+ mono Monoalphabetic m
+ regexp "Regular expression" r
+} {
+ button .b-$opt -text $text \
+ -underline [string first $mnem [string tolower $text]] \
+ -command [concat [list run-search -$opt] \$word]
+ bind . <Alt-$mnem> [list tkButtonInvoke .b-$opt]
+ pack .b-$opt -in .f-buttons -fill x -padx 2 -pady 2
+}