Function: edt-duplicate-line

edt-duplicate-line is an interactive and byte-compiled function defined in edt.el.gz.

Signature

(edt-duplicate-line NUM)

Documentation

Duplicate the line of text containing the cursor.

Argument NUM is the number of times to duplicate the line.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/emulation/edt.el.gz
;;;
;;; DUPLICATE LINE
;;;

(defun edt-duplicate-line (num)
  "Duplicate the line of text containing the cursor.
Argument NUM is the number of times to duplicate the line."
  (interactive "*p")
  (edt-check-prefix num)
  (let ((old-column (current-column))
        (count num))
    (edt-delete-entire-line)
    (edt-undelete-line)
    (while (> count 0)
      (edt-undelete-line)
      (setq count (1- count)))
    (edt-line-forward num)
    (move-to-column old-column)))