Skip to content

Commit

Permalink
[#67] Always use a *node-group*.
Browse files Browse the repository at this point in the history
  • Loading branch information
jfacorro committed Mar 1, 2015
1 parent 7e34dd3 commit 8613f15
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
all:
lein build

clean:
lein clean

install:
cp target/lab.jar /usr/local/bin/.
printf "#! /bin/bash\njava -jar /usr/local/bin/lab.jar &" > /usr/local/bin/clojure-lab
chmod +x /usr/local/bin/clojure-lab
chmod 666 /usr/local/bin/lab.jar
2 changes: 1 addition & 1 deletion src/clj/lab/core/lang.clj
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ check if its one of the registered symbols."
"Parses the incremental buffer of a Document and returns the
parse tree with the modified nodes marked with node group-id."
([doc]
(parse-tree doc nil))
(parse-tree doc (gensym "group-")))
([doc group-id]
(binding [*node-group* group-id]
(p/parse-tree doc))))
Expand Down
5 changes: 3 additions & 2 deletions src/clj/lab/core/plugin.clj
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,10 @@ they exist."
[app plugin-name & [reload]]
(require [plugin-name :reload reload])
(let [plugin-ns (the-ns plugin-name)
plugin (ns-resolve plugin-ns 'plugin)
_ (assert plugin (str "Couldn't find a plugin definition in " plugin-name "."))
{:keys [init! hooks keymaps] :as plugin}
(->> (ns-resolve plugin-ns 'plugin) deref)]
(assert plugin (str "Couldn't find a plugin definition in " plugin-name "."))
@plugin]
(log/info "Loaded plugin " plugin-name)
(when (register-plugin! app plugin)
(log/info "Registered plugin " plugin-name)
Expand Down
2 changes: 1 addition & 1 deletion src/clj/lab/plugin/editor/syntax_highlighting.clj
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ are applied their highlight."
editor)

(defn- text-editor-change! [e]
(if-not (= :change (:type e))
(when-not (= :change (:type e))
(highlight! (:source e) true)))

(defn- text-editor-init [editor]
Expand Down

0 comments on commit 8613f15

Please sign in to comment.