[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals-release/ement e1a68d245f 2/3: Change: (ement-with-room-
From: |
ELPA Syncer |
Subject: |
[elpa] externals-release/ement e1a68d245f 2/3: Change: (ement-with-room-and-session) Don't use pcase/map plist form |
Date: |
Tue, 11 Apr 2023 13:58:06 -0400 (EDT) |
branch: externals-release/ement
commit e1a68d245fe491fd449f2d7ef81c9c500180baf0
Author: Adam Porter <adam@alphapapa.net>
Commit: Adam Porter <adam@alphapapa.net>
Change: (ement-with-room-and-session) Don't use pcase/map plist form
It would be preferable to use the form (map :prompt-form), but that
causes, e.g. Emacs 27.2 on Debian 11 to produce
macro-expansion/void-variable errors on installation when the version
of `map' is too old. Since there's no way to force Emacs to actually
load the newer version after installing it, there's no way to prevent
users from suffering the broken installation and having to reinstall
this package to fix it. So we'll avoid using that nicer form for some
number of years, until older versions of Emacs or `map' are not widely
used.
---
README.org | 4 +++-
ement-macros.el | 3 +--
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/README.org b/README.org
index e5165daa63..73c001ae29 100644
--- a/README.org
+++ b/README.org
@@ -298,7 +298,9 @@ Note that, while ~matrix-client~ remains usable, and
probably will for some time
** 0.8.3-pre
-Nothing new yet.
+*Fixes*
+
++ Avoid use of ~pcase~'s ~(map :KEYWORD)~ form. (This can cause a broken
installation on older versions of Emacs that have an older version of the ~map~
library loaded, such as Emacs 27.2 included in Debian 11. Since there's no way
to force Emacs to actually load the version of ~map~ required by this package
before installing it (which would naturally happen upon restarting Emacs), we
can only avoid using such forms while these versions of Emacs are widely used.)
** 0.8.2
diff --git a/ement-macros.el b/ement-macros.el
index 0065c2721b..88e9a44d46 100644
--- a/ement-macros.el
+++ b/ement-macros.el
@@ -215,8 +215,7 @@ BODY may begin with property list arguments, including:
(pcase-let* ((plist (cl-loop while (keywordp (car body))
append (list (car body) (cadr body))
and do (setf body (cddr body))))
- ((map :prompt-form) plist)
- (prompt-form (or prompt-form
+ (prompt-form (or (plist-get plist :prompt-form)
'(ement-complete-room :suggest t))))
`(pcase-let* ((`[,list-room ,list-session] (if (eq 'ement-room-list-mode
major-mode)
(oref
(magit-current-section) value)