Commit Graph

93 Commits

Author SHA1 Message Date
707eee02d6 Fix "Unused lexical argument" warning 2020-03-09 15:41:15 +01:00
9af4fbe635 Don't recalculate while typing 2020-03-08 20:48:58 +01:00
872f24cb26 Simplify making a unfocused face 2020-03-08 20:46:21 +01:00
6f7fbd3513 Improve org-mode support 2020-03-08 20:13:17 +01:00
28b7662f26 Rewrite color-preserving dimming without face-remap
Rather than using face-remap for efficient dimming and restoring colors in the
focused area, just dim /visible/ text in the unfocused region. The main
argument for this approach is that there are many corner cases in restoring the
colors correctly, and inaccuracies in the coloring is less crucial in the
unfocused area.
2020-03-08 18:32:39 +01:00
af05a01667 Move condition 2020-02-24 21:50:24 +01:00
f82be0af42 Check nils 2020-02-24 21:40:27 +01:00
4087bf62e6 Move comment 2020-02-24 00:27:32 +01:00
89a954d8d2 Checkdoc 2020-02-24 00:27:32 +01:00
ee27db522a Change function for undimming focused area 2020-02-24 00:27:31 +01:00
83355a4f1c Document changes with remapping 2020-02-24 00:27:31 +01:00
933490c059 Dim the colors of the theme
Fixes #2
2020-02-24 00:27:31 +01:00
35ff92764a Add special support for org mode 2020-02-24 00:27:05 +01: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
e9e841aed4 Remove sentence 2019-12-05 12:14:03 +01:00
9a5cf4f972 Formatting 2019-12-05 12:13:01 +01:00
cfb1672fca
Merge pull request #22 from larstvei/focus-face
Focus face
2019-12-04 16:54:23 +01:00
5e483363ac New README 2019-12-04 16:48:59 +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
3a2c4f1198
Merge pull request #19 from jcs-PR/master
Fixed some warnings and correct dependencies.
2019-03-09 17:52:27 +01: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
741a945866 Merge branch 'syohex-cl-lib' 2016-10-13 13:01:11 +02: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
871f3c60ce Fixed matching parenthesis 2015-05-24 19:41:51 +02:00
563a3bd188 Updated README 2015-05-24 17:51:58 +02: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
6b9620a73d Added section on `focus-read-only-mode' in README 2015-05-24 03:03:42 +02:00