[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/focus 3fafdc7947 62/82: Allow explicitly setting derived m
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/focus 3fafdc7947 62/82: Allow explicitly setting derived modes in focus-mode-to-thing |
Date: |
Tue, 6 Sep 2022 04:58:58 -0400 (EDT) |
branch: elpa/focus
commit 3fafdc79475957a770832df5a757201e7df867b2
Author: dieggsy <diegoamundo@protonmail.com>
Commit: dieggsy <diegoamundo@protonmail.com>
Allow explicitly setting derived modes in focus-mode-to-thing
Previously, a value for focus-mode-to-thing like:
'((prog-mode . defun)
(text-mode . sentence)
(org-mode . paragraph))
Wouldn't work, since org-mode is dervied from text-mode. Now
focus-get-thing checks if the current mode is explicitly in
focus-mode-to-thing before checking if it's a derived mode.
---
focus.el | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/focus.el b/focus.el
index 80cda30f5e..008da69173 100644
--- a/focus.el
+++ b/focus.el
@@ -108,7 +108,8 @@ The timer calls `focus-read-only-hide-cursor' after
"Return the current thing, based on `focus-mode-to-thing'."
(or focus-current-thing
(let* ((modes (mapcar 'car focus-mode-to-thing))
- (mode (focus-any 'derived-mode-p modes)))
+ (mode (or (cl-find major-mode modes)
+ (focus-any 'derived-mode-p modes))))
(if mode (cdr (assoc mode focus-mode-to-thing)) 'sentence))))
(defun focus-bounds ()
- [nongnu] elpa/focus 307df45c69 51/82: Fix #5, (continued)
- [nongnu] elpa/focus 307df45c69 51/82: Fix #5, ELPA Syncer, 2022/09/06
- [nongnu] elpa/focus 3013760ef0 12/82: Resizing did not work, retry!, ELPA Syncer, 2022/09/06
- [nongnu] elpa/focus ff93c948da 26/82: Added defgroup, ELPA Syncer, 2022/09/06
- [nongnu] elpa/focus 6a6da19b00 09/82: Fixed image names, ELPA Syncer, 2022/09/06
- [nongnu] elpa/focus 741a945866 55/82: Merge branch 'syohex-cl-lib', ELPA Syncer, 2022/09/06
- [nongnu] elpa/focus b4fb132314 23/82: Changing modes should not affect Focus mode, ELPA Syncer, 2022/09/06
- [nongnu] elpa/focus 809697ba52 25/82: Changed paragraph to sections, ELPA Syncer, 2022/09/06
- [nongnu] elpa/focus 27eda82b95 40/82: Binding for enabling focus-read-only-mode in focus-mode, ELPA Syncer, 2022/09/06
- [nongnu] elpa/focus eeb12d8db8 19/82: Added function to generate color based on `focus-dimness', ELPA Syncer, 2022/09/06
- [nongnu] elpa/focus 500bab4833 13/82: Yet another try, ELPA Syncer, 2022/09/06
- [nongnu] elpa/focus 3fafdc7947 62/82: Allow explicitly setting derived modes in focus-mode-to-thing,
ELPA Syncer <=
- [nongnu] elpa/focus 9a5cf4f972 77/82: Formatting, ELPA Syncer, 2022/09/06
- [nongnu] elpa/focus 663205443c 21/82: Forgot to rename variables everywhere, ELPA Syncer, 2022/09/06
- [nongnu] elpa/focus 4d31363bf9 54/82: Use cl-lib function instead of cl.el, ELPA Syncer, 2022/09/06
- [nongnu] elpa/focus af9fbfd9cb 06/82: Changed name and added header, ELPA Syncer, 2022/09/06
- [nongnu] elpa/focus 02cec3494d 01/82: Initial commit, ELPA Syncer, 2022/09/06
- [nongnu] elpa/focus e691113e4b 03/82: Moved init/termination to separate functions, ELPA Syncer, 2022/09/06
- [nongnu] elpa/focus 284a1240ce 33/82: Cleaned up doc in `focus-average-colors', ELPA Syncer, 2022/09/06
- [nongnu] elpa/focus 58a91b29aa 34/82: Split focus-bounds into two functions, ELPA Syncer, 2022/09/06
- [nongnu] elpa/focus ac711fe13a 35/82: Whitespace cleanup, ELPA Syncer, 2022/09/06
- [nongnu] elpa/focus 35f3cf5d52 20/82: Use things as defined in thingatpt as bounds, ELPA Syncer, 2022/09/06