So,
There are a couple of M-mount lenses that have a close-focus capability through attachments, specifically the beautiful Close-Focus (or "Dual-Range") Summicron 50mm f2.0 and the 90mm Elmar-M f4.0. The latter is a current, collapsible lens (the only one in the range since the sad discontinuation of the 50mm Elmar-M. Both have attachments. In the case of the 50, it is a pair of "spectacles" that attach to a flange on the top. Simultaneously the focussing barrel can be moved past a detent into a close focus range. The 90mm works slightly differently in that its attachment is spectacles plus a short extension tube.
In the past there were other solutions for those wanting to go closer. The delightfully named NOOKY and NOOKY-HESUM attachments worked on the same principle as the modern 90, with a mount and an optical aid. They worked with 5cm Elmars. The other approach was to use the VISOFLEX system. This was a development of the original PLOOT and consisted of a mirror housing and a viewfinder, effectively turning the LTM or M mount camera into a somewhat cumbersome SLR. The VISOFLEX came in three iterations (I, II, III) with the latter being the most sophisticated, taking M Mount lenses and with a removable prism that could be swapped for a right-angle or chimney type viewfinder. A range of lenses were designed specifically for the Visoflex (EG TELYT-V lenses for telephoto work and a fine 60mm for macro), for both macro and tele work and many of the lenses at the time had removable lens cells that could be remounted into new focussing mounts for use on the VISOFLEX in order to maintain focal length (if this was not done the film plane to lens length changes with a concomitant impact upon focussing and the ability to reach infinity.) The VISOFLEX III can still be used today, on the current M7 and MP and (I think ) on the M8 and M9; the III is slightly taller than its predecessors meaning that the higher top-plate on cameras post-M6 can be cleared.
Leicas and other rangefinders cannot be adjusted to focus closer; the rangefinder mechanism is not suited (due to parallax correction) to be used in the really close range; similarly the rangefinder effective base length (EBL) dictates focussing accuracy with very long or very fast lenses; that's why I use .85 magnification M7 and MP, because I am not a big wideangle fan. It's also why the longest "native" focal length that Leica have supplied is the 135mm; the 2.8 version, now discontinued, was equipped with spectacles to improve focussing accuracy but it was a heavy beast of a lens. Contax had a longer EBL so did offer a 180 but it was an exotic choice.
Other brands? Contax, Nikon and undoubtedly others had an equivalent to the VISOFLEX, or just didn't bother to cater for the macro market. Bear in mind that the Leica was, from the outset, a sophisticated system camera with "bolt-on" capabilities that helped to make it into the popular success that it was.
All this is from memory, btw - E&OE