# HG changeset patch # User Dave Love # Date 1043667498 0 # Node ID b8c5db4dbb2b74f2511521c6aff6f5e2b942b8a1 # Parent 7c879dba798f5bbe34c07916028ad09e6914a601 (thing-at-point-file-name-chars): Include non-ASCII again and re-write the filename ops. diff -r 7c879dba798f -r b8c5db4dbb2b lisp/thingatpt.el --- 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 \"'()<>[^`{}.,;]+"