Function: ex-line
ex-line is a byte-compiled function defined in vip.el.gz.
Signature
(ex-line COM)
Documentation
ex line commands. COM is join, shift-right or shift-left.
Source Code
;; Defined in /usr/src/emacs/lisp/obsolete/vip.el.gz
;;(message "Executing global command...done")))
(defun ex-line (com)
"ex line commands. COM is join, shift-right or shift-left."
(vip-default-ex-addresses)
(vip-get-ex-count)
(let ((end (car ex-addresses)) (beg (car (cdr ex-addresses))) point)
(if (> beg end) (error "First address exceeds second"))
(save-excursion
(vip-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 " *text*"
(princ (buffer-substring (point) (mark))))
(condition-case nil
(progn
(vip-read-string "[Hit return to continue] ")
(ex-line-subr com (point) (mark)))
(quit
(ding)))
(save-excursion (kill-buffer " *text*")))
(ex-line-subr com (point) (mark)))
(setq point (point)))
(goto-char (1- point))
(beginning-of-line)))