There are switches for amsmath options leqno and reqno.
Then, how to define switches for turning on and off the option fleqn after amsmath is loaded?
I looked into the source of amsmath.sty and define the switches as
\makeatletter
\newcommand*{\fleqnon}{\setboolean{@fleqn}{true}}
\newcommand*{\fleqnoff}{\setboolean{@fleqn}{false}}
\makeatother
These two switches work only when amsmath is loaded with the option fleqn.
MWE:
\documentclass[b6paper]{scrartcl}
%\usepackage[fleqn]{amsmath} % works with the option `fleqn`
\usepackage{amsmath} % fails without the option `fleqn`
\usepackage{ifthen}
\makeatletter
% https://tex.stackexchange.com/a/212099
\newcommand*{\leqnomode}{\tagsleft@true\let\veqno=\@@leqno}
\newcommand*{\reqnomode}{\tagsleft@false\let\veqno=\@@eqno}
% based on my guess on `amsmath.sty`
\newcommand*{\fleqnon}{\setboolean{@fleqn}{true}}
\newcommand*{\fleqnoff}{\setboolean{@fleqn}{false}}
\makeatother
\begin{document}
\fleqnon
\begin{align}
f(x) &= ax^2 + bx + c \\
g(x) &= dx^2 + ex + f
\end{align}
\fleqnoff
\begin{align}
f(x) &= ax^2 + bx + c \\
g(x) &= dx^2 + ex + f \tag{e}
\end{align}
\fleqnon
\leqnomode
\begin{align}
f(x) &= ax^2 + bx + c \\
g(x) &= dx^2 + ex + f \tag{a}
\end{align}
\fleqnoff
\begin{align}
f(x) &= ax^2 + bx + c \\
g(x) &= dx^2 + ex + f
\end{align}
\begin{equation}
a^2+b^2=c^2.
\end{equation}
\reqnomode
\begin{equation}
-\Delta\phi=4\pi k\rho.\tag{2}
\end{equation}
\end{document}

amsmathwith thefleqnoption, given that it works? – egreg Oct 28 '19 at 12:26leqnoandreqno, so it may be helpful to have one forfleqn. – Eli4ph Oct 28 '19 at 12:38leqnoeither. I think the answer that you link to is misleading, they work sometimes but not in general. I may fix that later.... – David Carlisle Oct 28 '19 at 12:50enumerateenvironment. Many answers on tex.sx usefleqnoption. But I want other math not changed. That's why I want such switches. – Eli4ph Oct 28 '19 at 12:58\iftagsleft@\if@fleqnmodify it so that the false branch is not skipped but instead saved in a macro that you could locally execute to change the choice locally, but that is not what the package does now. – David Carlisle Oct 28 '19 at 13:02nccmathdefinesfleqnandceqnenvironments, which work somewhat likesubequations. – Bernard Oct 28 '19 at 13:29