]> code.delx.au - gnu-emacs/blobdiff - lisp/ffap.el
(mail-citation-header): New variable.
[gnu-emacs] / lisp / ffap.el
index e352a793061244f8bd24e0c5f9740eed8df4a75d..9579cce1752acaf00bf44731b1065127b156b3b0 100644 (file)
@@ -4,7 +4,7 @@
 ;;
 ;; Author: Michelangelo Grigni <mic@mathcs.emory.edu>
 ;; Created: 29 Mar 1993
-;; Keywords: files, hypermedia, matching, mouse
+;; Keywords: files, hypermedia, matching, mouse, convenience
 ;; X-URL: ftp://ftp.mathcs.emory.edu/pub/mic/emacs/
 
 ;; This file is part of GNU Emacs.
 (defgroup ffap nil
   "Find file or URL at point."
   :link '(url-link :tag "URL" "ftp://ftp.mathcs.emory.edu/pub/mic/emacs/")
-  :group 'matching)
+  :group 'matching
+  :group 'convenience)
 
 ;; The code is organized in pages, separated by formfeed characters.
 ;; See the next two pages for standard customization ideas.
@@ -1182,15 +1183,15 @@ which may actually result in an url rather than a filename."
                    (abbreviate-file-name (expand-file-name guess))
                    ))
          (setq dir (file-name-directory guess))))
-    (setq guess
-         (completing-read
-          prompt
-          'ffap-read-file-or-url-internal
-          dir
-          nil
-          (if dir (cons guess (length dir)) guess)
-          (list 'file-name-history)
-          ))
+    (let ((minibuffer-completing-file-name t))
+      (setq guess
+           (completing-read
+            prompt
+            'ffap-read-file-or-url-internal
+            dir
+            nil
+            (if dir (cons guess (length dir)) guess)
+            (list 'file-name-history))))
     ;; Do file substitution like (interactive "F"), suggested by MCOOK.
     (or (ffap-url-p guess) (setq guess (substitute-in-file-name guess)))
     ;; Should not do it on url's, where $ is a common (VMS?) character.
@@ -1640,7 +1641,7 @@ ffap most of the time."
               (not current-prefix-arg)
             current-prefix-arg))
       (let (current-prefix-arg)                ; already interpreted
-       (call-interactively dired-function))
+       (call-interactively 'dired))
     (or filename (setq filename (dired-at-point-prompter)))
     (cond
      ((ffap-url-p filename)
@@ -1678,6 +1679,7 @@ ffap most of the time."
      (global-set-key "\C-x\C-f" 'find-file-at-point)
      (global-set-key "\C-x4f"   'ffap-other-window)
      (global-set-key "\C-x5f"   'ffap-other-frame)
+     (global-set-key "\C-xd"    'dired-at-point)
      (add-hook 'gnus-summary-mode-hook 'ffap-gnus-hook)
      (add-hook 'gnus-article-mode-hook 'ffap-gnus-hook)
      (add-hook 'vm-mode-hook 'ffap-ro-mode-hook)