mirror of
https://github.com/magnars/multiple-cursors.el.git
synced 2025-10-13 13:03:03 +00:00
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
This commit is contained in:
parent
07b88080b1
commit
84ab4ee26a
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user