Next / Previous / Contents / Shipman's homepage

5.12. ibp-ditto: Field duplication function

This function duplicates one or more fields from a previous line. As in Section 5.4, “ibp-tab: Tab function”, this function may take a repeat count from C-u; the default repeat count is 1. It iterates that many times calling Section 5.13, “ibp-ditto-once: Duplicate one field”.

ibp.el
;; - - -   i b p - d i t t o   - - -

(defun ibp-ditto (count)
  "Field duplication function for IBP data entry; supports repeat count."
  (interactive "p")
  (while (> count 0)
    (ibp-ditto-once)
    (setq count (1- count))))