]> git.eshelyaron.com Git - emacs.git/commit
Do not include comment start chars in ffap string
authorKaushal Modi <kaushal.modi@gmail.com>
Fri, 17 Mar 2017 22:03:23 +0000 (18:03 -0400)
committerNoam Postavsky <npostavs@gmail.com>
Thu, 23 Mar 2017 12:57:13 +0000 (08:57 -0400)
commite472cfe8f3b01f29a49614f6207e4128e8b36b8c
treeb182bf3006a1e1e23f977f3fe64ce59cb7288474
parentfe3af8d4f2a4cd67958f76d1b708e8a78e68cd4f
Do not include comment start chars in ffap string

* lisp/ffap.el (ffap-string-at-point): If the point is in a comment,
ensure that the returned string does not contain the comment start
characters (especially for major modes that have '//' as comment start
characters).  Otherwise, in a major mode like c-mode, with `ido-mode'
enabled and `ido-use-filename-at-point' set to `guess', doing "C-x
C-f" on a "//foo" comment will initiate an attempt to access a path
"//foo" (Bug#24057).

Co-authored-by: Noam Postavsky <npostavs@gmail.com>
lisp/ffap.el