changeset 38783:255503bac5c2

(animate-string): Doc fix. Use a buffer name with stars in it. (animate-sequence): New function. From Richard Stallman <rms@gnu.org>.
author Gerd Moellmann <gerd@gnu.org>
date Fri, 10 Aug 2001 18:10:16 +0000
parents 162cad3d76ea
children 964d8bb66031
files lisp/play/animate.el
diffstat 1 files changed, 20 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/play/animate.el	Fri Aug 10 13:47:18 2001 +0000
+++ b/lisp/play/animate.el	Fri Aug 10 18:10:16 2001 +0000
@@ -133,11 +133,29 @@
     (undo-boundary)))
 
 ;;;###autoload
+(defun animate-sequence (list-of-strings space)
+  "Display strings from LIST-OF-STRING with animation in a new buffer.
+Strings will be separated from each other by SPACE lines."
+  (let ((vpos (/ (- (window-height)
+		    1 ;; For the mode-line
+		    (* (1- (length list-of-strings)) space)
+		    (length list-of-strings))
+		 2)))
+    (switch-to-buffer (get-buffer-create "*Animation*"))
+    (erase-buffer)
+    (sit-for 0)
+    (setq indent-tabs-mode nil)
+    (while list-of-strings
+      (animate-string (car list-of-strings) vpos)
+      (setq vpos (+ vpos space 1))
+      (setq list-of-strings (cdr list-of-strings)))))
+ 
+;;;###autoload
 (defun animate-birthday-present ()
-  "Display Sarah's birthday present."
+  "Display Sarah's birthday present in a new buffer."
   (interactive)
   ;; Make a suitable buffer to display the birthday present in.
-  (switch-to-buffer (get-buffer-create "Sarah"))
+  (switch-to-buffer (get-buffer-create "*Sarah*"))
   (erase-buffer)
   ;; Display the empty buffer.
   (sit-for 0)