Browse Source

Merge branch 'maint'

Bastien Guerry 12 years ago
parent
commit
64aae2fd29
1 changed files with 6 additions and 4 deletions
  1. 6 4
      lisp/org.el

+ 6 - 4
lisp/org.el

@@ -5511,8 +5511,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.")
 
@@ -5822,8 +5824,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))