]> git.eshelyaron.com Git - emacs.git/commitdiff
2008-05-05 Carsten Dominik <dominik@science.uva.nl>
authorCarsten Dominik <dominik@science.uva.nl>
Mon, 5 May 2008 15:09:49 +0000 (15:09 +0000)
committerCarsten Dominik <dominik@science.uva.nl>
Mon, 5 May 2008 15:09:49 +0000 (15:09 +0000)
* textmodes/org.el (org-read-date-get-relative): Interpret lone
weekday abbreviation as relative to today.

lisp/textmodes/org.el

index 080615e41104b59cbaa29fc7db5d56ab3856fda3..58bd84be574b4751d5f23f3846540352715fef0e 100644 (file)
@@ -18060,13 +18060,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)))))