diff options
| author | Edward M. Reingold | 1994-10-26 15:30:34 +0000 |
|---|---|---|
| committer | Edward M. Reingold | 1994-10-26 15:30:34 +0000 |
| commit | e77ed0d12482e37af1588ee7ab4d68ddd12a73c4 (patch) | |
| tree | 0121588765ca0be544b3d03dbeb98e46fa39e232 | |
| parent | d960f2795a09e8dec5d982de22ee068c77ed2a92 (diff) | |
| download | emacs-e77ed0d12482e37af1588ee7ab4d68ddd12a73c4.tar.gz emacs-e77ed0d12482e37af1588ee7ab4d68ddd12a73c4.zip | |
Fix regexps for diary marking to include TAB.
| -rw-r--r-- | lisp/diary-lib.el | 8 |
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. | |||
| 761 | The recognized forms are XXXX or X:XX or XX:XX (military time), XXam or XXpm, | 761 | The recognized forms are XXXX or X:XX or XX:XX (military time), XXam or XXpm, |
| 762 | and XX:XXam or XX:XXpm." | 762 | and XX:XXam or XX:XXpm." |
| 763 | (cond ((string-match;; Military time | 763 | (cond ((string-match;; Military time |
| 764 | "^ *\\([0-9]?[0-9]\\):?\\([0-9][0-9]\\)\\(\\>\\|[^ap]\\)" s) | 764 | "^[ \t]*\\([0-9]?[0-9]\\):?\\([0-9][0-9]\\)\\(\\>\\|[^ap]\\)" s) |
| 765 | (+ (* 100 (string-to-int | 765 | (+ (* 100 (string-to-int |
| 766 | (substring s (match-beginning 1) (match-end 1)))) | 766 | (substring s (match-beginning 1) (match-end 1)))) |
| 767 | (string-to-int (substring s (match-beginning 2) (match-end 2))))) | 767 | (string-to-int (substring s (match-beginning 2) (match-end 2))))) |
| 768 | ((string-match;; Hour only XXam or XXpm | 768 | ((string-match;; Hour only XXam or XXpm |
| 769 | "^ *\\([0-9]?[0-9]\\)\\([ap]\\)m\\>" s) | 769 | "^[ \t]*\\([0-9]?[0-9]\\)\\([ap]\\)m\\>" s) |
| 770 | (+ (* 100 (% (string-to-int | 770 | (+ (* 100 (% (string-to-int |
| 771 | (substring s (match-beginning 1) (match-end 1))) | 771 | (substring s (match-beginning 1) (match-end 1))) |
| 772 | 12)) | 772 | 12)) |
| @@ -774,7 +774,7 @@ and XX:XXam or XX:XXpm." | |||
| 774 | (substring s (match-beginning 2) (match-end 2))) | 774 | (substring s (match-beginning 2) (match-end 2))) |
| 775 | 0 1200))) | 775 | 0 1200))) |
| 776 | ((string-match;; Hour and minute XX:XXam or XX:XXpm | 776 | ((string-match;; Hour and minute XX:XXam or XX:XXpm |
| 777 | "^ *\\([0-9]?[0-9]\\):\\([0-9][0-9]\\)\\([ap]\\)m\\>" s) | 777 | "^[ \t]*\\([0-9]?[0-9]\\):\\([0-9][0-9]\\)\\([ap]\\)m\\>" s) |
| 778 | (+ (* 100 (% (string-to-int | 778 | (+ (* 100 (% (string-to-int |
| 779 | (substring s (match-beginning 1) (match-end 1))) | 779 | (substring s (match-beginning 1) (match-end 1))) |
| 780 | 12)) | 780 | 12)) |
| @@ -1322,7 +1322,7 @@ ending of that number (that is, `st', `nd', `rd' or `th', as appropriate." | |||
| 1322 | (defun diary-ordinal-suffix (n) | 1322 | (defun diary-ordinal-suffix (n) |
| 1323 | "Ordinal suffix for N. (That is, `st', `nd', `rd', or `th', as appropriate.)" | 1323 | "Ordinal suffix for N. (That is, `st', `nd', `rd', or `th', as appropriate.)" |
| 1324 | (if (or (memq (% n 100) '(11 12 13)) | 1324 | (if (or (memq (% n 100) '(11 12 13)) |
| 1325 | (< 3 (% n 10))) | 1325 | (< 3 (% n 10))) |
| 1326 | "th" | 1326 | "th" |
| 1327 | (aref ["th" "st" "nd" "rd"] (% n 10)))) | 1327 | (aref ["th" "st" "nd" "rd"] (% n 10)))) |
| 1328 | 1328 | ||