aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/play
diff options
context:
space:
mode:
authorKim F. Storm <[email protected]>2005-03-09 22:50:09 +0000
committerKim F. Storm <[email protected]>2005-03-09 22:50:09 +0000
commit46a048fc77e54b214d9383f0c662e678721c8e03 (patch)
treeb40c3af0f34340575795541255c7c88d91eca763 /lisp/play
parent7f351d0b01a8ed9a3336a5db0482fea2f906b976 (diff)
(animate-place-char): Use forward-line instead
of next-line to improve performance.
Diffstat (limited to 'lisp/play')
-rw-r--r--lisp/play/animate.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/play/animate.el b/lisp/play/animate.el
index 23e7939f47..dcbf3bc261 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))