diff options
author | Bastien Guerry <bzg@altern.org> | 2013-02-23 14:42:11 +0100 |
---|---|---|
committer | Bastien Guerry <bzg@altern.org> | 2013-02-23 14:42:11 +0100 |
commit | b6b509bfd458cace38b9cb7e17b18d3f146b0c1a (patch) | |
tree | 2cc875826f6e60a1d86ae4d0f906d46b9c6f2c2a | |
parent | 9a21403bd7d02c5b0d29feab475712ef162e974a (diff) |
org.el (org-tsr-regexp-both): Don't activate dates in linksrelease_7.9.3f
* org.el (org-tsr-regexp-both): Don't activate dates in links.
(org-activate-dates): Change match boundaries according to the
new value of `org-tsr-regexp-both'.
Thanks to Richard Huang for reporting a related issue.
-rw-r--r-- | lisp/org.el | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lisp/org.el b/lisp/org.el index 7939804ae..2173656a9 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -5209,8 +5209,10 @@ on a string that terminates immediately after the date.") (defconst org-tsr-regexp (concat org-ts-regexp "\\(--?-?" org-ts-regexp "\\)?") "Regular expression matching a time stamp or time stamp range.") -(defconst org-tsr-regexp-both (concat org-ts-regexp-both "\\(--?-?" - org-ts-regexp-both "\\)?") +(defconst org-tsr-regexp-both + (concat "[^][]" ;; Don't activate dates in links + org-ts-regexp-both "\\(--?-?" + org-ts-regexp-both "\\)?") "Regular expression matching a time stamp or time stamp range. The time stamps may be either active or inactive.") @@ -5516,8 +5518,8 @@ by a #." "Run through the buffer and add overlays to dates." (if (re-search-forward org-tsr-regexp-both limit t) (progn - (org-remove-flyspell-overlays-in (match-beginning 0) (match-end 0)) - (add-text-properties (match-beginning 0) (match-end 0) + (org-remove-flyspell-overlays-in (1+ (match-beginning 0)) (match-end 0)) + (add-text-properties (1+ (match-beginning 0)) (match-end 0) (list 'mouse-face 'highlight 'keymap org-mouse-map)) (org-rear-nonsticky-at (match-end 0)) |