shr: Render td content with shr-descend
[gnus] / lisp / gnus-diary.el
index 2cea2e0..c2b95c7 100644 (file)
@@ -1,7 +1,7 @@
 ;;; gnus-diary.el --- Wrapper around the NNDiary Gnus back end
 
-;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-;;   2006, 2007, 2008  Free Software Foundation, Inc.
+;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
+;;   2008, 2009, 2010  Free Software Foundation, Inc.
 
 ;; Author:        Didier Verna <didier@xemacs.org>
 ;; Maintainer:    Didier Verna <didier@xemacs.org>
@@ -158,7 +158,7 @@ There are currently two built-in format functions:
 ;; I just ignore it.
 ;;;###autoload
 (defun gnus-user-format-function-d (header)
-  ;; Returns an aproximative delay string for the next occurence of this
+  ;; Returns an aproximative delay string for the next occurrence of this
   ;; message. The delay is given only in the first non zero unit.
   ;; Code partly stolen from article-make-date-line
   (let* ((extras (mail-header-extra header))
@@ -195,7 +195,7 @@ There are currently two built-in format functions:
 ;; I just ignore it.
 ;;;###autoload
 (defun gnus-user-format-function-D (header)
-  ;; Returns a formatted time string for the next occurence of this message.
+  ;; Returns a formatted time string for the next occurrence of this message.
   (let* ((extras (mail-header-extra header))
         (sched (gnus-diary-header-schedule extras))
         (occur (nndiary-next-occurence sched (current-time))))
@@ -351,7 +351,7 @@ If ARG (or prefix) is non-nil, force prompting for all fields."
             (condition-case ()
                 (nndiary-parse-schedule-value value
                                               (nth 1 head) (nth 2 head))
-              (t
+              (error
                (setq invalid t)))
             ;; #### NOTE: this (along with the `gnus-diary-add-header'
             ;; function) could be rewritten in a better way, in particular
@@ -368,17 +368,17 @@ If ARG (or prefix) is non-nil, force prompting for all fields."
                                 header ": ")))
             (setq value
                   (if (listp (nth 1 head))
-                      (completing-read prompt (cons '("*" nil) (nth 1 head))
-                                       nil t value
-                                       gnus-diary-header-value-history)
+                      (gnus-completing-read prompt (cons "*" (mapcar 'car (nth 1 head)))
+                                             t value
+                                             'gnus-diary-header-value-history)
                     (read-string prompt value
-                                 gnus-diary-header-value-history))))
+                                 'gnus-diary-header-value-history))))
           (setq ask nil)
           (setq invalid nil)
           (condition-case ()
               (nndiary-parse-schedule-value value
                                             (nth 1 head) (nth 2 head))
-            (t
+            (error
              (setq invalid t))))
         (gnus-diary-add-header (concat header ": " value))
         ))
@@ -401,5 +401,4 @@ If ARG (or prefix) is non-nil, force prompting for all fields."
 
 (provide 'gnus-diary)
 
-;; arch-tag: 98467e70-337e-4ddc-b92d-45d403ff1b4b
 ;;; gnus-diary.el ends here