aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/gnus/ChangeLog11
-rw-r--r--lisp/gnus/gnus-demon.el27
-rw-r--r--lisp/gnus/shr.el4
3 files changed, 27 insertions, 15 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 875ab494f2f..94e5e82e626 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,14 @@
12012-01-27 Elias Pipping <pipping@lavabit.com> (tiny change)
2
3 * shr.el (shr-browse-url): Fix the name of the `browse-url-mail'
4 function call.
5
62012-01-27 Vida Gábor <vidagabor@gmail.com> (tiny change)
7
8 * gnus-demon.el (gnus-demon-run-callback, gnus-demon-init): Convert to
9 seconds, and make the repeat clause with HH:MM specs work as
10 documented.
11
12012-01-27 Lars Ingebrigtsen <larsi@gnus.org> 122012-01-27 Lars Ingebrigtsen <larsi@gnus.org>
2 13
3 * gnus-start.el (gnus-get-unread-articles): Clear out "early" methods 14 * gnus-start.el (gnus-get-unread-articles): Clear out "early" methods
diff --git a/lisp/gnus/gnus-demon.el b/lisp/gnus/gnus-demon.el
index 2f9952241aa..c91c725658a 100644
--- a/lisp/gnus/gnus-demon.el
+++ b/lisp/gnus/gnus-demon.el
@@ -102,6 +102,7 @@ Emacs has been idle for IDLE `gnus-demon-timestep's."
102 "Run FUNC if Emacs has been idle for longer than IDLE seconds." 102 "Run FUNC if Emacs has been idle for longer than IDLE seconds."
103 (unless gnus-inhibit-demon 103 (unless gnus-inhibit-demon
104 (when (or (not idle) 104 (when (or (not idle)
105 (and (eq idle t) (> (gnus-demon-idle-since) 0))
105 (<= idle (gnus-demon-idle-since))) 106 (<= idle (gnus-demon-idle-since)))
106 (with-local-quit 107 (with-local-quit
107 (ignore-errors 108 (ignore-errors
@@ -115,6 +116,7 @@ Emacs has been idle for IDLE `gnus-demon-timestep's."
115 ;; Set up the timer. 116 ;; Set up the timer.
116 (let* ((func (nth 0 handler)) 117 (let* ((func (nth 0 handler))
117 (time (nth 1 handler)) 118 (time (nth 1 handler))
119 (time-type (type-of time))
118 (idle (nth 2 handler)) 120 (idle (nth 2 handler))
119 ;; Compute time according with timestep. 121 ;; Compute time according with timestep.
120 ;; If t, replace by 1 122 ;; If t, replace by 1
@@ -123,33 +125,32 @@ Emacs has been idle for IDLE `gnus-demon-timestep's."
123 ((null time) 125 ((null time)
124 nil) 126 nil)
125 ((stringp time) 127 ((stringp time)
126 (gnus-demon-time-to-step time)) 128 (* (gnus-demon-time-to-step time) gnus-demon-timestep))
127 (t 129 (t
128 (* time gnus-demon-timestep)))) 130 (* time gnus-demon-timestep))))
131 (idle (if (numberp idle)
132 (* idle gnus-demon-timestep)
133 idle))
134
129 (timer 135 (timer
130 (cond 136 (cond
131 ;; (func number t)
132 ;; Call when Emacs has been idle for `time'
133 ((and (numberp time) (eq idle t))
134 (run-with-timer time time 'gnus-demon-run-callback func time))
135 ;; (func number number)
136 ;; Call every `time' when Emacs has been idle for `idle'
137 ((and (numberp time) (numberp idle))
138 (run-with-timer time time 'gnus-demon-run-callback func idle))
139 ;; (func nil number) 137 ;; (func nil number)
140 ;; Only call when Emacs has been idle for `idle' 138 ;; Only call when Emacs has been idle for `idle'
141 ((and (null time) (numberp idle)) 139 ((and (null time) (numberp idle))
142 (run-with-idle-timer (* idle gnus-demon-timestep) t 140 (run-with-idle-timer (* idle gnus-demon-timestep) t
143 'gnus-demon-run-callback func)) 141 'gnus-demon-run-callback func))
144 ;; (func number nil) 142 ;; (func number any)
145 ;; Call every `time' 143 ;; Call every `time'
146 ((and (numberp time) (null idle)) 144 ((eq time-type 'integer)
147 (run-with-timer time time 'gnus-demon-run-callback func))))) 145 (run-with-timer time time 'gnus-demon-run-callback func idle))
146 ;; (func string any)
147 ((eq time-type 'string)
148 (run-with-timer time (* 24 60 60) 'gnus-demon-run-callback func idle)))))
148 (when timer 149 (when timer
149 (add-to-list 'gnus-demon-timers timer))))) 150 (add-to-list 'gnus-demon-timers timer)))))
150 151
151(defun gnus-demon-time-to-step (time) 152(defun gnus-demon-time-to-step (time)
152 "Find out how many seconds to TIME, which is on the form \"17:43\"." 153 "Find out how many steps to TIME, which is on the form \"17:43\"."
153 (let* ((now (current-time)) 154 (let* ((now (current-time))
154 ;; obtain NOW as discrete components -- make a vector for speed 155 ;; obtain NOW as discrete components -- make a vector for speed
155 (nowParts (decode-time now)) 156 (nowParts (decode-time now))
diff --git a/lisp/gnus/shr.el b/lisp/gnus/shr.el
index 969d893c2d4..acce7660263 100644
--- a/lisp/gnus/shr.el
+++ b/lisp/gnus/shr.el
@@ -480,7 +480,7 @@ the URL of the image to the kill buffer instead."
480 ((not url) 480 ((not url)
481 (message "No link under point")) 481 (message "No link under point"))
482 ((string-match "^mailto:" url) 482 ((string-match "^mailto:" url)
483 (browse-url-mailto url)) 483 (browse-url-mail url))
484 (t 484 (t
485 (browse-url url))))) 485 (browse-url url)))))
486 486
@@ -566,7 +566,7 @@ the URL of the image to the kill buffer instead."
566;; url-cache-extract autoloads url-cache. 566;; url-cache-extract autoloads url-cache.
567(declare-function url-cache-create-filename "url-cache" (url)) 567(declare-function url-cache-create-filename "url-cache" (url))
568(autoload 'mm-disable-multibyte "mm-util") 568(autoload 'mm-disable-multibyte "mm-util")
569(autoload 'browse-url-mailto "browse-url") 569(autoload 'browse-url-mail "browse-url")
570 570
571(defun shr-get-image-data (url) 571(defun shr-get-image-data (url)
572 "Get image data for URL. 572 "Get image data for URL.