]> code.delx.au - gnu-emacs/blobdiff - lisp/play/animate.el
Changes from arch/CVS synchronization
[gnu-emacs] / lisp / play / animate.el
index 3e72247320f08fcbcf5a808eb8d252001cba8cff..23e7939f47a8beb0e587f2d0eb7375faed0430e4 100644 (file)
@@ -151,11 +151,13 @@ Strings will be separated from each other by SPACE lines."
       (setq list-of-strings (cdr list-of-strings)))))
 
 ;;;###autoload
-(defun animate-birthday-present ()
-  "Display Sarah's birthday present in a new buffer."
-  (interactive)
+(defun animate-birthday-present (&optional name)
+  "Display one's birthday present in a new buffer.
+You can specify the one's name by NAME; the default value is \"Sarah\"."
+  (interactive (list (read-string "Name (default \"Sarah\"): "
+                                 nil nil "Sarah")))
   ;; Make a suitable buffer to display the birthday present in.
-  (switch-to-buffer (get-buffer-create "*Sarah*"))
+  (switch-to-buffer (get-buffer-create (format "*%s*" name)))
   (erase-buffer)
   ;; Display the empty buffer.
   (sit-for 0)
@@ -164,7 +166,7 @@ Strings will be separated from each other by SPACE lines."
   (setq indent-tabs-mode nil)
 
   (animate-string "Happy Birthday," 6)
-  (animate-string "Sarah" 7)
+  (animate-string (format "%s" name) 7)
 
   (sit-for 1)
 
@@ -184,4 +186,5 @@ Strings will be separated from each other by SPACE lines."
   (animate-string "my sunshine" 18 34)
   (animate-string "to stay!" 19 34))
 
+;;; arch-tag: 275289a3-6ac4-41da-b527-a1147045392f
 ;;; animate.el ends here