Commit Graph

62 Commits

Author SHA1 Message Date
grtcdr
29b412b209
Fix compilation warnings
Compiling focus results in compilation warnings relating to two
functions from the `org-element' library. We can tell the byte compiler
where those functions are located without explicitly requiring the
libraries.
2024-10-29 16:06:52 +01:00
Florian Rommel
74e0a30f08 Delay updating the focus until Emacs is idle
This improves responsiveness, especially during scrolling.
2024-05-28 01:00:04 +02:00
Florian Rommel
fe50fbeb2b Cache current thing to focus
Avoid calculating the thing to focus on every update.
2024-05-19 23:24:53 +02:00
2507ec4ec5 Bump version
Ref #26
2022-10-16 20:46:39 +02:00
9dd85fc474 Fix compiler warning introduced at 2086fee 2022-09-10 15:00:20 +02:00
b30ead247d Let focus-unfocused inherit from shadow by default
Addresses #27.
2022-09-10 14:09:24 +02:00
2086fee8fc Add special support for org mode 2022-09-10 14:03:53 +02:00
Philip Kaludercic
02eeb16e26
Fix checkdoc issues 2022-09-06 10:28:54 +02:00
Philip K
e9ab37b865
Improved user option types 2020-04-27 18:01:58 +00:00
5f3f20e7f2 Bump version 2019-12-09 23:10:50 +01:00
2fbf024c53 Fix bug introduced in d5631db 2019-12-09 12:35:28 +01:00
cbba87b062 Trim candidate list of *things* 2019-12-04 16:34:11 +01:00
d5631db0b6 Remove face-suffix from faces 2019-12-04 16:33:56 +01:00
246eaeb8d1 Define faces for the unfocused and focused regions 2019-12-03 23:16:37 +01:00
a80b7b6eba Add possibility of customizing the face of the focused region 2019-12-03 22:59:28 +01:00
19b3c7b348 Just use a face for customizing the unfocused region
Use font-lock-comment-face as a default. Maybe this fixes #21?
2019-12-03 14:11:18 +01:00
bf5fcff0d0 Allow setting a color for dimmed text. Fixes #21 2019-12-03 01:42:14 +01:00
zsxh
ab42b87799 Fix buffer-local variables definition
Define focus-current-thing, focus-buffer, focus-pre-overlay,
focus-post-overlay, focus-read-only-blink-timer as buffer-local variable
2019-03-18 10:42:47 +08:00
jenchieh
0f2a9945e9 Fixed some flycheck warnings. 2019-03-09 22:05:51 +08:00
jenchieh
aa5ea31118 Fixed package lint warnings. 2019-03-09 22:01:43 +08:00
jenchieh
f058bd163d Fixed compile warnings. 2019-03-09 21:59:30 +08:00
dieggsy
045ee6175e
Remove focus-any and simply apply derived-mode-p
It already takes multiple modes as arguments, removing the need for
focus-any.
2017-12-04 00:03:32 -05:00
dieggsy
3fafdc7947
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.
2017-12-03 23:59:12 -05:00
a84ade00a2 Addresses #13
The source of the error was not keeping track of which buffer focus should
operate on.

Also ensured that all hooks are local, which might also effect #13.
2017-06-12 16:43:59 +02:00
155da77a32 Fixes #14
In `focus-read-only-mode` the `cursor-type` was unconditionally set to `t`, and
did not restore the users customized cursor type. This is fixed by storing the
original value of `cursor-type` in `focus-cursor-type`.
2017-05-20 18:01:40 +02:00
6add57b887 Fix indentation 2016-11-25 16:29:25 +01:00
75202c9445 Version bump 2016-11-13 20:45:20 +01:00
bfb6aaf8ad Don't persist focus mode across major mode change
Addresses #11. Focus mode will no longer make any variables
`permanent-local'. On major mode change `focus-terminate' is run so that
the overlays are removed.
2016-11-13 20:25:47 +01:00
ffd97a5a36 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.
2016-11-06 16:02:58 +01:00
Syohei YOSHIDA
4d31363bf9 Use cl-lib function instead of cl.el 2016-10-13 15:49:57 +09:00
abad47f1c4 Add functions to pin/unpin the focused section 2016-01-31 23:18:59 +01:00
f310fa1c31 Split up `focus-move-focus' 2016-01-31 23:13:29 +01:00
307df45c69 Fix #5 2016-01-11 14:22:48 +01:00
b90cfb3c27 Fix #4 2015-12-29 16:26:08 +01:00
0a6e9624ea Allow for changing the current thing interactively
The `focus-mode-to-thing` variable dictates what thing to use according
to the currently enabled mode. Changing this if you only wished to
change the thing for a single session seems tedious. Now this can be
achieved by `M-x focus-change-thing`.
2015-11-18 09:15:29 +01:00
f590761dac focus-read-only-mode calls for version bump 2015-05-24 17:48:44 +02:00
ef5f7fc892 Cleaned up focus-next-thing' and focus-prev-thing' 2015-05-24 17:47:39 +02:00
fe94e0de69 Split activation/deactivation into functions 2015-05-24 02:42:15 +02:00
1423efbd25 Don't assume bounds are found 2015-05-24 02:40:35 +02:00
27eda82b95 Binding for enabling focus-read-only-mode in focus-mode 2015-05-24 02:04:50 +02:00
d1bd81ee4d Added focus-read-only-mode 2015-05-24 02:04:40 +02:00
b21341bd40 Added function for briefly showing the cursor 2015-05-24 02:04:02 +02:00
a723f78dc4 Added function for hiding the cursor 2015-05-24 02:03:46 +02:00
94ed8ab68b Defined variables to help hide the cursor
Used in focus-read-only-mode
2015-05-24 02:02:03 +02:00
ac711fe13a Whitespace cleanup 2015-05-24 02:01:08 +02:00
58a91b29aa Split focus-bounds into two functions 2015-05-24 02:00:06 +02:00
284a1240ce Cleaned up doc in `focus-average-colors' 2015-05-24 01:59:28 +02:00
497d13d758 Added functions for jumping between things 2015-05-24 01:56:36 +02:00
cd2aad5590 Cleaned up focus-dimness docstring 2015-05-19 00:21:38 +02:00
4c8391ea32 Fixed bug in defgroup 2015-05-17 20:28:40 +02:00