Do you see this if you start Emacs using emacs -Q
? If not then bisect your init file to find the culprit.
That should always be the first step when trying to investigate some problem or something you wonder about: find out whether the problem comes from Emacs or yourself -- i.e., code that you have, one way or another, added to Emacs.
I think you are using some code (other than what comes with emacs -Q
) that does this. Vanilla Emacs (emacs -Q
) does not do it. For one thing, there is no predefined mark M
. Likewise, there is no predefined ??
. And that's really both a ?
mark, in the mark position, plus a second ?
after that position.
To remove the marks (however they were created), did you try M-DEL
(<M-backspace>
) followed by RET
? That's command dired-unmark-all-files
, and a simple RET
at the prompt removes all marks, of any kind. That should include the mysterious M
marks.