[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/focus 58a91b29aa 34/82: Split focus-bounds into two functi
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/focus 58a91b29aa 34/82: Split focus-bounds into two functions |
Date: |
Tue, 6 Sep 2022 04:58:56 -0400 (EDT) |
branch: elpa/focus
commit 58a91b29aa414a24decb8bbe5adac41c3ac4624d
Author: Lars Tveito <larstvei@ifi.uio.no>
Commit: Lars Tveito <larstvei@ifi.uio.no>
Split focus-bounds into two functions
---
focus.el | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/focus.el b/focus.el
index fa22c87386..636d83ac3c 100644
--- a/focus.el
+++ b/focus.el
@@ -88,12 +88,15 @@ Things that are defined include `symbol', `list', `sexp',
(let ((v (funcall f (car lst))))
(if v v (focus-any f (cdr lst))))))
-(defun focus-bounds ()
- "Return the current bounds, based on `focus-mode-to-thing'."
+(defun focus-get-thing ()
+ "Return the current thing, based on `focus-mode-to-thing'."
(let* ((modes (mapcar 'car focus-mode-to-thing))
- (mode (focus-any 'derived-mode-p modes))
- (thing (if mode (cdr (assoc mode focus-mode-to-thing)) 'sentence)))
- (bounds-of-thing-at-point thing)))
+ (mode (focus-any 'derived-mode-p modes)))
+ (if mode (cdr (assoc mode focus-mode-to-thing)) 'sentence)))
+
+(defun focus-bounds ()
+ "Return the current bounds, based on `focus-get-thing'."
+ (bounds-of-thing-at-point (focus-get-thing)))
(defun focus-average-colors (color &rest colors)
"Takes an average of the colors given by argument.
- [nongnu] elpa/focus eeb12d8db8 19/82: Added function to generate color based on `focus-dimness', (continued)
- [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, 2022/09/06
- [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 <=
- [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
- [nongnu] elpa/focus 871f3c60ce 48/82: Fixed matching parenthesis, ELPA Syncer, 2022/09/06
- [nongnu] elpa/focus fe94e0de69 43/82: Split activation/deactivation into functions, ELPA Syncer, 2022/09/06
- [nongnu] elpa/focus 2fbf024c53 79/82: Fix bug introduced in d5631db, ELPA Syncer, 2022/09/06
- [nongnu] elpa/focus 6add57b887 59/82: Fix indentation, ELPA Syncer, 2022/09/06
- [nongnu] elpa/focus 563a3bd188 47/82: Updated README, ELPA Syncer, 2022/09/06
- [nongnu] elpa/focus d1bd81ee4d 39/82: Added focus-read-only-mode, ELPA Syncer, 2022/09/06
- [nongnu] elpa/focus 4c8391ea32 29/82: Fixed bug in defgroup, ELPA Syncer, 2022/09/06
- [nongnu] elpa/focus b21341bd40 38/82: Added function for briefly showing the cursor, ELPA Syncer, 2022/09/06