emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/focus f058bd163d 64/82: Fixed compile warnings.


From: ELPA Syncer
Subject: [nongnu] elpa/focus f058bd163d 64/82: Fixed compile warnings.
Date: Tue, 6 Sep 2022 04:58:58 -0400 (EDT)

branch: elpa/focus
commit f058bd163d33c4203371509f5893f884d224db8f
Author: jenchieh <jcs090218@gmail.com>
Commit: jenchieh <jcs090218@gmail.com>

    Fixed compile warnings.
---
 focus.el | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/focus.el b/focus.el
index 9a0dd16212..7b07697353 100644
--- a/focus.el
+++ b/focus.el
@@ -198,7 +198,7 @@ default is overwritten. This function simply helps set the
   "Pin the focused section to its current location or the region,
 if active."
   (interactive)
-  (when focus-mode
+  (when (bound-and-true-p focus-mode)
     (when (region-active-p)
       (focus-move-overlays (region-beginning) (region-end)))
     (remove-hook 'post-command-hook 'focus-move-focus t)))
@@ -206,7 +206,7 @@ if active."
 (defun focus-unpin ()
   "Unpin the focused section."
   (interactive)
-  (when focus-mode
+  (when (bound-and-true-p focus-mode)
     (add-hook 'post-command-hook 'focus-move-focus nil t)))
 
 (defun focus-next-thing (&optional n)
@@ -229,7 +229,8 @@ if active."
 This function is triggered by the `focus-read-only-blink-timer',
 when `focus-read-only-mode' is activated."
   (with-current-buffer focus-buffer
-    (when (and focus-read-only-mode (not (null focus-read-only-blink-timer)))
+    (when (and (bound-and-true-p focus-read-only-mode)
+               (not (null focus-read-only-blink-timer)))
       (setq focus-read-only-blink-timer nil)
       (setq cursor-type nil))))
 
@@ -238,7 +239,7 @@ when `focus-read-only-mode' is activated."
 This is added to the `pre-command-hook' when
 `focus-read-only-mode' is active."
   (with-current-buffer focus-buffer
-    (when (and focus-read-only-mode
+    (when (and (bound-and-true-p focus-read-only-mode)
                (not (member last-command '(focus-next-thing 
focus-prev-thing))))
       (when focus-read-only-blink-timer (cancel-timer 
focus-read-only-blink-timer))
       (setq cursor-type focus-cursor-type)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]