Let radio target works well with Chinese

* lisp/org.el (org-update-radio-target-regexp): Let radio target works well with Chinese.

There is no need to force split words with the help
of space for Chinese, this change let the below
example works well.

<<<天空>>>

我爱天空和大地
    ^^^^
This commit is contained in:
Feng Shu 2019-02-24 17:52:51 +08:00 committed by Nicolas Goaziou
parent e21ad2aea1
commit 69c211d154
1 changed files with 5 additions and 2 deletions

View File

@ -6188,8 +6188,11 @@ by a #."
Also refresh fontification if needed."
(interactive)
(let ((old-regexp org-target-link-regexp)
(before-re "\\(?:^\\|[^[:alnum:]]\\)\\(")
(after-re "\\)\\(?:$\\|[^[:alnum:]]\\)")
;; Some languages, e.g., Chinese, do not use spaces to
;; separate words. Also allow to surround radio targets with
;; line-breakable characters.
(before-re "\\(?:^\\|[^[:alnum:]]\\|\\c|\\)\\(")
(after-re "\\)\\(?:$\\|[^[:alnum:]]\\|\\c|\\)")
(targets
(org-with-wide-buffer
(goto-char (point-min))