comparison lisp/net/newsticker.el @ 65586:86bece058ee5

Message format fixes (commit no. 5)
author Deepak Goel <deego@gnufans.org>
date Sun, 18 Sep 2005 12:36:08 +0000
parents e3c81c2db803
children 2148ae4e135a fa0da9b57058
comparison
equal deleted inserted replaced
65585:6d0d4d973f77 65586:86bece058ee5
8 ;; Filename: newsticker.el 8 ;; Filename: newsticker.el
9 ;; URL: http://www.nongnu.org/newsticker 9 ;; URL: http://www.nongnu.org/newsticker
10 ;; Created: 17. June 2003 10 ;; Created: 17. June 2003
11 ;; Keywords: News, RSS 11 ;; Keywords: News, RSS
12 ;; Time-stamp: "26. August 2005, 16:33:46 (ulf)" 12 ;; Time-stamp: "26. August 2005, 16:33:46 (ulf)"
13 ;; CVS-Version: $Id: newsticker.el,v 1.2 2005/09/12 22:54:28 miles Exp $ 13 ;; CVS-Version: $Id: newsticker.el,v 1.3 2005/09/13 08:47:44 lektu Exp $
14 14
15 (defconst newsticker-version "1.8" "Version number of newsticker.el.") 15 (defconst newsticker-version "1.8" "Version number of newsticker.el.")
16 16
17 ;; ====================================================================== 17 ;; ======================================================================
18 18
3427 (setq newsticker--item-position (1+ newsticker--item-position)) 3427 (setq newsticker--item-position (1+ newsticker--item-position))
3428 (when (>= newsticker--item-position (length newsticker--item-list)) 3428 (when (>= newsticker--item-position (length newsticker--item-list))
3429 (setq newsticker--item-position 0)) 3429 (setq newsticker--item-position 0))
3430 (setq newsticker--prev-message 3430 (setq newsticker--prev-message
3431 (nth newsticker--item-position newsticker--item-list)) 3431 (nth newsticker--item-position newsticker--item-list))
3432 (message newsticker--prev-message)))) 3432 (message "%s" newsticker--prev-message))))
3433 3433
3434 (defun newsticker--display-scroll () 3434 (defun newsticker--display-scroll ()
3435 "Called from the display timer. 3435 "Called from the display timer.
3436 This function scrolls the ticker items in the echo area, unless 3436 This function scrolls the ticker items in the echo area, unless
3437 there is another message displayed or the minibuffer is active." 3437 there is another message displayed or the minibuffer is active."
3463 (let ((t-width (1- (length subtext)))) 3463 (let ((t-width (1- (length subtext))))
3464 (while (> (string-width subtext) width) 3464 (while (> (string-width subtext) width)
3465 (setq subtext (substring subtext 0 t-width)) 3465 (setq subtext (substring subtext 0 t-width))
3466 (setq t-width (1- t-width)))) 3466 (setq t-width (1- t-width))))
3467 ;; show the ticker text and save current position 3467 ;; show the ticker text and save current position
3468 (message subtext) 3468 (message "%s" subtext)
3469 (setq newsticker--prev-message subtext) 3469 (setq newsticker--prev-message subtext)
3470 (setq newsticker--item-position (1+ i)) 3470 (setq newsticker--item-position (1+ i))
3471 (when (>= newsticker--item-position l) 3471 (when (>= newsticker--item-position l)
3472 (setq newsticker--item-position 0)))))) 3472 (setq newsticker--item-position 0))))))
3473 3473