Commits

Anonymous committed f864527

- added dictionary-default-popup-strategy

  • Participants
  • Parent commits b946aaf

Comments (0)

Files changed (3)

+2002-01-29  Torsten Hilbrich <dictionary@myrkr.in-berlin.de>
+	
+	* dictionary.el (dictionary-default-popup-strategy): added this
+	  variable and changed dictionary-popup-matching-words to use
+	  this as matching strategy (suggested by Renaud Pons)
+	
 2001-12-21  Torsten Hilbrich <dictionary@myrkr.in-berlin.de>
 
 	* link.el (link-initialize-keymap): fixed keybinding bug (reported

File debian/changelog

+dictionary (1.7.3-1) unstable; urgency=low
+
+  * dictionary.el (dictionary-default-popup-strategy): added this
+    variable and changed dictionary-popup-matching-words to use
+    this as matching strategy (suggested by Renaud Pons)
+
+ -- Torsten Hilbrich <dictionary@myrkr.in-berlin.de>  Tue, 29 Jan 2002 10:27:49 +0100
+
 dictionary (1.7.2-1) unstable; urgency=low
 
   * link.el (link-initialize-keymap): fixed keybinding bug (reported by

File dictionary.el

    :group 'dictionary
    :type 'string)
 
+(defcustom dictionary-default-popup-strategy
+  "exact"
+  "The default strategy for listing matching words within a popup window.
+
+The following algorithm (defined by the dictd server) are supported
+by the choice value:
+
+- Exact match
+
+  The found word exactly matches the searched word.
+
+- Similiar sounding
+
+  The found word sounds similiar to the searched word.  For this match type
+  the soundex algorithm defined by Donald E. Knuth is used.  It will only
+  works with english words and the algorithm is not very reliable (i.e.,
+  the soundex algorithm is quite simple).
+
+- Levenshtein distance one
+
+  The Levenshtein distance is defined as the number of insertions, deletions,
+  or replacements needed to get the searched word.  This algorithm searches
+  for word where spelling mistakes are allowed.  Levenshtein distance one
+  means there is either a deleted character, an inserted character, or a
+  modified one. 
+
+- User choice
+
+  Here you can enter any matching algorithm supported by your
+  dictionary server.
+"
+  :group 'dictionary
+  :type '(choice (const :tag "Exact match" "exact")
+		 (const :tag "Similiar sounding" "soundex")
+		 (const :tag "Levenshtein distance one" "lev")
+		 (string :tag "User choice")))
+
  (defcustom dictionary-create-buttons
    t
    "Create some clickable buttons on top of the window if non-nil."
     (error "Sorry, popup menus are not available in this emacs version"))
   (dictionary-do-matching (or word (current-word))
 			  dictionary-default-dictionary
-			  "exact"
+			  dictionary-default-popup-strategy
 			  'dictionary-process-popup-replies))
 
 (defun dictionary-process-popup-replies (reply)