From: Gerd Moellmann Date: Fri, 10 Aug 2001 18:10:40 +0000 (+0000) Subject: (animate-string): Doc fix. Use a buffer X-Git-Tag: emacs-pretest-21.0.105~212 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=242e5463b748287088c4288b69b30aa6b043b1c5;p=emacs.git (animate-string): Doc fix. Use a buffer name with stars in it. (animate-sequence): New function. From Richard M. Stallman . --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f40dce1749d..b22250e3325 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,10 @@ 2001-08-10 Gerd Moellmann + * play/animate.el (animate-string): Doc fix. Use a buffer + name with stars in it. + (animate-sequence): New function. + From Richard Stallman . + * frame.el (select-frame-set-input-focus): New function extracted from other-frame. (other-frame): Use it. diff --git a/lisp/play/animate.el b/lisp/play/animate.el index 4b20e847616..4e74491ad33 100644 --- a/lisp/play/animate.el +++ b/lisp/play/animate.el @@ -132,12 +132,30 @@ in the current window." ;; will undo the "animate" calls one by one. (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)