diff options
author | Chong Yidong <cyd@gnu.org> | 2013-02-04 20:02:25 +0800 |
---|---|---|
committer | Chong Yidong <cyd@gnu.org> | 2013-02-04 20:02:25 +0800 |
commit | 6e5c1569e941d385d28466a337ece0322bfa93e7 (patch) | |
tree | 4a2cef76a54c9ca882c33f797d9c91980a3554b1 /oldXMenu/ChgSel.c | |
parent | 84a06b500fd1cb500e89b93d3f5746b60c6ffdd4 (diff) | |
download | emacs-6e5c1569e941d385d28466a337ece0322bfa93e7.tar.gz |
Merge FFAP's URI-detection code into thingatpt.el.
* lisp/ffap.el: Require thingatpt.
(ffap-url-at-point): Delegate URI detection to thing-at-point.
All URI-valid characters are now recognized.
(ffap-string-at-point): Use use-region-p.
(ffap-url-regexp): Extra character is handled by thing-at-point.
(ffap-string-at-point-mode-alist): Allow parentheses.
(ffap-newsgroup-regexp, ffap-newsgroup-heads, ffap-newsgroup-p):
Convert to aliases; code moved to thingatpt.el.
(ffap-gnus-hook): Use setq-local.
* lisp/thingatpt.el: Rewrite the URL detection routines, absorbing some
code from ffap.el.
(thing-at-point-beginning-of-url-regexp): New var.
(thing-at-point-uri-schemes): Update list of URI schemes.
(thing-at-point-url-regexp): Variable deleted.
(thing-at-point-markedup-url-regexp): Disallow newlines.
(thing-at-point-newsgroup-regexp)
(thing-at-point-newsgroup-heads)
(thing-at-point-default-mail-uri-scheme): New variables.
(thing-at-point-bounds-of-url-at-point): Rewrite. Use ffap's
method to find the possible bounds of the URI at point. New
optional argument to find ill-formed URIs.
(thing-at-point-url-at-point): Rewrite. New arguments for finding
ill-formed URIs. Use thing-at-point-bounds-of-url-at-point, and
the scheme-adding heuristics from ffap-url-at-point.
(thing-at-point--bounds-of-well-formed-url): New function. Do
parens matching to decide whether to include parens in the URI
* test/automated/thingatpt.el: New file.
Fixes: debbugs:5673
Diffstat (limited to 'oldXMenu/ChgSel.c')
0 files changed, 0 insertions, 0 deletions