(animate-place-char): Use forward-line instead

of next-line to improve performance.
This commit is contained in:
Kim F. Storm 2005-03-09 22:50:09 +00:00
parent 7f351d0b01
commit 46a048fc77

View file

@ -80,9 +80,11 @@
;;; Place the character CHAR at position VPOS, HPOS in the current buffer.
(defun animate-place-char (char vpos hpos)
(goto-char (window-start))
(let ((next-line-add-newlines t))
(let (abbrev-mode)
(dotimes (i vpos)
(next-line 1)))
(end-of-line)
(if (= (forward-line 1) 1)
(insert "\n"))))
(beginning-of-line)
(move-to-column (floor hpos) t)
(unless (eolp) (delete-char 1))