Commit c1558605 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(soundex-alist): Put variable before fn that uses it.

parent b6703b02
......@@ -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")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment