summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward M. Reingold <reingold@emr.cs.iit.edu>1994-10-26 15:30:34 +0000
committerEdward M. Reingold <reingold@emr.cs.iit.edu>1994-10-26 15:30:34 +0000
commitfee2bc7e6fbdefae3ae89de37aa2bd30ea98fc35 (patch)
tree55fed7a2c57bf4c9ddf5a2ec88e91e47921d2a76
parent2d9fab2cf1944a1b838e2c35bff4c4b8d3653e5e (diff)
downloademacs-fee2bc7e6fbdefae3ae89de37aa2bd30ea98fc35.tar.gz
Fix regexps for diary marking to include TAB.
-rw-r--r--lisp/=diary-lib.el8
1 files changed, 4 insertions, 4 deletions
diff --git a/lisp/=diary-lib.el b/lisp/=diary-lib.el
index 9b5d978399f..7dca68c8a74 100644
--- a/lisp/=diary-lib.el
+++ b/lisp/=diary-lib.el
@@ -761,12 +761,12 @@ For example, returns 1325 for 1:25pm. Returns -9999 if no time is recognized.
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 @@ and XX:XXam or XX:XXpm."
(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 @@ ending of that number (that is, `st', `nd', `rd' or `th', as appropriate."
(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))))