\documentclass{minimal}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}

\usepackage{macros}

\begin{document}

\[\set{1\dots n}\]
%\[\set[f(x)\neq 0]{x\in X}\]
\[\set{x\in X}[f(x)\neq 0]\]

\end{document}
