changeset 94749:494fe8a4eeb0

Merge from emacs--rel--22 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-1150
author Miles Bader <miles@gnu.org>
date Thu, 08 May 2008 09:59:56 +0000
parents e6e8d9b7ab7d (current diff) 807232a69d3c (diff)
children 61756b574ffd
files lisp/ChangeLog lisp/org/org.el
diffstat 2 files changed, 14 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Thu May 08 09:59:46 2008 +0000
+++ b/lisp/ChangeLog	Thu May 08 09:59:56 2008 +0000
@@ -1,3 +1,8 @@
+2008-05-08  Carsten Dominik  <dominik@science.uva.nl>
+
+	* org/org.el (org-read-date-get-relative): Interpret lone
+	weekday abbreviation as relative to today.
+
 2008-05-08  Juanma Barranquero  <lekktu@gmail.com>
 
 	* abbrev.el (define-abbrev-table):
--- a/lisp/org/org.el	Thu May 08 09:59:46 2008 +0000
+++ b/lisp/org/org.el	Thu May 08 09:59:56 2008 +0000
@@ -10311,13 +10311,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)))))