comparison lisp/play/animate.el @ 54102:d0b60a164264

(animate-birthday-present): Accept other than `Sarah', too.
author Eli Zaretskii <eliz@is.elta.co.il>
date Sat, 21 Feb 2004 13:28:03 +0000
parents 695cf19ef79e
children 0e6e83809df8
comparison
equal deleted inserted replaced
54101:e1a843eba96a 54102:d0b60a164264
149 (animate-string (car list-of-strings) vpos) 149 (animate-string (car list-of-strings) vpos)
150 (setq vpos (+ vpos space 1)) 150 (setq vpos (+ vpos space 1))
151 (setq list-of-strings (cdr list-of-strings))))) 151 (setq list-of-strings (cdr list-of-strings)))))
152 152
153 ;;;###autoload 153 ;;;###autoload
154 (defun animate-birthday-present () 154 (defun animate-birthday-present (&optional name)
155 "Display Sarah's birthday present in a new buffer." 155 "Display one's birthday present in a new buffer.
156 (interactive) 156 You can specify the one's name by NAME; the default value is \"Sarah\"."
157 (interactive (list (read-string "Name (default \"Sarah\"): "
158 nil nil "Sarah")))
157 ;; Make a suitable buffer to display the birthday present in. 159 ;; Make a suitable buffer to display the birthday present in.
158 (switch-to-buffer (get-buffer-create "*Sarah*")) 160 (switch-to-buffer (get-buffer-create (format "*%s*" name)))
159 (erase-buffer) 161 (erase-buffer)
160 ;; Display the empty buffer. 162 ;; Display the empty buffer.
161 (sit-for 0) 163 (sit-for 0)
162 ;; Make sure indentation does not use tabs. 164 ;; Make sure indentation does not use tabs.
163 ;; They would confuse things. 165 ;; They would confuse things.
164 (setq indent-tabs-mode nil) 166 (setq indent-tabs-mode nil)
165 167
166 (animate-string "Happy Birthday," 6) 168 (animate-string "Happy Birthday," 6)
167 (animate-string "Sarah" 7) 169 (animate-string (format "%s" name) 7)
168 170
169 (sit-for 1) 171 (sit-for 1)
170 172
171 (animate-string "You are my sunshine," 10 30) 173 (animate-string "You are my sunshine," 10 30)
172 (sit-for .5) 174 (sit-for .5)