]> code.delx.au - gnu-emacs/commitdiff
(appt-add): Also accept time in the form XX[.XX][am/pm/AM/PM].
authorThien-Thi Nguyen <ttn@gnuvola.org>
Thu, 8 Jan 2004 23:35:07 +0000 (23:35 +0000)
committerThien-Thi Nguyen <ttn@gnuvola.org>
Thu, 8 Jan 2004 23:35:07 +0000 (23:35 +0000)
(appt-make-list): Likewise.
(appt-convert-time): Likewise.

lisp/ChangeLog
lisp/calendar/appt.el

index 118cc53fb4219b4eec2370a8cf807e239b62dea9..dad6eb6b4d42f5c8e411c1613e2c37e7ddb3314c 100644 (file)
@@ -1,3 +1,13 @@
+2004-01-09  Deepak Goel  <deego@gnufans.org>
+
+       * calendar/diary-lib.el (diary-entry-time):
+       Also accept time in the form XX[.XX][am/pm/AM/PM].
+       (fancy-diary-font-lock-keywords): Likewise.
+       (diary-font-lock-keywords): Likewise.
+       * calendar/appt.el (appt-add): Likewise.
+       (appt-make-list): Likewise.
+       (appt-convert-time): Likewise.
+
 2004-01-08  Nick Roberts  <nick@nick.uklinux.net>
 
        * gdb-ui.el (gdb-ann3): Revert previous change.
        (term-sentinel): New function.
        (term-handle-exit): New function.
 
-       * subr.el (assoc-ignore-case, assoc-ignore-representation): 
+       * subr.el (assoc-ignore-case, assoc-ignore-representation):
        Use assoc-string, and mark them obsolete.
        (delay-mode-hooks): Mark as permanent local.
 
        * xml.el (xml-parse-region): Allow comments to appear after the
        topmost element has closed.
        (xml-ns-parse-ns-attrs, xml-ns-expand-el)
-       (xml-ns-expand-attr): New functions to do namespace handling.   
+       (xml-ns-expand-attr): New functions to do namespace handling.
        (xml-intern-attrlist): Back-compatible handling of attribute
        names.
        (xml-parse-tag): Move namespace handling to seperate functions.
index 6c018667af4a5b9a4a4629038c66a08870bafc83..8c1562385c9b247db807c1a3b927a0989a85a098 100644 (file)
@@ -437,7 +437,8 @@ Usually just deletes the appointment buffer."
 The time should be in either 24 hour format or am/pm format."
 
   (interactive "sTime (hh:mm[am/pm]): \nsMessage: ")
-  (if (string-match "[0-9]?[0-9]:[0-9][0-9]\\(am\\|pm\\)?" new-appt-time)
+  (if (string-match "[0-9]?[0-9][:.][0-9][0-9]\\(am\\|pm\\)?"
+                   new-appt-time)
       nil
     (error "Unacceptable time-string"))
 
@@ -519,7 +520,7 @@ They specify the range of dates that the diary is being processed for."
                           (calendar-current-date) (car (car entry-list))))
                (let ((time-string (cadr (car entry-list))))
                  (while (string-match
-                         "\\([0-9]?[0-9]:[0-9][0-9]\\(am\\|pm\\)?\\).*"
+                         "\\([0-9]?[0-9][:.][0-9][0-9]\\(am\\|pm\\)?\\).*"
                          time-string)
                    (let* ((beg (match-beginning 0))
                           ;; Get just the time for this appointment.
@@ -527,7 +528,7 @@ They specify the range of dates that the diary is being processed for."
                           ;; Find the end of this appointment
                           ;; (the start of the next).
                           (end (string-match
-                                "^[ \t]*[0-9]?[0-9]:[0-9][0-9]\\(am\\|pm\\)?"
+                                "^[ \t]*[0-9]?[0-9][:.][0-9][0-9]\\(am\\|pm\\)?"
                                 time-string
                                 (match-end 0)))
                           ;; Get the whole string for this appointment.
@@ -586,17 +587,17 @@ it from the original list."
 
 
 (defun appt-convert-time (time2conv)
-  "Convert hour:min[am/pm] format to minutes from midnight."
-
+  "Convert hour:min[am/pm] format to minutes from midnight.
+Also try to accept the hour.min[am/pm] format."
   (let ((conv-time 0)
         (hr 0)
         (min 0))
 
-    (string-match ":\\([0-9][0-9]\\)" time2conv)
+    (string-match "[:.]\\([0-9][0-9]\\)" time2conv)
     (setq min (string-to-int
                (match-string 1 time2conv)))
 
-    (string-match "[0-9]?[0-9]:" time2conv)
+    (string-match "[0-9]?[0-9][:.]" time2conv)
     (setq hr (string-to-int
               (match-string 0 time2conv)))