summaryrefslogtreecommitdiff
path: root/lisp/soundex.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1994-05-17 23:04:07 +0000
committerRichard M. Stallman <rms@gnu.org>1994-05-17 23:04:07 +0000
commitc155860549c22e9d2769ebdd1e4d420707e59595 (patch)
tree712a8dd9ce8394762a1345b1d6d6d662e56df06f /lisp/soundex.el
parentb6703b0279af7994ced4221309f36ad6c68d8207 (diff)
downloademacs-c155860549c22e9d2769ebdd1e4d420707e59595.tar.gz
(soundex-alist): Put variable before fn that uses it.
Diffstat (limited to 'lisp/soundex.el')
-rw-r--r--lisp/soundex.el16
1 files changed, 8 insertions, 8 deletions
diff --git a/lisp/soundex.el b/lisp/soundex.el
index caa34fca925..06d46bc8e15 100644
--- a/lisp/soundex.el
+++ b/lisp/soundex.el
@@ -30,6 +30,14 @@
;;; Code:
+(defvar soundex-alist
+ '((?A . nil) (?E . nil) (?H . nil) (?I . nil) (?O . nil) (?U . nil)
+ (?W . nil) (?Y . nil) (?B . "1") (?F . "1") (?P . "1") (?V . "1")
+ (?C . "2") (?G . "2") (?J . "2") (?K . "2") (?Q . "2") (?S . "2")
+ (?X . "2") (?Z . "2") (?D . "3") (?T . "3") (?L . "4") (?M . "5")
+ (?N . "5") (?R . "6"))
+ "Alist of chars-to-key-code for building Soundex keys.")
+
(defun soundex (word)
"Return a Soundex key for WORD.
Implemented as described in:
@@ -54,14 +62,6 @@ and Searching\", Addison-Wesley (1973), pp. 391-392."
(substring (concat key "000") 0 4)
key)))
-(defvar soundex-alist
- '((?A . nil) (?E . nil) (?H . nil) (?I . nil) (?O . nil) (?U . nil)
- (?W . nil) (?Y . nil) (?B . "1") (?F . "1") (?P . "1") (?V . "1")
- (?C . "2") (?G . "2") (?J . "2") (?K . "2") (?Q . "2") (?S . "2")
- (?X . "2") (?Z . "2") (?D . "3") (?T . "3") (?L . "4") (?M . "5")
- (?N . "5") (?R . "6"))
- "Alist of chars-to-key-code for building Soundex keys.")
-
;(defvar soundex-test
; '("Euler" "Gauss" "Hilbert" "Knuth" "Lloyd" "Lukasiewicz"
; "Ellery" "Ghosh" "Heilbronn" "Kant" "Ladd" "Lissajous")