]> code.delx.au - gnu-emacs/blobdiff - lisp/ffap.el
(tree-widget-value-create): Simplify last change.
[gnu-emacs] / lisp / ffap.el
index ab9d223256f12def5efdd45d563dcde0d21f1656..89e04c0f2bd2ad3726e266bed00067b16768fd7d 100644 (file)
@@ -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'.
@@ -962,7 +970,7 @@ If t, `ffap-tex-init' will initialize this when needed.")
     ;; * no commas (good for latex)
     (file "--:$+<>@-Z_a-z~*?" "<@" "@>;.,!:")
     ;; An url, or maybe a email/news message-id:
-    (url "--:=&?$+@-Z_a-z~#,%;" "^A-Za-z0-9" ":;.,!?")
+    (url "--:=&?$+@-Z_a-z~#,%;*" "^A-Za-z0-9" ":;.,!?")
     ;; Find a string that does *not* contain a colon:
     (nocolon "--9$+<>@-Z_a-z~" "<@" "@>;.,!?")
     ;; A machine:
@@ -1386,6 +1394,10 @@ See <ftp://ftp.mathcs.emory.edu/pub/mic/emacs/> 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