% coefficients is the first argument and whose indeterminates (a
% comma-separated list) are the second argumnt.
\newcommand*{\polyring}[2]{{#1}\left[{#2}\right]}
+\ifdefined\newglossaryentry
+ \newglossaryentry{polyring}{
+ name={\ensuremath{\polyring{R}{X}}},
+ description={polynomials with coefficients in $R$ and variable $X$},
+ sort=p
+ }
+\fi
\fi