changeset 60537:0e6e83809df8

(animate-place-char): Use forward-line instead of next-line to improve performance.
author Kim F. Storm <storm@cua.dk>
date Wed, 09 Mar 2005 22:50:09 +0000
parents 08d793786a8a
children edce5aeb8af5
files lisp/play/animate.el
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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))