summaryrefslogtreecommitdiff
path: root/lisp/calendar
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1997-08-12 23:05:43 +0000
committerRichard M. Stallman <rms@gnu.org>1997-08-12 23:05:43 +0000
commit6219b0cf85ef50aee8a44fefdac9e292655692b8 (patch)
tree7529192936a909179eb7b7aa265ddcb6b77a3df1 /lisp/calendar
parent92c1f8ac31c7d3e67971e165431d540ec010e3ac (diff)
downloademacs-6219b0cf85ef50aee8a44fefdac9e292655692b8.tar.gz
(diary-entry-time): Bind case-fold-search to nil.
Diffstat (limited to 'lisp/calendar')
-rw-r--r--lisp/calendar/diary-lib.el43
1 files changed, 22 insertions, 21 deletions
diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el
index b658566eeca..e002958978e 100644
--- a/lisp/calendar/diary-lib.el
+++ b/lisp/calendar/diary-lib.el
@@ -882,27 +882,28 @@ A value of 0 in any position of the pattern is a wildcard."
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'.