diff options
| author | Torsten Hilbrich <torsten.hilbrich@gmx.net> | 2002-02-09 12:29:00 +0100 | 
|---|---|---|
| committer | Torsten Hilbrich <torsten@hilbrich.net> | 2011-08-27 20:47:38 +0200 | 
| commit | 0b2e0eeda8f3eacc1b38a674001b5d9c00a6309c (patch) | |
| tree | 434fde3d7968cff112e2e179e59f2cb636e495d5 | |
| parent | 3a42f8554f791cf22dd2bf1b9ae15d6963ae5a29 (diff) | |
Imported version 1.7.3 from tarball
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)
| -rw-r--r-- | README | 18 | ||||
| -rw-r--r-- | debian/changelog | 8 | ||||
| -rw-r--r-- | dictionary.el | 47 | 
3 files changed, 57 insertions, 16 deletions
@@ -59,13 +59,7 @@     custom.el  file  in  the above GNU Emacs. Please update to the current     version  whenever possible. XEmacs 21 and Emacs 20 as well as Emacs 21     have been tested too. -     * Current version (1.7.2) of this package -     * Version 1.5.1 of this package -     * Version 1.4.1 of this package -     * Version 1.3.3 of this package -     * Version 1.2.1 of this package -     * Version 1.1 of this package -     * Initial version (1.0) of this package +     * Current version (1.7.3) of this package     I  you  want  to  know  more  about the differences please look at the     ChangeLog. @@ -80,14 +74,14 @@                               Unpacking the archive     The package is distributed as tar.gz file. You unpack it using: -gzip -dc dictionary-1.7.2.tar.gz | tar xf - +gzip -dc dictionary-1.7.3.tar.gz | tar xf -     or -tar -xzf dictionary-1.7.2.tar.gz +tar -xzf dictionary-1.7.3.tar.gz     (with  the  version number subject to change) depending on whether you     are  using  GNU  tar  which  support the z flag for compression. After -   unpacking  the  archive  a directory dictionary-1.7.2 has been created +   unpacking  the  archive  a directory dictionary-1.7.3 has been created     containing the necessary files.                                   Installation @@ -99,8 +93,8 @@ Debian     dpkg-buildpackage) you can use the supplied debian support.  make debian -   This  will  create  a  package  named  dictionary-1.7.2-1_i386.deb  or -   similiar  in  the  parent  directory  of dictionary-1.7.2. You can now +   This  will  create  a  package  named  dictionary-1.7.3-1_i386.deb  or +   similiar  in  the  parent  directory  of dictionary-1.7.3. You can now     install  this  package  as  root,  it  will automatically byte-compile     itself  for  all  installed  emacs versions and provide a startup-file     which autoloads this package. In the configuration example given below diff --git a/debian/changelog b/debian/changelog index d9ef50a..331063b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +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 diff --git a/dictionary.el b/dictionary.el index ef1d5c7..a848f73 100644 --- a/dictionary.el +++ b/dictionary.el @@ -2,7 +2,7 @@   ;; Author: Torsten Hilbrich <dictionary@myrkr.in-berlin.de>   ;; Keywords: interface, dictionary - ;; $Id: dictionary.el,v 1.32 2001/12/15 13:37:10 torsten Exp $ + ;; $Id: dictionary.el,v 1.34 2002/02/06 20:49:41 torsten Exp $   ;; This file is free software; you can redistribute it and/or modify   ;; it under the terms of the GNU General Public License as published by @@ -82,6 +82,43 @@     :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." @@ -1017,7 +1054,7 @@ It presents the word at point as default input and allows editing it."      (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) @@ -1072,8 +1109,10 @@ It presents the word at point as default input and allows editing it."  		      (mouse-set-point event)  		      (current-word)))))  	(let ((definition  -		(dictionary-definition word  -				       dictionary-tooltip-dictionary))) +		(dictionary-decode-charset  +		 (dictionary-definition word  +					dictionary-tooltip-dictionary) +		 dictionary-tooltip-dictionary)))  	  (if definition   	      (tooltip-show definition))  	  t))  | 
