]> git.eshelyaron.com Git - emacs.git/commitdiff
(animate-birthday-present): Accept other than `Sarah', too.
authorEli Zaretskii <eliz@is.elta.co.il>
Sat, 21 Feb 2004 13:30:42 +0000 (13:30 +0000)
committerEli Zaretskii <eliz@is.elta.co.il>
Sat, 21 Feb 2004 13:30:42 +0000 (13:30 +0000)
lisp/ChangeLog
lisp/play/animate.el

index 2d0afcdfe28927345b42f75383a83464a6fefad8..ee971eb1c07491754ad377cb4c1d940d4a547e7d 100644 (file)
@@ -1,3 +1,8 @@
+2004-02-21  Masatake YAMATO  <jet@gyve.org>
+
+       * play/animate.el (animate-birthday-present): Accept names other
+       than `Sarah', too.
+
 2004-02-21  Juri Linkov  <juri@jurta.org>
 
        * startup.el: Remove table of command line arguments from the
index 40c4696dc085e4c54e5f05492b8050c073f5f437..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)