(defun scale (end step &optional current) (unless current (setq current 0)) (if (<= current end) (let*((digit-str (if (= (% current step) 0) (format "%s" current) ".")) (digit-str-len (length digit-str)) ) (insert digit-str) (scale end step (+ digit-str-len current)) ))) (defun scale-simple (&optional end) (interactive "p") (let*((the-end (if (= end 1) 30 end)) (the-step (max 1 (/ the-end 10))) ) (scale the-end the-step) )) ;; C-u M-x scale-simple RET 01234 ;; C-u C-u M-x scale-simple RET 012345678910121416 ;; M-x scale-simple RET 0..3..6..9..12.15.18.21.24.27.30 ;; C-u 1 0 0 M-x scale-simple RET 0.........10........20........30 ...