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

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

[nongnu] elpa/focus ffd97a5a36 56/82: Fix bug related to `post-command-h


From: ELPA Syncer
Subject: [nongnu] elpa/focus ffd97a5a36 56/82: Fix bug related to `post-command-hook`
Date: Tue, 6 Sep 2022 04:58:57 -0400 (EDT)

branch: elpa/focus
commit ffd97a5a3663103aa96945bb1d2f03481ab6229f
Author: Lars Tveito <larstvei@ifi.uio.no>
Commit: Lars Tveito <larstvei@ifi.uio.no>

    Fix bug related to `post-command-hook`
    
    The `post-command-hook` was made `permanent-local` in order to keep
    focus mode enabled when changing major mode. Other modes relies on the
    `post-command-hook` to be cleared on major mode change, causing
    problems. This fix rather uses the `permanent-local-hook` to tag
    functions that should not be removed from hooks.
    
    This fixes abo-abo/swiper#755. It might fix bugs I have not been able to
    reproduce, namely #10, #8 and a followup in #7.
---
 focus.el | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/focus.el b/focus.el
index 5ec37aa104..0bd5a5a95f 100644
--- a/focus.el
+++ b/focus.el
@@ -95,9 +95,15 @@ The timer calls `focus-read-only-hide-cursor' after
 (dolist (var '(focus-current-thing
                focus-pre-overlay
                focus-post-overlay
-               post-command-hook))
+               focus-mode
+               focus-read-only-mode))
   (put var 'permanent-local t))
 
+(dolist (var '(focus-read-only-cursor-blink
+               focus-read-only-terminate
+               focus-move-focus))
+  (put var 'permanent-local-hook t))
+
 (defun focus-any (f lst)
   "Apply F to each element of LST and return first NON-NIL."
   (when lst



reply via email to

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