Skip to content

Commit 2c1105f

Browse files
committedOct 1, 2021
Merge branch 'develop'
2 parents 22f62e9 + c1f4980 commit 2c1105f

File tree

4 files changed

+6
-14
lines changed

4 files changed

+6
-14
lines changed
 

‎README.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Use your favourite plugin manager, mine is https://github.com/junegunn/vim-plug[
5454

5555
[source,viml]
5656
----
57-
Plug 'Olical/conjure', {'tag': 'v4.24.0'}
57+
Plug 'Olical/conjure', {'tag': 'v4.24.1'}
5858
----
5959

6060
You'll need to be on the latest stable Neovim for all of the features (such as floating windows) to work. If you see errors, please check your Neovim version before raising an issue.

‎lua/conjure/aniseed/compile.lua

+1-5
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,12 @@ local marker_prefix = "ANISEED_"
4040
_2amodule_2a["marker-prefix"] = marker_prefix
4141
local delete_marker = (marker_prefix .. "DELETE_ME")
4242
do end (_2amodule_2a)["delete-marker"] = delete_marker
43-
local replace_marker = (marker_prefix .. "REPLACE_ME")
44-
do end (_2amodule_2a)["replace-marker"] = replace_marker
4543
local delete_marker_pat = ("\n[^\n]-\"" .. delete_marker .. "\".-")
4644
do end (_2amodule_locals_2a)["delete-marker-pat"] = delete_marker_pat
47-
local replace_marker_pat = ("\n[^\n]-\"" .. replace_marker .. "\".-")
48-
do end (_2amodule_locals_2a)["replace-marker-pat"] = replace_marker_pat
4945
local function str(code, opts)
5046
local fnl = fennel.impl()
5147
local function _5_()
52-
return string.gsub(string.gsub(string.gsub(string.gsub(fnl.compileString(macros_prefix(code, opts), a.merge({allowedGlobals = false, compilerEnv = _G}, opts)), (delete_marker_pat .. "\n"), "\n"), (delete_marker_pat .. "$"), ""), (replace_marker_pat .. "\n"), "*module*\n"), (replace_marker_pat .. "$"), "*module*")
48+
return string.gsub(string.gsub(fnl.compileString(macros_prefix(code, opts), a.merge({allowedGlobals = false, compilerEnv = _G}, opts)), (delete_marker_pat .. "\n"), "\n"), (delete_marker_pat .. "$"), "")
5349
end
5450
return xpcall(_5_, fnl.traceback)
5551
end

‎lua/conjure/aniseed/deps/fennel.lua

+3-2
Original file line numberDiff line numberDiff line change
@@ -1547,6 +1547,7 @@ package.preload["conjure.aniseed.fennel.specials"] = package.preload["conjure.an
15471547
do
15481548
local _451_ = utils.copy(utils.root.options)
15491549
do end (_451_)["env"] = "_COMPILER"
1550+
_451_["requireAsInclude"] = false
15501551
_451_["allowedGlobals"] = nil
15511552
opts = _451_
15521553
end
@@ -4181,7 +4182,7 @@ do
41814182
Same as ->, except splices the value into the last position of each form
41824183
rather than the first."
41834184
(var x val)
4184-
(each [_ e (pairs [...])]
4185+
(each [_ e (ipairs [...])]
41854186
(let [elt (if (list? e) e (list e))]
41864187
(table.insert elt x)
41874188
(set x elt)))
@@ -4234,7 +4235,7 @@ do
42344235
"Evaluates val and splices it into the first argument of subsequent forms."
42354236
(let [name (gensym)
42364237
form `(let [,name ,val])]
4237-
(each [_ elt (pairs [...])]
4238+
(each [_ elt (ipairs [...])]
42384239
(table.insert elt 2 name)
42394240
(table.insert form elt))
42404241
(table.insert form name)

‎lua/conjure/aniseed/macros.fnl

+1-6
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,6 @@
3535
;; This marker can be used by a post-processor to delete a useless byproduct line.
3636
(local delete-marker :ANISEED_DELETE_ME)
3737

38-
;; And this one replaces the given block with *module*!
39-
(local replace-marker :ANISEED_REPLACE_ME)
40-
4138
;; We store all locals under this for later splatting.
4239
(local locals-key :aniseed/locals)
4340

@@ -67,9 +64,7 @@
6764

6865
;; The final result table that gets returned from the macro.
6966
;; This is the best way I've found to introduce many (local ...) forms from one macro.
70-
result `[,(if existing-mod
71-
replace-marker
72-
delete-marker)
67+
result `[,delete-marker
7368

7469
;; We can't refer to things like (local (foo bar) (10 foo)).
7570
;; So we need to define them in an earlier local.

0 commit comments

Comments
 (0)
Please sign in to comment.