Refactor based on the Python implementation #3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This makes a few implementation changes plus a couple user-visible additions (adding
unidecode-region
andunidecode-sanitize-region
).The churn is mostly in 3c0521f, where I changed things to use data broken up and stored in the same way as Python's Unidecode module. I also updated the README appropriately and added the scripts (one in Python and one in Emacs Lisp) that I used to copy the Unidecode data (following your method of Python -> JSON -> Lisp).
If you merge these changes, the MELPA recipe will need to be updated to copy the files in the new data directory. I have a commit ready against the MELPA repository to update the recipe, which I'll submit as a pull request if you merge these changes.
These changes supersede the other pull request I submitted recently. I realized belatedly that, in Emacs, operating on a buffer the way to go (rather than lists and strings as in the Python implementation). With these changes we do that by implementing
unidecode-unidecode
andunidecode-sanitize
in terms of the-region
variants.Please let me know if I can provide any additional information or if you'd like to see any changes.