Commit 2d67af4
In the following case:
* there are more than one occurrences of an expression
* and `move-to-let` is not initiated from the last occurrence
* and the actual bound name is longer than the expression being moved to `let`
the last expression won't be replaced.
The solution: the end of the `let` expression is not cached before calling `clojure--replace-sexps-with-binding`.
1 parent 21160d3 commit 2d67af4
File tree
3 files changed
+26
-8
lines changed- test
3 files changed
+26
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2213 | 2213 | | |
2214 | 2214 | | |
2215 | 2215 | | |
2216 | | - | |
| 2216 | + | |
2217 | 2217 | | |
2218 | | - | |
| 2218 | + | |
| 2219 | + | |
| 2220 | + | |
| 2221 | + | |
2219 | 2222 | | |
2220 | 2223 | | |
2221 | | - | |
| 2224 | + | |
2222 | 2225 | | |
2223 | | - | |
| 2226 | + | |
2224 | 2227 | | |
2225 | 2228 | | |
2226 | 2229 | | |
2227 | | - | |
2228 | | - | |
| 2230 | + | |
| 2231 | + | |
2229 | 2232 | | |
2230 | 2233 | | |
2231 | 2234 | | |
2232 | | - | |
2233 | | - | |
| 2235 | + | |
2234 | 2236 | | |
2235 | 2237 | | |
2236 | 2238 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
167 | 182 | | |
168 | 183 | | |
169 | 184 | | |
| |||
0 commit comments