comparison lisp/play/animate.el @ 38621:7f4573a73075

(animate-string): Handle case that the string is longer than the window is wide.
author Gerd Moellmann <gerd@gnu.org>
date Wed, 01 Aug 2001 08:02:45 +0000
parents 6f865b5ea033
children 6b570d0e1cf3
comparison
equal deleted inserted replaced
38620:fb9c902157a4 38621:7f4573a73075
99 (let ((characters 99 (let ((characters
100 (animate-initialize string vpos 100 (animate-initialize string vpos
101 (or hpos 101 (or hpos
102 ;; HPOS unspecified, so compute 102 ;; HPOS unspecified, so compute
103 ;; it so as to center the string. 103 ;; it so as to center the string.
104 (/ (- (window-width) (length string)) 2))))) 104 (max 0 (/ (- (window-width) (length string)) 2))))))
105 (dotimes (i animate-n-steps) 105 (dotimes (i animate-n-steps)
106 ;; Bind buffer-undo-list so it will be unchanged when we are done. 106 ;; Bind buffer-undo-list so it will be unchanged when we are done.
107 ;; (We're going to undo all our changes anyway.) 107 ;; (We're going to undo all our changes anyway.)
108 (let (buffer-undo-list 108 (let (buffer-undo-list
109 list-to-undo) 109 list-to-undo)