This question provides several good answers on creating custom algpseudocode blocks with no ending tag.
Based on that, I was wondering if such custom blocks can be redefined in order to detect the noend option, which for the standard blocks and loops makes their final indicator disappear.
Should it be done with a custom command tracking the existence of noend? Is there an internal flag inside algorithmicx that can be used?
I think it can have the following structure (not an actual solution, but a rough sketch):
\usepackage[noend]{algpseudocode}
\usepackage{ifthen}
\ifthenelse{\undefined{\noEndDetector}}{ % A command "sensing" the *noend* option
\algdef[SE]{...} % Definition considering ending keywords
}{
\algdef[SxNE]{...} % Definition without ending keywords
}
Any help is appreciated.