Mercurial > emacs
changeset 47181:e17812b1a993
(defgroup dired): Use `files' as parent.
(dired-get-filename): Ignore handler if it has safe-magic prop.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sun, 01 Sep 2002 13:27:47 +0000 |
parents | 1161904f7cbb |
children | 1f4d03aef3cf |
files | lisp/dired.el |
diffstat | 1 files changed, 14 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/dired.el Sun Sep 01 13:26:06 2002 +0000 +++ b/lisp/dired.el Sun Sep 01 13:27:47 2002 +0000 @@ -39,7 +39,7 @@ (defgroup dired nil "Directory editing." - :group 'environment) + :group 'files) (defgroup dired-mark nil "Handling marks in Dired." @@ -1471,16 +1471,23 @@ ((and (eq localp 'no-dir) already-absolute) (file-name-nondirectory file)) (already-absolute - (if (find-file-name-handler file nil) - (concat "/:" file) - file)) + (let ((handler (find-file-name-handler file nil))) + ;; check for safe-magic property so that we won't + ;; put /: for names that don't really need them. + (if (and handler (not (get handler 'safe-magic))) + (concat "/:" file) + file))) ((eq localp 'no-dir) file) ((equal (dired-current-directory) "/") (setq file (concat (dired-current-directory localp) file)) - (if (find-file-name-handler file nil) - (concat "/:" file) - file)) + (let ((handler (find-file-name-handler file nil))) + ;; check for safe-magic property so that we won't + ;; put /: for names that don't really need them. + ;; For instance, .gz files when auto-compression-mode is on. + (if (and handler (not (get handler 'safe-magic))) + (concat "/:" file) + file))) (t (concat (dired-current-directory localp) file)))))