From 5b523a77444359c9923eab9bddaf041215c379bd Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Thu, 7 Apr 2005 15:44:30 +0000 Subject: [PATCH] (ffap-pass-wildcards-to-dired): New user option to ensure dired always handles wildcards passed to ffap. (find-file-at-point): Use it. (ffap-dired-wildcards): Doc fix. --- lisp/ChangeLog | 7 +++++++ lisp/ffap.el | 20 ++++++++++++++++---- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4fabd9cf65c..2dfe80fe1a3 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2005-04-07 Benjamin Rutt + + * ffap.el (ffap-pass-wildcards-to-dired): New user option to + ensure dired always handles wildcards passed to ffap. + (find-file-at-point): Use it. + (ffap-dired-wildcards): Doc fix. + 2005-04-07 Juri Linkov * simple.el (next-error-overlay-arrow-position): New defvar. diff --git a/lisp/ffap.el b/lisp/ffap.el index c36ed7ff81f..89e04c0f2bd 100644 --- a/lisp/ffap.el +++ b/lisp/ffap.el @@ -217,10 +217,13 @@ Sensible values are nil, \"news\", or \"mailto\"." "*A regexp matching filename wildcard characters, or nil. If `find-file-at-point' gets a filename matching this pattern, -it passes it on to `find-file' with non-nil WILDCARDS argument, -which expands wildcards and visits multiple files. To visit -a file whose name contains wildcard characters you can suppress -wildcard expansion by setting `find-file-wildcards'. +and `ffap-pass-wildcards-to-dired' is nil, it passes it on to +`find-file' with non-nil WILDCARDS argument, which expands +wildcards and visits multiple files. To visit a file whose name +contains wildcard characters you can suppress wildcard expansion +by setting `find-file-wildcards'. If `find-file-at-point' gets a +filename matching this pattern and `ffap-pass-wildcards-to-dired' +is non-nil, it passes it on to `dired'. If `dired-at-point' gets a filename matching this pattern, it passes it on to `dired'." @@ -230,6 +233,11 @@ it passes it on to `dired'." ) :group 'ffap) +(defcustom ffap-pass-wildcards-to-dired nil + "*If non-nil, pass filenames matching `ffap-dired-wildcards' to dired." + :type 'boolean + :group 'ffap) + (defcustom ffap-newfile-prompt nil ;; Suggestion from RHOGEE, 11 Jul 1994. Disabled, I think this is ;; better handled by `find-file-not-found-hooks'. @@ -1386,6 +1394,10 @@ See for latest version." ((ffap-url-p filename) (let (current-prefix-arg) ; w3 2.3.25 bug, reported by KPC (funcall ffap-url-fetcher filename))) + ((and ffap-pass-wildcards-to-dired + ffap-dired-wildcards + (string-match ffap-dired-wildcards filename)) + (funcall ffap-directory-finder filename)) ((and ffap-dired-wildcards (string-match ffap-dired-wildcards filename) find-file-wildcards -- 2.39.2