Skip to content

Commit

Permalink
Fix: (magit-section-ident-value ement-room-list-section)
Browse files Browse the repository at this point in the history
Emacs 27 doesn't support the same use of `cl-type' in `pcase'.

Fixes #272.

Reported-by: Phil Sainty <[email protected]>
  • Loading branch information
alphapapa committed Apr 16, 2024
1 parent 7645f75 commit 83a73d1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ement-room-list.el
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,16 @@ a symbol, it should be unquoted.."
nil)

(cl-defmethod magit-section-ident-value ((section ement-room-list-section))
"Return ident value for `ement-room-list-section' SECTION.
Used for caching section visibility."
;; FIXME: The name of each taxy could be ambiguous. Best would be to use the
;; hierarchical path, but since the taxys aren't doubly linked, that isn't easily done.
;; 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)
((and (cl-type taxy-magit-section) it)
;; FIXME(emacs-28): Use `(cl-type taxy-magit-section)' 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)]
Expand Down

0 comments on commit 83a73d1

Please sign in to comment.