diff options
author | Lawrence Mitchell <wence@gmx.li> | 2010-12-14 20:01:59 +0000 |
---|---|---|
committer | Carsten Dominik <carsten.dominik@gmail.com> | 2010-12-16 14:12:28 +0100 |
commit | 32be74e098ebcbc0c31b347d45c18cd00a9e97bd (patch) | |
tree | 7e3e3fbfb185c52639409d89587df7d95b35e5d0 | |
parent | c61cdced2f165a45e9d4f5a9ca7b4fbd68fc8512 (diff) | |
download | org-mode-32be74e098ebcbc0c31b347d45c18cd00a9e97bd.tar.gz |
Quote any special characters in org-make-target-link-regexp
* lisp/org.el (org-make-target-link-regexp): regexp-quote target
before replacing whitespace.
Previously a radio link <<<...>>> would match all three-letter words
in the buffer. The manual indicates the radio links are meant to
match literally (modulo whitespace differences), so we should
regexp-quote all the targets to avoid over-eager matching.
-rw-r--r-- | lisp/org.el | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lisp/org.el b/lisp/org.el index cde7c03..ee47118 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -5424,6 +5424,7 @@ between words." "\\<\\(" (mapconcat (lambda (x) + (setq x (regexp-quote x)) (while (string-match " +" x) (setq x (replace-match "\\s-+" t t x))) x) |