As long as the lens is RF-coupled, the mount is standardized; there's no (functional) difference from one focal-legnth lens to another as far as the integral Leica rangefinder is concerned.
If you have an LTM lens off the camera, thread-mount facing you, there is either a tab or a ring that projects from inside the mounting-ring, that retracts into the lens barrel as you focus "closer" from Infinity. This in turn, operates that lever-follower in the body that FP John mentioned.
Except for the III-g (?) there are no frame-masks or the like that are deployed by the different focal-legnth lenses.
The M-cameras were the first Leicas that "knew" (or "cared") what lens was mounted.
From the Leica-II (1932) onward, all LTM RF-Leicas have the same standardized Lens / RF interface.
Leica considered 135mm to be the longest focal-legnth practical on an RF camera, due to the increasingly shallow depth of field with the longer lenses. For lens longer, Leica made them only for use with the Visoflex Mirror-reflex housing, which essentially turned the Barnack into a cumbersome SLR.
My 1950's Hektor 135 has a very shallow DOF at minimum focus ( 5 ft) at full aperture (f:4,5): less the one foot either way...
Set at 300 ft on the scale, at f:4,5, DOF covers 100 ft to Inf.
Luddite Frank