changeset 80559:807232a69d3c

2008-05-05 Carsten Dominik <dominik@science.uva.nl> * textmodes/org.el (org-read-date-get-relative): Interpret lone weekday abbreviation as relative to today.
author Carsten Dominik <dominik@science.uva.nl>
date Mon, 05 May 2008 15:09:49 +0000
parents 3b07f13dc799
children 13d2b17cfa67 494fe8a4eeb0
files lisp/textmodes/org.el
diffstat 1 files changed, 9 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/textmodes/org.el	Mon May 05 15:09:21 2008 +0000
+++ b/lisp/textmodes/org.el	Mon May 05 15:09:49 2008 +0000
@@ -18060,13 +18060,15 @@
 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)))))