summaryrefslogtreecommitdiffstats
path: root/emacs
diff options
context:
space:
mode:
Diffstat (limited to 'emacs')
-rw-r--r--emacs/.emacs.d/init.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/emacs/.emacs.d/init.el b/emacs/.emacs.d/init.el
index 24a31f2..a4bab9a 100644
--- a/emacs/.emacs.d/init.el
+++ b/emacs/.emacs.d/init.el
@@ -122,7 +122,8 @@ MODE1 is enabled and vice-versa."
(defun ,function-name ()
,(concat "Toggle `" mode2-name
"' according to the inverse of `" mode1-name "'.")
- (,mode2 (or (not ,mode1) -1)))
+ (let ((mode ',mode2))
+ (funcall mode (or (not ,mode1) -1))))
(add-hook ',(intern (concat mode1-name "-hook"))
#',function-name))))