Mercurial > emacs
changeset 49486:b8c5db4dbb2b
(thing-at-point-file-name-chars): Include
non-ASCII again and re-write the filename ops.
author | Dave Love <fx@gnu.org> |
---|---|
date | Mon, 27 Jan 2003 11:38:18 +0000 |
parents | 7c879dba798f |
children | 6ddd3d2c7a74 |
files | lisp/thingatpt.el |
diffstat | 1 files changed, 9 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/thingatpt.el Mon Jan 27 11:36:08 2003 +0000 +++ b/lisp/thingatpt.el Mon Jan 27 11:38:18 2003 +0000 @@ -195,13 +195,19 @@ ;; Filenames and URLs www.com/foo%32bar -(defvar thing-at-point-file-name-chars "~/A-Za-z0-9---_.${}#%,:" +(defvar thing-at-point-file-name-chars "-~/[:alnum:]_.${}#%,:" "Characters allowable in filenames.") (put 'filename 'end-op - (lambda () (skip-chars-forward thing-at-point-file-name-chars))) + (lambda () + (re-search-forward (concat "\\=[" thing-at-point-file-name-chars "]*") + nil t))) (put 'filename 'beginning-op - (lambda () (skip-chars-backward thing-at-point-file-name-chars))) + (lambda () + (if (re-search-backward (concat "[^" thing-at-point-file-name-chars "]") + nil t) + (forward-char) + (goto-char (point-min))))) (defvar thing-at-point-url-path-regexp "[^]\t\n \"'()<>[^`{}]*[^]\t\n \"'()<>[^`{}.,;]+"