emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/multiple-cursors 84ab4ee 196/434: Fix mc/dump-list (take 2


From: ELPA Syncer
Subject: [nongnu] elpa/multiple-cursors 84ab4ee 196/434: Fix mc/dump-list (take 2): it looses old setting
Date: Sat, 7 Aug 2021 09:20:24 -0400 (EDT)

branch: elpa/multiple-cursors
commit 84ab4ee26a3bfe84c0b8de40bc923660f289077f
Author: Takafumi Arakaki <aka.tkf@gmail.com>
Commit: Takafumi Arakaki <aka.tkf@gmail.com>

    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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]