diff options
author | Carsten Dominik <[email protected]> | 2008-05-05 15:09:49 +0000 |
---|---|---|
committer | Carsten Dominik <[email protected]> | 2008-05-05 15:09:49 +0000 |
commit | 1da6c70183ee4c12114caf6276a764ddd3125da8 (patch) | |
tree | 0d3f78462c8fd9b171b8889cd327be604a903bc4 | |
parent | 139c68404c847ddf9e5f1109d427871c07fe75f4 (diff) |
2008-05-05 Carsten Dominik <[email protected]>
* textmodes/org.el (org-read-date-get-relative): Interpret lone
weekday abbreviation as relative to today.
-rw-r--r-- | lisp/textmodes/org.el | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/lisp/textmodes/org.el b/lisp/textmodes/org.el index 080615e411..58bd84be57 100644 --- a/lisp/textmodes/org.el +++ b/lisp/textmodes/org.el @@ -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))))) |