summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>2002-09-01 13:27:47 +0000
committerRichard M. Stallman <rms@gnu.org>2002-09-01 13:27:47 +0000
commitca66efd171d96397b9f07240b91ea70d662af095 (patch)
tree98389a5f36e884d3dcb0cae2f46a41a101c1ef3f /lisp
parent68890d7ebc567261df925bf1032e512ccdece661 (diff)
downloademacs-ca66efd171d96397b9f07240b91ea70d662af095.tar.gz
emacs-ca66efd171d96397b9f07240b91ea70d662af095.tar.bz2
emacs-ca66efd171d96397b9f07240b91ea70d662af095.zip
(defgroup dired): Use `files' as parent.
(dired-get-filename): Ignore handler if it has safe-magic prop.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/dired.el21
1 files changed, 14 insertions, 7 deletions
diff --git a/lisp/dired.el b/lisp/dired.el
index ba19f047347..eef78d94805 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -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 @@ Optional arg NO-ERROR-IF-NOT-FILEP means return nil if no filename on
((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)))))