Skip to content

Commit

Permalink
pgfkeys: make .initial compatible with .code, fix #654
Browse files Browse the repository at this point in the history
`.initial` now resets internals `/.@cmd` and `/.@args` defined by
`.code`- and `.style`-like handlers.
  • Loading branch information
muzimuzhi committed Aug 29, 2020
1 parent 17e588d commit 0f52b63
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tex/generic/pgf/utilities/pgfkeys.code.tex
Original file line number Diff line number Diff line change
Expand Up @@ -797,7 +797,11 @@

% Defining a value

\pgfkeys{/handlers/.initial/.code=\pgfkeyssetvalue{\pgfkeyscurrentpath}{#1}}
\pgfkeys{/handlers/.initial/.code=%
\pgfkeyslet{\pgfkeyscurrentpath/.@cmd}\undefined
\pgfkeyslet{\pgfkeyscurrentpath/.@args}\undefined
\pgfkeyssetvalue{\pgfkeyscurrentpath}{#1}%
}
\pgfkeys{/handlers/.add/.code 2 args=\pgfkeysaddvalue{\pgfkeyscurrentpath}{#1}{#2}}
\pgfkeys{/handlers/.prefix/.code=\pgfkeysaddvalue{\pgfkeyscurrentpath}{#1}{}}
\pgfkeys{/handlers/.append/.code=\pgfkeysaddvalue{\pgfkeyscurrentpath}{}{#1}}
Expand Down

0 comments on commit 0f52b63

Please sign in to comment.