# HG changeset patch # User Richard M. Stallman # Date 772400362 0 # Node ID ba1bbdb8595e7704948cd0f8cd8434cf6c389012 # Parent 08cafbc57e00b8a47fc9ed75a3ba905f453dadf5 (soundex-alist): Delete the elements that mapped into nil. diff -r 08cafbc57e00 -r ba1bbdb8595e lisp/soundex.el --- a/lisp/soundex.el Thu Jun 23 19:30:19 1994 +0000 +++ b/lisp/soundex.el Thu Jun 23 19:39:22 1994 +0000 @@ -31,8 +31,7 @@ ;;; 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") + '((?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")) @@ -46,7 +45,7 @@ (let* ((word (upcase word)) (length (length word)) (code (cdr (assq (aref word 0) soundex-alist))) (key (substring word 0 1)) (index 1) (prev-code code)) - ;; once we have a four char key, were done + ;; once we have a four char key, we're done (while (and (> 4 (length key)) (< index length)) ;; look up the code for each letter in word at index (setq code (cdr (assq (aref word index) soundex-alist))