Skip to content

Instantly share code, notes, and snippets.

View quasi's full-sized avatar

quasi quasi

View GitHub Profile
@quasi
quasi / js-function-lookup.el
Last active January 2, 2016 08:59
For js2-mode, to go to function definition and back. I sorely missed the M-. and M-, from SLIME.
;;; Find JS function definition in your current buffer (and go back).
(defvar *quasi-js-current-pos* nil)
(defun quasi-js-function-search ()
"Search for JS function definations. In a rather dumb way, but works, albeit only for current buffer.
Works recurcively too :)"
(interactive)
(let ((text (thing-at-point 'word)))
(push (point) *quasi-js-current-pos*)