From 46a048fc77e54b214d9383f0c662e678721c8e03 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Wed, 9 Mar 2005 22:50:09 +0000 Subject: [PATCH] (animate-place-char): Use forward-line instead of next-line to improve performance. --- lisp/play/animate.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lisp/play/animate.el b/lisp/play/animate.el index 23e7939f47a..dcbf3bc2610 100644 --- a/lisp/play/animate.el +++ b/lisp/play/animate.el @@ -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)) -- 2.39.2