Permalink
Browse files

Fix usage of static list element in magit-key-mode.el

When using '(actions) there is only one list shared among all key
groups. You can think of it as an `static' function local variable in
C. The solution is to use (list 'actions) which instanciates a new
list on every function call.
  • Loading branch information...
1 parent 65f45be commit cfcc7bd4afefbfc0dac27f28a39be9f6bad76920 @stettberger stettberger committed Feb 7, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 magit-key-mode.el
View
@@ -176,7 +176,7 @@ and put in its place an empty one of the same name."
(when (assoc group magit-key-mode-groups)
(magit-key-mode-delete-group group))
(setq magit-key-mode-groups
- (cons (list group '(actions)) magit-key-mode-groups)))
+ (cons (list group (list 'actions)) magit-key-mode-groups)))
(defun magit-key-mode-key-defined-p (for-group key)
"If KEY is defined as any of switch, argument or action within

0 comments on commit cfcc7bd

Please sign in to comment.