Skip to content

Commit 654deab

Browse files
authored
Add copy in el-patch-literal (#74)
1 parent 92803e7 commit 654deab

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog].
55

6+
## Unreleased
7+
### Bugs fixed
8+
* Using `el-patch-literal` could result in incorrect patch generation
9+
in some cases. This is fixed.
10+
611
## 3.1 (released 2023-11-23)
712
### Features
813
* New user option `el-patch-use-advice` which can be customized to

el-patch.el

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ Return a list of forms to be spliced into the surrounding
250250
s-expression. Resolve in favor of the original version if NEW is
251251
nil; otherwise resolve in favor of the new version. TABLE is a
252252
hash table of `el-patch-let' bindings, which maps symbols to
253-
their bindings."
253+
their bindings. The return value may be destructively modified."
254254
(let ((table (or table (make-hash-table :test 'equal))))
255255
(cond
256256
((consp form)
@@ -344,7 +344,7 @@ their bindings."
344344
(when (<= (length form) 1)
345345
(error "Not enough arguments (%d) for `el-patch-literal'"
346346
(1- (length form))))
347-
(cdr form))
347+
(el-patch--copy-semitree (cdr form)))
348348
((quote el-patch-concat)
349349
(when (<= (length form) 1)
350350
(error "Not enough arguments (%d) for `el-patch-concat'"

0 commit comments

Comments
 (0)