[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/focus 307df45c69 51/82: Fix #5
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/focus 307df45c69 51/82: Fix #5 |
Date: |
Tue, 6 Sep 2022 04:58:57 -0400 (EDT) |
branch: elpa/focus
commit 307df45c69d3a830b4caee8c418a3feff522f13a
Author: Lars Tveito <larstvei@ifi.uio.no>
Commit: Lars Tveito <larstvei@ifi.uio.no>
Fix #5
---
focus.el | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/focus.el b/focus.el
index 0695179e17..2670dbb47d 100644
--- a/focus.el
+++ b/focus.el
@@ -166,10 +166,11 @@ adds `focus-move-focus' to `post-command-hook'."
The overlays pointed to by `focus-pre-overlay' and `focus-post-overlay' are
deleted, and `focus-move-focus' is removed from `post-command-hook'."
- (mapc 'delete-overlay (list focus-pre-overlay focus-post-overlay))
- (remove-hook 'post-command-hook 'focus-move-focus t)
- (setq focus-pre-overlay nil
- focus-post-overlay nil))
+ (when (and focus-pre-overlay focus-post-overlay)
+ (mapc 'delete-overlay (list focus-pre-overlay focus-post-overlay))
+ (remove-hook 'post-command-hook 'focus-move-focus t)
+ (setq focus-pre-overlay nil
+ focus-post-overlay nil)))
(defun focus-goto-thing (bounds)
"Move point to the middle of BOUNDS."
@@ -261,6 +262,10 @@ up the `focus-read-only-blink-timer' and hooks."
:keymap (let ((map (make-sparse-keymap)))
(define-key map (kbd "C-c C-q") 'focus-read-only-mode)
map)
+ (unless (and (color-defined-p (face-attribute 'default :background))
+ (color-defined-p (face-attribute 'default :foreground)))
+ (message "Can't enable focus mode when no theme is loaded.")
+ (setq focus-mode nil))
(if focus-mode (focus-init) (focus-terminate)))
;;;###autoload
- [nongnu] elpa/focus fbeecfc8ca 08/82: Added README, (continued)
- [nongnu] elpa/focus fbeecfc8ca 08/82: Added README, ELPA Syncer, 2022/09/06
- [nongnu] elpa/focus 10b44de510 07/82: Docstring update, ELPA Syncer, 2022/09/06
- [nongnu] elpa/focus 6040c744cc 02/82: Made custom search functions that saves excursion, ELPA Syncer, 2022/09/06
- [nongnu] elpa/focus 4846438e3f 41/82: Merge branch 'read-only', ELPA Syncer, 2022/09/06
- [nongnu] elpa/focus 60f460b5be 28/82: Simplified installation, ELPA Syncer, 2022/09/06
- [nongnu] elpa/focus 236c002b57 14/82: Tweaking sizes, trying max-with, ELPA Syncer, 2022/09/06
- [nongnu] elpa/focus ab42b87799 68/82: Fix buffer-local variables definition, ELPA Syncer, 2022/09/06
- [nongnu] elpa/focus 9defce6158 10/82: Place the gif's side by side, ELPA Syncer, 2022/09/06
- [nongnu] elpa/focus 03e3cbc566 05/82: Documented every function/variable, ELPA Syncer, 2022/09/06
- [nongnu] elpa/focus 497d13d758 32/82: Added functions for jumping between things, ELPA Syncer, 2022/09/06
- [nongnu] elpa/focus 307df45c69 51/82: Fix #5,
ELPA Syncer <=
- [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, 2022/09/06