branch: externals-release/ement
commit 5193aae21ecd7c2afee41c3a73915c459935d810
Author: Adam Porter <a...@alphapapa.net>
Commit: Adam Porter <a...@alphapapa.net>

    Fix: (magit-section-ident-value (ement-room-list-section)) Type form
    
    As the preceding comment says, the CL-TYPE form is only in Pcase as of
    Emacs 28.  (It's easy to forget these things when supporting 3+
    versions of Emacs.)
    
    Fixes <https://github.com/alphapapa/ement.el/issues/279>.
    
    Reported-by: Adam Bark <https://github.com/AdamBark>
---
 README.org         | 1 +
 ement-room-list.el | 7 ++++---
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/README.org b/README.org
index 3f8d1ffbdf..3a7c94a2e4 100644
--- a/README.org
+++ b/README.org
@@ -301,6 +301,7 @@ Ement.el doesn't support encrypted rooms natively, but it 
can be used transparen
 
 *Fixes*
 + Handle unnamed rooms in ~ement-directory~ list.  (See 
[[https://github.com/alphapapa/ement.el/issues/248][#248]].  Thanks to 
[[https://github.com/hjozwiak][Hunter Jozwiak]] and 
[[https://github.com/bmp][Bharath Palavalli]] for reporting.)
++ Don't use ~cl-type~ ~pcase~ form in Emacs versions before 28.  
([[https://github.com/alphapapa/ement.el/issues/279][#279]].  Thanks to 
[[https://github.com/AdamBark][Adam Bark]] for reporting.)
 
 ** 0.15
 :PROPERTIES:
diff --git a/ement-room-list.el b/ement-room-list.el
index 8a9c4f28e3..1e966bdaf9 100644
--- a/ement-room-list.el
+++ b/ement-room-list.el
@@ -73,12 +73,13 @@ Used for caching section visibility."
   ;; Could probably be worked around by binding a special variable around the 
creation of
   ;; the taxy hierarchy that would allow the path to be saved into each taxy.
   (pcase-exhaustive (oref section value)
-    ;; FIXME(emacs-28): Use `(cl-type taxy-magit-section)' when requiring 
Emacs 28.  See
+    ;; FIXME(emacs-28): Use `(cl-type taxy-magit-section)' and `(cl-type 
ement-room)', et
+    ;; al. when requiring Emacs 28.  See
     ;; <https://github.com/alphapapa/ement.el/issues/272>.
     ((and (pred taxy-magit-section-p) it)
      (taxy-name it))
-    (`[,(and (cl-type ement-room) room)
-       ,(and (cl-type ement-session) session)]
+    (`[,(and (pred ement-room-p) room)
+       ,(and (pred ement-session-p) session)]
      (vector (ement-user-id (ement-session-user session))
              (ement-room-id room)))
     ((pred null) nil)))

Reply via email to