magnars/clj-refactor.el — pull request #34 by benedekfazekas (2014-02-09 16:38:40+00:00)
Title: Removes requires if they are not referenced in the ns anymore

## Handles
- simple require
[clojure.string] looks for clojure.string/
- :as keyword
[clojure.string :as s] looks for s/ references
- :refer keyword
[clojure.string :refer [split join]] looks for fn-s in the refer list
- prefix list optionally combined with :as and :refer
[clojure string [set :as st :refer [difference union]]]
looks for clojure.string/, set/ and difference, union fn-s
- keeps require flags if they are present

## Known limitations
- not handling :refer :all (can't really do without repl or jvm)
but keeps them intact
- does not keep the whitespaces, can be considered as a feature

## Possible improvements
- want to proceed with import same way
- `cljr--remove-required` could be removed but that needs modification of `cljr--extract-ns-statements`