Function: viper-goto-line

viper-goto-line is an interactive and byte-compiled function defined in viper-cmd.el.gz.

Signature

(viper-goto-line ARG)

Documentation

Go to ARG's line. Without ARG go to end of buffer.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/emulation/viper-cmd.el.gz
;;; Moving around

(defun viper-goto-line (arg)
  "Go to ARG's line.  Without ARG go to end of buffer."
  (interactive "P")
  (let ((val (viper-P-val arg))
	(com (viper-getCom arg)))
    (viper-move-marker-locally 'viper-com-point (point))
    (deactivate-mark)
    (push-mark nil t)
    (if (null val)
	(goto-char (point-max))
      (goto-char (point-min))
      (forward-line (1- val)))

    ;; positioning is done twice: before and after command execution
    (if (and (eobp) (bolp) (not (bobp))) (forward-line -1))
    (back-to-indentation)

    (if com (viper-execute-com 'viper-goto-line val com))

    (if (and (eobp) (bolp) (not (bobp))) (forward-line -1))
    (back-to-indentation)
    ))