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

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

[elpa] master 36fb5e0 32/36: hydra.el (defhydra): Use copy-tree on heads


From: Oleh Krehel
Subject: [elpa] master 36fb5e0 32/36: hydra.el (defhydra): Use copy-tree on heads
Date: Sat, 22 Jul 2017 11:22:26 -0400 (EDT)

branch: master
commit 36fb5e0149795404d0271419fd4354ba58f81dbc
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>

    hydra.el (defhydra): Use copy-tree on heads
    
    Since HEADS arg will be modified by adding various properties, make a
    deep copy of it (`copy-sequence' is not enough).
    
    This solves the problem of using the same heads list for two different
    hydras, in a macro or otherwise.
    
    Fixes #230
---
 hydra.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hydra.el b/hydra.el
index 0fce192..79ee6f1 100644
--- a/hydra.el
+++ b/hydra.el
@@ -1155,6 +1155,7 @@ want to bind anything.  In that case, typically you will 
bind the
 generated NAME/body command.  This command is also the return
 result of `defhydra'."
   (declare (indent defun))
+  (setq heads (copy-tree heads))
   (cond ((stringp docstring))
         ((and (consp docstring)
               (memq (car docstring) '(hydra--table concat format)))



reply via email to

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