Function: dired-at-point
dired-at-point is an autoloaded, interactive and byte-compiled
function defined in ffap.el.gz.
Signature
(dired-at-point &optional FILENAME)
Documentation
Start Dired, defaulting to file at point. See ffap.
If dired-at-point-require-prefix is set, the prefix meaning is reversed.
Probably introduced at or before Emacs version 20.3.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/ffap.el.gz
;;;###autoload
(defun dired-at-point (&optional filename)
"Start Dired, defaulting to file at point. See `ffap'.
If `dired-at-point-require-prefix' is set, the prefix meaning is reversed."
(interactive)
(if (and (called-interactively-p 'interactive)
(if dired-at-point-require-prefix
(not current-prefix-arg)
current-prefix-arg))
(let (current-prefix-arg) ; already interpreted
(call-interactively ffap-directory-finder))
(or filename (setq filename (dired-at-point-prompter)))
(let ((url (ffap-url-p filename)))
(cond
(url
(funcall ffap-url-fetcher url))
((and ffap-dired-wildcards
(string-match ffap-dired-wildcards filename))
(funcall ffap-directory-finder filename))
((file-exists-p filename)
(if (file-directory-p filename)
(funcall ffap-directory-finder
(expand-file-name filename))
(funcall ffap-directory-finder
(concat (expand-file-name filename) "*"))))
((and (file-writable-p
(or (file-name-directory (directory-file-name filename))
filename))
(y-or-n-p "Directory does not exist, create it? "))
(make-directory filename)
(funcall ffap-directory-finder filename))
(t
(signal 'file-missing (list "Opening directory"
"No such file or directory"
filename)))))))