Mercurial > emacs
changeset 19324:02a8fe146fa6
(diary-entry-time): Bind case-fold-search to nil.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Tue, 12 Aug 1997 23:05:43 +0000 |
parents | b686f7cb6849 |
children | db1b53ad6c80 |
files | lisp/calendar/diary-lib.el |
diffstat | 1 files changed, 22 insertions(+), 21 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/calendar/diary-lib.el Tue Aug 12 18:20:00 1997 +0000 +++ b/lisp/calendar/diary-lib.el Tue Aug 12 23:05:43 1997 +0000 @@ -882,27 +882,28 @@ 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 - "^[ \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 - "^[ \t]*\\([0-9]?[0-9]\\)\\([ap]\\)m\\>" s) - (+ (* 100 (% (string-to-int - (substring s (match-beginning 1) (match-end 1))) - 12)) - (if (equal ?a (downcase (aref s (match-beginning 2)))) - 0 1200))) - ((string-match;; Hour and minute XX:XXam or XX:XXpm - "^[ \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)) - (string-to-int (substring s (match-beginning 2) (match-end 2))) - (if (equal ?a (downcase (aref s (match-beginning 3)))) - 0 1200))) - (t -9999)));; Unrecognizable + (let ((case-fold-search nil)) + (cond ((string-match;; Military time + "^[ \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 + "^[ \t]*\\([0-9]?[0-9]\\)\\([ap]\\)m\\>" s) + (+ (* 100 (% (string-to-int + (substring s (match-beginning 1) (match-end 1))) + 12)) + (if (equal ?a (downcase (aref s (match-beginning 2)))) + 0 1200))) + ((string-match;; Hour and minute XX:XXam or XX:XXpm + "^[ \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)) + (string-to-int (substring s (match-beginning 2) (match-end 2))) + (if (equal ?a (downcase (aref s (match-beginning 3)))) + 0 1200))) + (t -9999))));; Unrecognizable (defun list-sexp-diary-entries (date) "Add sexp entries for DATE from the diary file to `diary-entries-list'.