emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [elpa] externals/typo 88522ea4c8 1/2: Handle hash-tables with symbol


From: Stefan Monnier
Subject: Re: [elpa] externals/typo 88522ea4c8 1/2: Handle hash-tables with symbols as keys
Date: Sat, 22 Jul 2023 09:22:51 -0400
User-agent: Gnus/5.13 (Gnus v5.13)

>     Handle hash-tables with symbols as keys

How 'bout

    (defun typo-edits (word collection pred)
      "Generate a list of all multi-edit typos of WORD.
    Only words that are in the COLLECTION and satisfy PRED will be
    returned.  The variable `typo-level' specifies how many
    single-letter typos are searched."
      (seq-filter pred (all-completions "" collection)))

Instead?

BTW, this is a good example of the problem with the `predicate` argument
of `all-completions` (which can't be used here, because it gets called
differently depending on the type of `collection`).


        Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]