]> git.eshelyaron.com Git - emacs.git/commit
tildify.el: Optimise environments regexes
authorMichal Nazarewicz <mina86@mina86.com>
Thu, 5 Jun 2014 14:41:32 +0000 (16:41 +0200)
committerMichal Nazarewicz <mina86@mina86.com>
Thu, 5 Jun 2014 14:41:32 +0000 (16:41 +0200)
commitdf344ab435c04aea5bb9261e6d2c349ab8f4fcea
tree21cf280112e529fbdccb722e27a80ef1e881c374
parenteb54c73a9d26325f691589a0dce561b124a50c70
tildify.el: Optimise environments regexes

* lisp/textmodes/tildify.el (tildify-ignored-environments-alist):
Each time beginning of an environment to ignore is found,
`tildify-find-env' needs to identify regexp for the ending
of the environment.  This is done by trying all the opening
regexes on matched text in a loop, so to speed that up, this
loop should have fewer things to match, which can be done by
using alternatives in the opening regexes.

Coincidentally, this should make matching of the opening
regexp faster as well thanks to the use of `regexp-opt' and
having common prefix pulled from many regexes.
lisp/ChangeLog
lisp/textmodes/tildify.el