Function: chart-goto-xy

chart-goto-xy is a byte-compiled function defined in chart.el.gz.

Signature

(chart-goto-xy X Y)

Documentation

Move cursor to position X Y in buffer, and add spaces and CRs if needed.

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/chart.el.gz
;;; Utilities

(defun chart-goto-xy (x y)
  "Move cursor to position X Y in buffer, and add spaces and CRs if needed."
  (let ((indent-tabs-mode nil)
	(num (progn (goto-char (point-min)) (forward-line y))))
    (if (and (= 0 num) (/= 0 (current-column))) (newline 1))
    (if (eobp) (newline num))
    (if (< x 0) (setq x 0))
    (if (< y 0) (setq y 0))
    ;; Now, a quickie column moveto/forceto method.
    (or (= (move-to-column x) x)
	(let ((p (point)))
	  (indent-to x)
          (remove-text-properties p (point) '(face nil))))))