ffap-string-at-point: Limit max length of active region
commitc336420d9f2ffe5270d7deec360d84e1f45b4a55
authorTino Calancha <tino.calancha@gmail.com>
Fri, 30 Dec 2016 06:31:01 +0000 (30 15:31 +0900)
committerTino Calancha <tino.calancha@gmail.com>
Fri, 30 Dec 2016 06:31:01 +0000 (30 15:31 +0900)
treeedbab7c255781c4963da04896c90bc706c90c104
parent9672f2c916b5909cc5836f67edc4d66842cce7cd
ffap-string-at-point: Limit max length of active region

Prevents that 'ffap-guesser' waste time checking large strings
which are likely not valid candidates (Bug#25243).
* lisp/ffap.el (ffap-max-region-length): New variable.
(ffap-string-at-point): Use it.
* test/lisp/ffap-tests.el: New test suite.
(ffap-tests-25243): Add test for this bug.
lisp/ffap.el
test/lisp/ffap-tests.el [new file with mode: 0644]