changeset 9711:be6a59921f85

Fix regexps for diary marking to include TAB.
author Edward M. Reingold <reingold@emr.cs.iit.edu>
date Wed, 26 Oct 1994 15:30:34 +0000
parents b5fb08fb2cb3
children 275845a98fa8
files lisp/=diary-lib.el
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/=diary-lib.el	Wed Oct 26 15:28:56 1994 +0000
+++ b/lisp/=diary-lib.el	Wed Oct 26 15:30:34 1994 +0000
@@ -761,12 +761,12 @@
 The recognized forms are XXXX or X:XX or XX:XX (military time), XXam or XXpm,
 and XX:XXam or XX:XXpm."
   (cond ((string-match;; Military time  
-          "^ *\\([0-9]?[0-9]\\):?\\([0-9][0-9]\\)\\(\\>\\|[^ap]\\)" s)
+          "^[ \t]*\\([0-9]?[0-9]\\):?\\([0-9][0-9]\\)\\(\\>\\|[^ap]\\)" s)
          (+ (* 100 (string-to-int
                     (substring s (match-beginning 1) (match-end 1))))
             (string-to-int (substring s (match-beginning 2) (match-end 2)))))
         ((string-match;; Hour only  XXam or XXpm
-          "^ *\\([0-9]?[0-9]\\)\\([ap]\\)m\\>" s)
+          "^[ \t]*\\([0-9]?[0-9]\\)\\([ap]\\)m\\>" s)
          (+ (* 100 (% (string-to-int
                          (substring s (match-beginning 1) (match-end 1)))
                         12))
@@ -774,7 +774,7 @@
                               (substring s (match-beginning 2) (match-end 2)))
                 0 1200)))
         ((string-match;; Hour and minute  XX:XXam or XX:XXpm
-          "^ *\\([0-9]?[0-9]\\):\\([0-9][0-9]\\)\\([ap]\\)m\\>" s)
+          "^[ \t]*\\([0-9]?[0-9]\\):\\([0-9][0-9]\\)\\([ap]\\)m\\>" s)
          (+ (* 100 (% (string-to-int
                          (substring s (match-beginning 1) (match-end 1)))
                         12))
@@ -1322,7 +1322,7 @@
 (defun diary-ordinal-suffix (n)
   "Ordinal suffix for N. (That is, `st', `nd', `rd', or `th', as appropriate.)"
   (if (or (memq (% n 100) '(11 12 13))
-	  (< 3 (% n 10)))
+          (< 3 (% n 10)))
       "th"
     (aref ["th" "st" "nd" "rd"] (% n 10))))