Function: ex-line
ex-line is a byte-compiled function defined in viper-ex.el.gz.
Signature
(ex-line COM)
Source Code
;; Defined in /usr/src/emacs/lisp/emulation/viper-ex.el.gz
;; Ex line commands. COM is join, shift-right or shift-left
(defun ex-line (com)
(viper-default-ex-addresses)
(viper-get-ex-count)
(let ((end (car ex-addresses)) (beg (car (cdr ex-addresses))) point)
(if (> beg end) (error viper-FirstAddrExceedsSecond))
(save-excursion
(viper-enlarge-region beg end)
(exchange-point-and-mark)
(if ex-count
(progn
(set-mark (point))
(forward-line ex-count)))
(if ex-flag
;; show text to be joined and ask for confirmation
(progn
(with-output-to-temp-buffer " *join text*"
(princ (buffer-substring (point) (mark t))))
(condition-case nil
(progn
(read-string "[Hit return to confirm] ")
(ex-line-subr com (point) (mark t)))
(quit (ding)))
(save-excursion (kill-buffer " *join text*")))
(ex-line-subr com (point) (mark t)))
(setq point (point)))
(goto-char (1- point))
(beginning-of-line)))