# HG changeset patch # User Kim F. Storm # Date 1110408609 0 # Node ID 0e6e83809df816ac9e40e87c7cc0655eb41661c3 # Parent 08d793786a8a082513e47ce704dac1abde1edd16 (animate-place-char): Use forward-line instead of next-line to improve performance. diff -r 08d793786a8a -r 0e6e83809df8 lisp/play/animate.el --- a/lisp/play/animate.el Wed Mar 09 22:49:38 2005 +0000 +++ b/lisp/play/animate.el Wed Mar 09 22:50:09 2005 +0000 @@ -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))