commit 5adc2cc9ee0da1be62afb10b2cec13423d882f8b parent 10ccc6052189fee8e1ff08da3340421bf5a7e3a9 Author: Wojciech Siewierski <wojciech@siewierski.eu> Date: Wed, 14 May 2025 02:55:59 +0200 Clean up the last-kbd-macro value storing and restoring Diffstat:
| M | kmacro-x-mc.el | | | 9 | ++------- |
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/kmacro-x-mc.el b/kmacro-x-mc.el @@ -404,10 +404,7 @@ user directory. ;; counter to restore them later. When `last-kbd-macro' is ;; nil, `kmacro-ring' isn't modified, no extra handling ;; is needed. - (setq-local kmacro-x-mc-stored-macro - (list last-kbd-macro - kmacro-counter - kmacro-counter-format-start)) + (setq-local kmacro-x-mc-stored-macro (kmacro-ring-head)) (setq last-kbd-macro nil)) (start-kbd-macro nil)) @@ -423,9 +420,7 @@ user directory. (when (bound-and-true-p kmacro-x-mc-stored-macro) ;; Restore the previous value of `last-kbd-macro' and its counter. - (setq last-kbd-macro (pop kmacro-x-mc-stored-macro) - kmacro-counter (pop kmacro-x-mc-stored-macro) - kmacro-counter-format-start (pop kmacro-x-mc-stored-macro)) + (kmacro-split-ring-element kmacro-x-mc-stored-macro) (kill-local-variable 'kmacro-x-mc-stored-macro))))