diff options
author | Bastien Guerry <bzg@altern.org> | 2012-09-13 03:10:06 +0200 |
---|---|---|
committer | Bastien Guerry <bzg@altern.org> | 2012-09-13 03:10:06 +0200 |
commit | b0e5c6d1addfef598952412ce9529a850281e8c1 (patch) | |
tree | bccca02908640f42f228c3b3bbf399ae3ce7753e | |
parent | c6d0af8c5b50a1ce2b418de0ad8ad086172e0c90 (diff) | |
download | org-mode-b0e5c6d1addfef598952412ce9529a850281e8c1.tar.gz |
org.el: Fix plain link activation
* org.el (org-activate-plain-links): Don't try to check if we
are in a bracket link already.
This partially reverts commit ad35e2.
The problem that this commit was trying to
address needs to be rethought.
Thanks to Scott Randby for reporting this.
-rw-r--r-- | lisp/org.el | 30 |
1 files changed, 12 insertions, 18 deletions
diff --git a/lisp/org.el b/lisp/org.el index 3fbd340..2d2615f 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -5450,24 +5450,18 @@ will be prompted for." "Run through the buffer and add overlays to links." (catch 'exit (let (f) - (if (and (re-search-forward (concat org-plain-link-re) limit t) - (or (not (member 'bracket org-activate-links)) - (save-excursion - (save-match-data - (goto-char (match-beginning 0)) - (not (looking-back "\\[\\[")))))) - (progn - (org-remove-flyspell-overlays-in (match-beginning 0) (match-end 0)) - (setq f (get-text-property (match-beginning 0) 'face)) - (if (or (eq f 'org-tag) - (and (listp f) (memq 'org-tag f))) - nil - (add-text-properties (match-beginning 0) (match-end 0) - (list 'mouse-face 'highlight - 'face 'org-link - 'keymap org-mouse-map)) - (org-rear-nonsticky-at (match-end 0))) - t))))) + (when (re-search-forward (concat org-plain-link-re) limit t) + (org-remove-flyspell-overlays-in (match-beginning 0) (match-end 0)) + (setq f (get-text-property (match-beginning 0) 'face)) + (if (or (eq f 'org-tag) + (and (listp f) (memq 'org-tag f))) + nil + (add-text-properties (match-beginning 0) (match-end 0) + (list 'mouse-face 'highlight + 'face 'org-link + 'keymap org-mouse-map)) + (org-rear-nonsticky-at (match-end 0))) + t)))) (defun org-activate-code (limit) (if (re-search-forward "^[ \t]*\\(:\\(?: .*\\|$\\)\n?\\)" limit t) |