Skip to content

Instantly share code, notes, and snippets.

@syohex
Created November 7, 2011 15:29
Show Gist options
  • Save syohex/1345277 to your computer and use it in GitHub Desktop.
Save syohex/1345277 to your computer and use it in GitHub Desktop.
use or require しているモジュールを保管する
(defun my/imported-modules ()
(interactive)
(let (imported-modules)
(save-excursion
(goto-char (point-min))
(while (re-search-forward "\\(use\\|require\\) +\\([^;]+\\);" nil t)
(push (list (buffer-substring-no-properties (match-beginning 2) (match-end 2)))
imported-modules)
(setq tms imported-modules))
(completing-read "what module? : " imported-modules))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment