From 078d58e013d7416ce410c2d8555781e34ff44fda Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Fri, 16 Dec 2005 01:55:46 +0000 Subject: [PATCH] (newsticker--retrieval-timer-list, newsticker--display-timer) (newsticker-running-p, newsticker-ticker-running-p): Definitions moved up. --- lisp/net/newsticker.el | 49 ++++++++++++++++++++++-------------------- 1 file changed, 26 insertions(+), 23 deletions(-) diff --git a/lisp/net/newsticker.el b/lisp/net/newsticker.el index 3d4e8954e27..1854e7adda0 100644 --- a/lisp/net/newsticker.el +++ b/lisp/net/newsticker.el @@ -391,6 +391,32 @@ (defvar w3-mode-map) (defvar w3m-minor-mode-map) +;; ====================================================================== +;;; Newsticker status +;; ====================================================================== + +(defvar newsticker--retrieval-timer-list nil + "List of timers for news retrieval. +This is an alist, each element consisting of (feed-name . timer)") + +(defvar newsticker--display-timer nil + "Timer for newsticker display.") + +;;;###autoload +(defun newsticker-running-p () + "Check whether newsticker is running. +Return t if newsticker is running, nil otherwise. Newsticker is +considered to be running if the newsticker timer list is not empty." + (> (length newsticker--retrieval-timer-list) 0)) + +;;;###autoload +(defun newsticker-ticker-running-p () + "Check whether newsticker's actual ticker is running. +Return t if ticker is running, nil otherwise. Newsticker is +considered to be running if the newsticker timer list is not +empty." + (timerp newsticker--display-timer)) + ;; ====================================================================== ;;; Customizables ;; ====================================================================== @@ -1188,11 +1214,6 @@ that can be added." ;; ====================================================================== ;;; Internal variables ;; ====================================================================== -(defvar newsticker--display-timer nil - "Timer for newsticker display.") -(defvar newsticker--retrieval-timer-list nil - "List of timers for news retrieval. -This is an alist, each element consisting of (feed-name . timer)") (defvar newsticker--item-list nil "List of newsticker items.") (defvar newsticker--item-position 0 @@ -3078,24 +3099,6 @@ If VALUE is nil, auto-narrowing is turned off, otherwise it is turned on." (let ((age (get-text-property (point) 'nt-age))) (and (memq age '(new old obsolete)) t))))) -;; ====================================================================== -;;; Newsticker status -;; ====================================================================== -;;;###autoload -(defun newsticker-running-p () - "Check whether newsticker is running. -Return t if newsticker is running, nil otherwise. Newsticker is -considered to be running if the newsticker timer list is not empty." - (> (length newsticker--retrieval-timer-list) 0)) - -;;;###autoload -(defun newsticker-ticker-running-p () - "Check whether newsticker's actual ticker is running. -Return t if ticker is running, nil otherwise. Newsticker is -considered to be running if the newsticker timer list is not -empty." - (timerp newsticker--display-timer)) - ;; ====================================================================== ;;; local stuff ;; ======================================================================