Home

Awesome

Parinfer in Emacs Lisp Build Status

A Parinfer implementation in Emacs Lisp.

About

Having a Parinfer implementation written in Emacs Lisp allows Parinfer to reach Emacs users easily.

Please note that this project is solely for the library that implements the core Parinfer algorithm; it is not an Emacs extension that can be used for editing.

This is basically a 1-to-1 port of parinfer.js.

The .json files in the tests folder are copied directly from the main Parinfer repo.

This is my first Emacs Lisp project. There is likely lots of room for improvement in this implementation. PR's welcome :)

Usage

This library is namespaced under parinferlib.

It is expected that extension authors will use the namespace parinfer

It exposes two public functions:

txt should be a string of the text you want to process. Optional options should be a Property List (plist) with the following keys:

The return value is a plist with keys:

This library closely mirrors the parinfer.js API. Please see there for more information.

Usage examples can be found in test.el and perf.el.

Development

To run tests:

emacs --script test.el

To test performance:

emacs --script perf.el

License

ISC License