A new method for continuum discretization in continuum-discretized coupled-channels calculations is proposed. The method is based on an analytic local-scale transformation of the harmonic-oscillator wave functions proposed for other purposes in a recent work [Karatagladis et al., Phys. Rev. C 71, 064601 (2005)]. The new approach is compared with the standard method of continuum discretization in terms of energy bins for the reactions d + 58 Ni at 80 MeV, 6 Li + 40 Ca at 156 MeV, and 6 He + 208 Pb at 22 MeV and 240 MeV/nucleon. In all cases very good agreement between both approaches is found.