Browse Source

Fix b6b509b again.

Thanks to Nicolas Richard for reporting this.
Bastien Guerry 12 years ago
parent
commit
01748861d4
1 changed files with 5 additions and 5 deletions
  1. 5 5
      lisp/org.el

+ 5 - 5
lisp/org.el

@@ -5212,9 +5212,8 @@ on a string that terminates immediately after the date.")
 				 org-ts-regexp "\\)?")
 				 org-ts-regexp "\\)?")
   "Regular expression matching a time stamp or time stamp range.")
   "Regular expression matching a time stamp or time stamp range.")
 (defconst org-tsr-regexp-both
 (defconst org-tsr-regexp-both
-  (concat "[^][]\\(" ;; Don't activate dates in links
-	  org-ts-regexp-both "\\(--?-?"
-	  org-ts-regexp-both "\\)?\\)")
+  (concat org-ts-regexp-both "\\(--?-?"
+	  org-ts-regexp-both "\\)?")
   "Regular expression matching a time stamp or time stamp range.
   "Regular expression matching a time stamp or time stamp range.
 The time stamps may be either active or inactive.")
 The time stamps may be either active or inactive.")
 
 
@@ -5517,7 +5516,8 @@ by a #."
 
 
 (defun org-activate-dates (limit)
 (defun org-activate-dates (limit)
   "Run through the buffer and add overlays to dates."
   "Run through the buffer and add overlays to dates."
-  (if (re-search-forward org-tsr-regexp-both limit t)
+  (if (and (re-search-forward org-tsr-regexp-both limit t)
+	   (not (equal (char-before (match-beginning 0)) 91)))
       (progn
       (progn
 	(org-remove-flyspell-overlays-in (match-beginning 1) (match-end 1))
 	(org-remove-flyspell-overlays-in (match-beginning 1) (match-end 1))
 	(add-text-properties (match-beginning 1) (match-end 1)
 	(add-text-properties (match-beginning 1) (match-end 1)
@@ -5773,7 +5773,7 @@ needs to be inserted at a specific position in the font-lock sequence.")
 	   (if (memq 'plain lk) '(org-activate-plain-links))
 	   (if (memq 'plain lk) '(org-activate-plain-links))
 	   (if (memq 'bracket lk) '(org-activate-bracket-links (0 'org-link t)))
 	   (if (memq 'bracket lk) '(org-activate-bracket-links (0 'org-link t)))
 	   (if (memq 'radio lk) '(org-activate-target-links (0 'org-link t)))
 	   (if (memq 'radio lk) '(org-activate-target-links (0 'org-link t)))
-	   (if (memq 'date lk) '(org-activate-dates (1 'org-date t)))
+	   (if (memq 'date lk) '(org-activate-dates (0 'org-date t)))
 	   (if (memq 'footnote lk) '(org-activate-footnote-links))
 	   (if (memq 'footnote lk) '(org-activate-footnote-links))
 	   '("^&?%%(.*\\|<%%([^>\n]*?>" (0 'org-sexp-date t))
 	   '("^&?%%(.*\\|<%%([^>\n]*?>" (0 'org-sexp-date t))
 	   '(org-hide-wide-columns (0 nil append))
 	   '(org-hide-wide-columns (0 nil append))