Many modulation systems used in magnetic and optical recording are based on binary run-length-limited codes. We generalize the concept of

-limited sequences of length n introduced by Tang and Bald by imposing constraints on the maximum number of consecutive zeros at the beginning and the end of the sequences. It is shown that the encoding and decoding procedures are similar to those of Tang and Bald. The additional constraints allow a more efficient merging of the sequences. We demonstrate two constructions of run-length-limited codes with merging rules of increasing complexity and efficiency and compare them to Tang and Bahl\´s method.