diff options
author | dickmao <none> | 2020-10-19 11:56:36 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2020-10-19 11:56:49 +0200 |
commit | 8cdbd84ebe72091ed02984ce85e9a3c4fbad7c54 (patch) | |
tree | 84f003dd7744cbbf674850b5f4688fe952791f20 /lisp/ffap.el | |
parent | 1f6f09c85bb5ec4d450edac910183345f3fdc500 (diff) | |
download | emacs-8cdbd84ebe72091ed02984ce85e9a3c4fbad7c54.tar.gz emacs-8cdbd84ebe72091ed02984ce85e9a3c4fbad7c54.tar.bz2 emacs-8cdbd84ebe72091ed02984ce85e9a3c4fbad7c54.zip |
`ffap-gopher-at-point' interminable without newlines
* lisp/ffap.el (ffap-gopher-at-point): Stop when we get to the end
of the buffer.
* test/lisp/ffap-tests.el (ffap-test-no-newlines): Ensure
termination for corner case (bug#44048).
Diffstat (limited to 'lisp/ffap.el')
-rw-r--r-- | lisp/ffap.el | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/ffap.el b/lisp/ffap.el index ccba2911445..2c1d3d5bd9d 100644 --- a/lisp/ffap.el +++ b/lisp/ffap.el @@ -1383,7 +1383,8 @@ Sets the variable `ffap-string-at-point-region' to the bounds of URL, if any." (point))) (bookmark (cl-loop for keyval = (ffap--gopher-var-on-line) while keyval collect keyval - do (forward-line 1)))) + do (forward-line 1) + until (eobp)))) (when bookmark (setq ffap-string-at-point-region (list beg (point))) (let-alist (nconc bookmark '((type . "1") (port . "70"))) |