From 2fc2609488764102ce43194e9288b7bd8e25f17f Mon Sep 17 00:00:00 2001
From: Norbert Preining <norbert@preining.info>
Date: Sun, 16 May 2021 03:00:44 +0000
Subject: CTAN sync 202105160300

---
 graphics/pgf/base/tex/pgfkeys.code.tex | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

(limited to 'graphics/pgf/base/tex/pgfkeys.code.tex')

diff --git a/graphics/pgf/base/tex/pgfkeys.code.tex b/graphics/pgf/base/tex/pgfkeys.code.tex
index db89141aca..184506a185 100644
--- a/graphics/pgf/base/tex/pgfkeys.code.tex
+++ b/graphics/pgf/base/tex/pgfkeys.code.tex
@@ -45,6 +45,17 @@
   \csname @@end\expandafter\endcsname\expandafter\end%
 \fi
 
+% e-TeX primitives and beyond
+
+\ifx\contextversion\undefined
+  \let\pgfkeys@expanded   \expanded
+  \let\pgfkeys@unexpanded \unexpanded
+\else
+  \let\pgfkeys@expanded   \normalexpanded
+  \let\pgfkeys@unexpanded \normalunexpanded
+\fi
+
+
 % Set a key to a value
 %
 % #1 = key
@@ -74,9 +85,8 @@
 }
 
 \long\def\pgfkeyssetevalue#1#2{%
-  \edef\pgfkeys@temp##1##2##3##4##5##6##7##8##9{#2}%
-  \pgfkeys@temptoks=\expandafter{\pgfkeys@temp{##1}{##2}{##3}{##4}{##5}{##6}{##7}{##8}{##9}}%
-  \expandafter\edef\csname pgfk@#1\endcsname{\the\pgfkeys@temptoks}%
+  \expandafter\edef\csname pgfk@#1\endcsname
+  {\pgfkeys@unexpanded\expandafter{\pgfkeys@expanded{#2}}}%
 }
 
 % Add text to a key at the end
-- 
cgit v1.2.3

