1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-03 02:31:03 -08:00
emacs/test
Michal Nazarewicz 9342feecdd tildify.el: Fix matched group indexes in end-regex building
* lisp/textmodes/tildifi.el (tildify-find-env): When looking for
a start of an ignore-environment, the regex is built by
concatenating regexes of all the environments configured in
`tildify-ignored-environments-alist'.  So for example, the following
list could be used to match TeX's \verb and \verb* commands:

    (("\\\\verb\\(.\\)" . (1))
     ("\\\\verb\\*\\(.\\)" . (1)))

This would result in the following regex being used to find the start
of any of the variants of the \verb command:

    \\\\verb\\(.\\)\\|\\\\verb\\*\\(.\\)

But now, if “\\\\verb\\*\\(.\\)” matches, the first capture group
won't match anything, and thus (match-string 1) will be nil, which
will cause building of the end-matching regex to fail.

Fix this by using capture groups from the time when the opening
regexes are matched individually.

* tests/automated/tildify-tests.el (tildify-test-find-env-group-index-bug):
New test validating fix to the above bug.
2014-06-05 16:39:18 +02:00
..
automated tildify.el: Fix matched group indexes in end-regex building 2014-06-05 16:39:18 +02:00
cedet Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
indent * test/indent/ps-mode.ps: New file. 2014-05-27 10:28:07 -04:00
ChangeLog tildify.el: Fix matched group indexes in end-regex building 2014-06-05 16:39:18 +02:00
README
redisplay-testsuite.el Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
rmailmm.el Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00

This directory contains files intended to test various aspects of
Emacs's functionality.  Please help add tests!

(Also, see etc/compilation.txt for compilation mode font lock tests.)