Skip to content

Instantly share code, notes, and snippets.

@mikedmcfarland
mikedmcfarland / js.el
Last active August 15, 2016 19:00
js toggle implementation
(defun js-jump-to (current from to format-name)
(find-file
(cl-loop with parts = (reverse current)
with fname = (file-name-sans-extension (cl-first parts))
for (name . rest) on (cl-rest parts)
until (string-equal name from)
collect name into names
finally (cl-return
(mapconcat 'identity
(nconc (reverse rest)