branch: elpa/multiple-cursors
commit 84ab4ee26a3bfe84c0b8de40bc923660f289077f
Author: Takafumi Arakaki <[email protected]>
Commit: Takafumi Arakaki <[email protected]>
Fix mc/dump-list (take 2): it looses old setting
In the old code, heading part of `value` may lost due to in-place
modification by the `sort` function. ``(symbol-value list-symbol)``
must be re-evaluated before passing it to `mapc`. To do that,
simply replacing `let` to `symbol-macrolet` works.
See also: #40
---
multiple-cursors-core.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/multiple-cursors-core.el b/multiple-cursors-core.el
index 485aa20..5a37526 100644
--- a/multiple-cursors-core.el
+++ b/multiple-cursors-core.el
@@ -505,7 +505,7 @@ for running commands with multiple cursors.")
(defun mc/dump-list (list-symbol)
"Insert (setq 'LIST-SYMBOL LIST-VALUE) to current buffer."
- (let ((value (symbol-value list-symbol)))
+ (symbol-macrolet ((value (symbol-value list-symbol)))
(insert "(setq " (symbol-name list-symbol) "\n"
" '(")
(newline-and-indent)