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

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

[nongnu] elpa/why-this c914584833 59/59: Use cond instead of nested if i


From: ELPA Syncer
Subject: [nongnu] elpa/why-this c914584833 59/59: Use cond instead of nested if in why-this--get-face
Date: Sun, 27 Nov 2022 16:02:54 -0500 (EST)

branch: elpa/why-this
commit c91458483345dafa425ff73d1192d5abae68bfb2
Author: Akib Azmain Turja <akib@disroot.org>
Commit: Akib Azmain Turja <akib@disroot.org>

    Use cond instead of nested if in why-this--get-face
---
 why-this.el | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/why-this.el b/why-this.el
index 7346d6cf58..41e044359f 100644
--- a/why-this.el
+++ b/why-this.el
@@ -352,11 +352,10 @@ TIME-FORMAT is used to format data."
                    'solaire-region-face
                  'region))
               ('line
-               (if (bound-and-true-p hl-line-mode)
-                   (if (bound-and-true-p solaire-mode)
-                       'solaire-hl-line-face
-                     'hl-line)
-                 'why-this-face))
+               (cond
+                ((not (bound-and-true-p hl-line-mode)) 'why-this-face)
+                ((not (bound-and-true-p solaire-mode)) 'hl-line)
+                (t 'solaire-hl-line-face)))
               (_
                'why-this-face))
             nil t)



reply via email to

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