summaryrefslogtreecommitdiff
path: root/lisp/gnus/nndiary.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/gnus/nndiary.el')
-rw-r--r--lisp/gnus/nndiary.el32
1 files changed, 11 insertions, 21 deletions
diff --git a/lisp/gnus/nndiary.el b/lisp/gnus/nndiary.el
index 9245396149a..ffe788133e4 100644
--- a/lisp/gnus/nndiary.el
+++ b/lisp/gnus/nndiary.el
@@ -88,16 +88,6 @@
(require 'gnus-start)
(require 'gnus-sum)
-;; Compatibility Functions =================================================
-
-(eval-and-compile
- (if (fboundp 'signal-error)
- (defun nndiary-error (&rest args)
- (apply #'signal-error 'nndiary args))
- (defun nndiary-error (&rest args)
- (apply #'error args))))
-
-
;; Back End behavior customization ===========================================
(defgroup nndiary nil
@@ -1157,12 +1147,12 @@ all. This may very well take some time.")
;; within the specified bounds.
;; Signals are caught by `nndiary-schedule'.
(if (not (string-match "^[ \t]*[0-9]+[ \t]*$" str))
- (nndiary-error "not an integer value")
+ (error "Not an integer value")
;; else
(let ((val (string-to-number str)))
(and (or (< val min)
(and max (> val max)))
- (nndiary-error "value out of range"))
+ (error "Value out of range"))
val)))
(defun nndiary-parse-schedule-value (str min-or-values max)
@@ -1179,7 +1169,7 @@ all. This may very well take some time.")
(match-string 1 str))))
(if (and val (setq val (assoc val min-or-values)))
(list (cadr val))
- (nndiary-error "invalid syntax")))
+ (error "Invalid syntax")))
;; min-or-values is min
(mapcar
(lambda (val)
@@ -1199,7 +1189,7 @@ all. This may very well take some time.")
(t
(cons end beg)))))
(t
- (nndiary-error "invalid syntax")))
+ (error "Invalid syntax")))
))
(split-string str ",")))
))
@@ -1214,7 +1204,7 @@ all. This may very well take some time.")
(let ((header (format "^X-Diary-%s: \\(.*\\)$" head)))
(goto-char (point-min))
(if (not (re-search-forward header nil t))
- (nndiary-error "header missing")
+ (error "Header missing")
;; else
(nndiary-parse-schedule-value (match-string 1) min-or-values max))
))
@@ -1288,27 +1278,27 @@ all. This may very well take some time.")
(while (setq reminder (pop reminders))
(push
(cond ((eq (cdr reminder) 'minute)
- (subtract-time
+ (time-subtract
(apply 'encode-time 0 (nthcdr 1 date-elts))
(seconds-to-time (* (car reminder) 60.0))))
((eq (cdr reminder) 'hour)
- (subtract-time
+ (time-subtract
(apply 'encode-time 0 0 (nthcdr 2 date-elts))
(seconds-to-time (* (car reminder) 3600.0))))
((eq (cdr reminder) 'day)
- (subtract-time
+ (time-subtract
(apply 'encode-time 0 0 0 (nthcdr 3 date-elts))
(seconds-to-time (* (car reminder) 86400.0))))
((eq (cdr reminder) 'week)
- (subtract-time
+ (time-subtract
(apply 'encode-time 0 0 0 monday (nthcdr 4 date-elts))
(seconds-to-time (* (car reminder) 604800.0))))
((eq (cdr reminder) 'month)
- (subtract-time
+ (time-subtract
(apply 'encode-time 0 0 0 1 (nthcdr 4 date-elts))
(seconds-to-time (* (car reminder) 18748800.0))))
((eq (cdr reminder) 'year)
- (subtract-time
+ (time-subtract
(apply 'encode-time 0 0 0 1 1 (nthcdr 5 date-elts))
(seconds-to-time (* (car reminder) 400861056.0)))))
res))