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

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

[elpa] externals/compat 36bc169cc0 3/3: Avoid using when-let in provided


From: ELPA Syncer
Subject: [elpa] externals/compat 36bc169cc0 3/3: Avoid using when-let in provided-mode-derived-p
Date: Wed, 10 Aug 2022 15:57:24 -0400 (EDT)

branch: externals/compat
commit 36bc169cc08408ae2cc2cfe0e2a3dc4338fc3b71
Author: Philip Kaludercic <philipk@posteo.net>
Commit: Philip Kaludercic <philipk@posteo.net>

    Avoid using when-let in provided-mode-derived-p
---
 compat-27.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/compat-27.el b/compat-27.el
index 99a1d33d83..bc0e37a356 100644
--- a/compat-27.el
+++ b/compat-27.el
@@ -405,8 +405,8 @@ Uses the `derived-mode-parent' property of the symbol to 
trace backwards.
 If you just want to check `major-mode', use `derived-mode-p'."
   :realname compat--provided-mode-derived-p
   ;; If MODE is an alias, then look up the real mode function first.
-  (when-let ((alias (symbol-function mode)))
-    (when (symbolp alias)
+  (let ((alias (symbol-function mode)))
+    (when (and alias (symbolp alias))
       (setq mode alias)))
   (while
       (and



reply via email to

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