[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
- [nongnu] elpa/focus 01a7a95334 27/82: Changed paragraph to section in README, (continued)
- [nongnu] elpa/focus 01a7a95334 27/82: Changed paragraph to section in README, ELPA Syncer, 2022/09/06
- [nongnu] elpa/focus cd2aad5590 31/82: Cleaned up focus-dimness docstring, ELPA Syncer, 2022/09/06
- [nongnu] elpa/focus 5753e25fdf 30/82: fixed the focus-average-colors docstring, ELPA Syncer, 2022/09/06
- [nongnu] elpa/focus fee47bc7c9 11/82: Decrease the width of the gifs, ELPA Syncer, 2022/09/06
- [nongnu] elpa/focus abad47f1c4 53/82: Add functions to pin/unpin the focused section, ELPA Syncer, 2022/09/06
- [nongnu] elpa/focus 3a2c4f1198 67/82: Merge pull request #19 from jcs-PR/master, ELPA Syncer, 2022/09/06
- [nongnu] elpa/focus a723f78dc4 37/82: Added function for hiding the cursor, ELPA Syncer, 2022/09/06
- [nongnu] elpa/focus d5631db0b6 73/82: Remove `face`-suffix from faces, ELPA Syncer, 2022/09/06
- [nongnu] elpa/focus 5bddbbb7d3 22/82: Remove newline, ELPA Syncer, 2022/09/06
- [nongnu] elpa/focus cfb1672fca 76/82: Merge pull request #22 from larstvei/focus-face, ELPA Syncer, 2022/09/06
- [nongnu] elpa/focus ffd97a5a36 56/82: Fix bug related to `post-command-hook`,
ELPA Syncer <=
- [nongnu] elpa/focus 045ee6175e 63/82: Remove focus-any and simply apply derived-mode-p, ELPA Syncer, 2022/09/06
- [nongnu] elpa/focus 0f2a9945e9 66/82: Fixed some flycheck warnings., ELPA Syncer, 2022/09/06
- [nongnu] elpa/focus 1423efbd25 42/82: Don't assume bounds are found, ELPA Syncer, 2022/09/06
- [nongnu] elpa/focus 19b3c7b348 70/82: Just use a face for customizing the unfocused region, ELPA Syncer, 2022/09/06
- [nongnu] elpa/focus bfb6aaf8ad 57/82: Don't persist focus mode across major mode change, ELPA Syncer, 2022/09/06
- [nongnu] elpa/focus a84ade00a2 61/82: Addresses #13, ELPA Syncer, 2022/09/06
- [nongnu] elpa/focus f193014150 15/82: Did not work, back to static width, ELPA Syncer, 2022/09/06
- [nongnu] elpa/focus ef5f7fc892 45/82: Cleaned up `focus-next-thing' and `focus-prev-thing', ELPA Syncer, 2022/09/06
- [nongnu] elpa/focus e9e841aed4 78/82: Remove sentence, ELPA Syncer, 2022/09/06
- [nongnu] elpa/focus f058bd163d 64/82: Fixed compile warnings., ELPA Syncer, 2022/09/06