]> git.eshelyaron.com Git - emacs.git/commit
Improve ffap-gopher-at-point handling of long lines
authorNoam Postavsky <npostavs@gmail.com>
Sun, 8 Jan 2017 23:19:32 +0000 (18:19 -0500)
committerNoam Postavsky <npostavs@gmail.com>
Sun, 15 Jan 2017 18:04:54 +0000 (13:04 -0500)
commitfd6b829d91da73a945643b5916ee6d79c992e030
tree5759b3099ad52bdf3fb80948a12973d349981b2f
parentaf3db69ee640d9a1e9027c04ba3b5bec7c2681ab
Improve ffap-gopher-at-point handling of long lines

* lisp/ffap.el (ffap-gopher-regexp): Only match the KEY part.  Note
setting to nil is now supported.
(ffap--gopher-var-on-line): New function.
(ffap-gopher-at-point): Use it instead of the old ffap-gopher-regexp
which could overflow the regexp stack on long lines (Bug#25391).  Use
`let-alist' instead of calling `set' on local variables.
* test/lisp/ffap-tests.el (ffap-gopher-at-point): New test.
lisp/ffap.el
test/lisp/ffap-tests.el