%\ProvidesPackage{kswdash-pdftex}
%% part of kswdash v0.8.1 (2025-04-27)

\ExplSyntaxOn

\cs_set_eq:NN \_reserved_dot_cmd: \.
\cs_set_eq:NN \_reserved_hyphen_cmd: \-

\ifx\cntrdot\undefined
	\newcommand*\cntrdot{{\SetAdhocFonts{nanummj}{nanumgt}·}}
	\newcommand*\cntrdots{{\SetAdhocFonts{nanummj}{nanumgt}…}}
\fi
\ifx\expldash\undefined
	\newcommand*\expldash{\hspace{1.31pt}\raise.067em\hbox{\textemdash}\hspace{1.31pt}}
\fi

\RenewDocumentCommand \- {}
{
	\ifvmode\leavevmode\fi
	\peek_charcode_remove:NTF -
	{
		\_dash_trial_two:
	}
	{
		\_reserved_hyphen_cmd:
	}
}

\cs_new:Nn \_dash_trial_two:
{
	\peek_charcode_remove:NTF -
	{
		\expldash
	}
	{
		\textemdash
	}
}


\RenewDocumentCommand \. {}
{
	\ifvmode\leavevmode\fi
	\peek_charcode_remove:NTF .
	{
		\_dot_trial_two:
	}
	{
		\cntrdot
	}
}

\cs_new:Nn \_dot_trial_two:
{
	\peek_charcode_remove:NTF .
	{
		\mbox{\cntrdots\cntrdots}
	}
	{
		\cntrdots
	}
}

\cs_set_eq:NN \_reserved_tilde_cmd: \~
\tl_set:Nn \l_TILDEchar_tl { ∼ }

\RenewDocumentCommand \~ {}
{
	\ifvmode\leavevmode\fi
	\peek_catcode:NTF a
	{
		\_reserved_tilde_cmd:
	}
	{
		\peek_charcode_remove:NTF !
		{
			\_reserved_tilde_cmd:
		}
		{
			\l_TILDEchar_tl
		}
	}
}

%%%% disabled commands
\cs_new:Npn \_disable_kswdash_cmd:N #1
{
	\cs_set_eq:NN #1 \relax
}

\clist_set:Nn \l_tmpa_clist {
	\KSWdashFont, \KSWdashCdotFont, \KSWdashEllipsisFont, \kswdashcurrentfont,
	\KSWdashCode, \setcdotboxwidth }

\clist_map_inline:Nn \l_tmpa_clist
{
	\_disable_kswdash_cmd:N #1
}

\ExplSyntaxOff