diff options
| author | Michal Nazarewicz | 2014-06-05 16:39:18 +0200 |
|---|---|---|
| committer | Michal Nazarewicz | 2014-06-05 16:39:18 +0200 |
| commit | 9342feecdd92b769b1f45a6feea8ad34985c5049 (patch) | |
| tree | 5be0d974eccfc0bb98effbe6735cb29271f13d69 /test/ChangeLog | |
| parent | af9a3b28c0ca250ed245bd54c8737792916fe4c6 (diff) | |
| download | emacs-9342feecdd92b769b1f45a6feea8ad34985c5049.tar.gz emacs-9342feecdd92b769b1f45a6feea8ad34985c5049.zip | |
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.
Diffstat (limited to 'test/ChangeLog')
| -rw-r--r-- | test/ChangeLog | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/ChangeLog b/test/ChangeLog index db32aae578b..93ef0980c9a 100644 --- a/test/ChangeLog +++ b/test/ChangeLog | |||
| @@ -1,5 +1,9 @@ | |||
| 1 | 2014-06-05 Michal Nazarewicz <mina86@mina86.com> | 1 | 2014-06-05 Michal Nazarewicz <mina86@mina86.com> |
| 2 | 2 | ||
| 3 | * automated/tildify-tests.el (tildify-test-find-env-group-index-bug): | ||
| 4 | New test checking end-regex building when multiple environment pairs | ||
| 5 | use integers to refer to capture groups. | ||
| 6 | |||
| 3 | * automated/tildify-tests.el (tildify-test-find-env-end-re-bug): New | 7 | * automated/tildify-tests.el (tildify-test-find-env-end-re-bug): New |
| 4 | test checking end-regex building in `tildify-find-env' function when | 8 | test checking end-regex building in `tildify-find-env' function when |
| 5 | integers (denoting capture groups) and strings are mixed together. | 9 | integers (denoting capture groups) and strings are mixed together. |