commercialhaskell / stack-ide

Stack-based JSON interface to ide-backend
98 stars 23 forks source link

Make it possible to jump back from M-. #80

Closed rjmac closed 8 years ago

rjmac commented 8 years ago

SLIME uses etags' tag-marker ring in the function which is called from its version of M-. in order to use etags' facilities for popping back to where you were. This does the same.

Something I'm unsure of: the positioning of the ring-insert call. stack-mode-goto-span's docstring talks about it as if it's a pure function for extracting parts of a span, even though it actually does the jump. I think that's a docstring bug? If so I'll add a commit to fix that.

chrisdone commented 8 years ago

Yeah, bad docstring.

chrisdone commented 8 years ago

Thanks, I implemented this functionality in haskell-mode once before, hadn't gotten round to it yet.