From e77ed0d12482e37af1588ee7ab4d68ddd12a73c4 Mon Sep 17 00:00:00 2001 From: "Edward M. Reingold" Date: Wed, 26 Oct 1994 15:30:34 +0000 Subject: [PATCH] Fix regexps for diary marking to include TAB. --- lisp/diary-lib.el | 8 ++++---- 1 file 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)))) -- 2.39.5