Giter VIP home page Giter VIP logo

are's Introduction

Additional Regexp Engines (for Emacs)

are is a dynamic module for Emacs that implements support for additional regular expression engines. PCRE2 is currently the only supported engine, but it should be easy to add more engines (see src/are_pcre2.c for a starting point).

The idea is to reimplement commonly used Emacs functions for working with regular expressions in a compatible manner. This should allow users to override regexp functions through the use of advice or let-bindings.

Status

These functions have been implemented:

EmacsARE
hi-lock-face-bufferare-hi-lock-face-buffer
hi-lock-unface-bufferare-hi-lock-unface-buffer
isearch-forward-regexpare-isearch-forward-regexp
isearch-backward-regexpare-isearch-backward-regexp
occurare-occur
looking-atare-looking-at
looking-at-pare-looking-at-p
re-search-backwardare-re-search-backward
re-search-forwardare-re-search-forward
string-matchare-string-match
string-match-pare-string-match-p

Installation

To install the required dependencies on a Debian-based system:

$ sudo apt-get install automake libtool uthash-dev libpcre2-dev

And to install are in $HOME/.emacs.d/are:

$ ./autogen
$ ./configure --prefix="$HOME/.emacs.d/are"
$ make
$ make install

Usage

Assuming that are was installed in $HOME/.emacs.d/are:

(add-to-list 'load-path "~/emacs.d/are/lib")
(add-to-list 'load-path "~/emacs.d/are/share/are")

(require 'are)

;; This is required to enable are-specific advice.  They should never
;; interfere with the non-are versions of the relevant functions.  If
;; they do, please send a bug report!
(are-mode t)

;; Example bindings.
(define-key (current-global-map) (kbd "C-c h") #'are-hi-lock-face-buffer)
(define-key (current-global-map) (kbd "C-r") #'are-isearch-backward-regexp)
(define-key (current-global-map) (kbd "C-s") #'are-isearch-forward-regexp)
(define-key (current-global-map) (kbd "M-s o") #'are-occur)

are's People

Contributors

illikainen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.