aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiles Bader <[email protected]>2008-05-08 09:59:56 +0000
committerMiles Bader <[email protected]>2008-05-08 09:59:56 +0000
commit7b1019e2781472c793d0bf74e2b9ee17894270b8 (patch)
treef4ac309067b0022e82cb2553fbde465e538e530f
parent0ab5c2be341094f6e5cc440a34401f369ec3d0a9 (diff)
parent1da6c70183ee4c12114caf6276a764ddd3125da8 (diff)
Merge from emacs--rel--22
Revision: [email protected]/emacs--devo--0--patch-1150
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/org/org.el16
2 files changed, 14 insertions, 7 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 68105177dd..722184d512 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2008-05-08 Carsten Dominik <[email protected]>
+
+ * org/org.el (org-read-date-get-relative): Interpret lone
+ weekday abbreviation as relative to today.
+
2008-05-08 Juanma Barranquero <[email protected]>
* abbrev.el (define-abbrev-table):
diff --git a/lisp/org/org.el b/lisp/org/org.el
index c37fc846ac..d2b411d9a7 100644
--- a/lisp/org/org.el
+++ b/lisp/org/org.el
@@ -10311,13 +10311,15 @@ WHAT is \"d\", \"w\", \"m\", or \"y\" for day, week, month, year.
N is the number of WHATs to shift.
DEF-FLAG is t when a double ++ or -- indicates shift relative to
the DEFAULT date rather than TODAY."
- (when (string-match
- (concat
- "\\`[ \t]*\\([-+]\\{1,2\\}\\)"
- "\\([0-9]+\\)?"
- "\\([dwmy]\\|\\(" (mapconcat 'car parse-time-weekdays "\\|") "\\)\\)?"
- "\\([ \t]\\|$\\)") s)
- (let* ((dir (if (match-end 1)
+ (when (and
+ (string-match
+ (concat
+ "\\`[ \t]*\\([-+]\\{0,2\\}\\)"
+ "\\([0-9]+\\)?"
+ "\\([dwmy]\\|\\(" (mapconcat 'car parse-time-weekdays "\\|") "\\)\\)?"
+ "\\([ \t]\\|$\\)") s)
+ (or (> (match-end 1) (match-beginning 1)) (match-end 4)))
+ (let* ((dir (if (> (match-end 1) (match-beginning 1))
(string-to-char (substring (match-string 1 s) -1))
?+))
(rel (and (match-end 1) (= 2 (- (match-end 1) (match-beginning 1)))))