]> code.delx.au - gnu-emacs/commitdiff
Merge from emacs--rel--22
authorMiles Bader <miles@gnu.org>
Thu, 8 May 2008 09:59:56 +0000 (09:59 +0000)
committerMiles Bader <miles@gnu.org>
Thu, 8 May 2008 09:59:56 +0000 (09:59 +0000)
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-1150

lisp/ChangeLog
lisp/org/org.el

index 68105177dd119e62c4b740e49b6cc6caccf91841..722184d512d8d485fa96a36bb9e1eff4e35df14c 100644 (file)
@@ -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):
index c37fc846ac0a253532d050e757abb70c76ed9a92..d2b411d9a7d0524e14566ed9b836f67efe0a7a8c 100644 (file)
@@ -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)))))