From: Dave Love Date: Mon, 27 Jan 2003 11:38:45 +0000 (+0000) Subject: (thing-at-point-file-name-chars): Include X-Git-Tag: ttn-vms-21-2-B4~11444 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=839aacc98f3ffa7b609fa75f7a9963dda55acbc6;p=emacs.git (thing-at-point-file-name-chars): Include non-ASCII again and re-write the filename ops. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 80767e5384d..478b01997c6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2003-01-27 Dave Love + + * dired-x.el (dired-filename-at-point): Fix last change and tidy up. + + * thingatpt.el (thing-at-point-file-name-chars): Include + non-ASCII again and re-write the filename ops. + 2003-01-27 David Ponce * makefile.w32-in (update-subdirs-SH): Create lisp/subdirs.el. diff --git a/lisp/thingatpt.el b/lisp/thingatpt.el index 3e6b344a3f2..70f25da673a 100644 --- a/lisp/thingatpt.el +++ b/lisp/thingatpt.el @@ -195,13 +195,19 @@ a symbol as a valid THING." ;; 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 \"'()<>[^`{}.,;]+"