# XeTeX warning: Redefining document command \oldstylenums with arg. spec. 'm'

I updated my MiKTeX to the newest version a few days ago, and after this when I compile documents with the fontspec package included, there's a warning. For example:

\documentclass{article}
\usepackage{fontspec}

\begin{document}
Hello, world!
\end{document}


Build Output shows:

*************************************************
* LaTeX warning: "xparse/redefine-command"
*
* Redefining document command \oldstylenums with arg. spec. 'm' on line 107.
*************************************************


Why this happens? How to solve it?

-
It's simply an innocuous warning. – egreg Mar 3 '12 at 23:36
@egreg: Should it really be a warning then? It can well confuse users. – Andrey Vihrov Mar 3 '12 at 23:39
@Andrey: xparse raise a warning whenever one use \RenewDocumentCommand, since redefining a macro is always at some risk. There are also some other innocuous warnings, e.g. some of the font substitution warnings. – Leo Liu Mar 4 '12 at 1:58
@LeoLiu: I understand that redefining macros has potential harm. But I believe that issuing a warning means requiring the user to take an action to fix this warning. Here we can take no action and no action is even required; we can't get rid of the warning (which means that now I can't tailor my document to not generate any warnings). Hence I think this should be an info, not a warning. – Andrey Vihrov Mar 4 '12 at 7:31

It should be possible to silence this kind of messages via

\usepackage[log-declarations=false]{xparse}
\usepackage[quiet]{fontspec}


but the option to xparse is currently broken and has no effect. The version I'm referring is

xparse.sty 3471 2012-02-26


All these packages are quite new and developing, so warning messages can help debug problems. However, the message you're referring to is completely harmless.

-
The issue isn't in xparse per se but is to do with how (or indeed if) kernel-level messages are filtered out. There will be some update on this over the next week or so. – Joseph Wright Mar 4 '12 at 10:20