From b4fb132314bbc04638d442ba546aa576a12d197d Mon Sep 17 00:00:00 2001 From: Lars Tveito Date: Sun, 17 May 2015 01:32:32 +0200 Subject: [PATCH] Changing modes should not affect Focus mode --- focus.el | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/focus.el b/focus.el index e1d1ce6..885c9e0 100644 --- a/focus.el +++ b/focus.el @@ -65,6 +65,12 @@ Things that are defined include `symbol', `list', `sexp', (defvar-local focus-post-overlay nil "The overlay that dims the text past the current-point.") +;; Changing major-mode should not affect Focus mode. +(dolist (var '(focus-pre-overlay + focus-post-overlay + post-command-hook)) + (put var 'permanent-local t)) + (defun focus-any (f lst) "This function takes a function and a list, and returns the first NON-NIL value from applying F to an element in LST."