summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1997-05-30 06:38:56 +0000
committerRichard M. Stallman <rms@gnu.org>1997-05-30 06:38:56 +0000
commit18b9dced5bd5e58f9df7961754404df6987afe92 (patch)
tree8fe7e80ca5dc9aea5937a0ada009e143e7dd28d5
parent8615e792428131034d4c6f4ed6681ac2ffaf67dd (diff)
downloademacs-18b9dced5bd5e58f9df7961754404df6987afe92.tar.gz
(file-name-non-special): Special handling for
substitute-in-file-name operation.
-rw-r--r--lisp/files.el9
1 files changed, 7 insertions, 2 deletions
diff --git a/lisp/files.el b/lisp/files.el
index 01873bf9d93..d481f3370ed 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -2956,6 +2956,9 @@ With prefix arg, silently save all file-visiting buffers, then kill."
;; in the return value.
;; So just avoid stripping it in the first place.
'((expand-file-name . nil)
+ ;; `identity' means just return the first arg
+ ;; as stripped of its quoting.
+ (substitute-in-file-name . identity)
(file-name-directory . nil)
(file-name-as-directory . nil)
(directory-file-name . nil)
@@ -2970,13 +2973,15 @@ With prefix arg, silently save all file-visiting buffers, then kill."
(arguments (copy-sequence arguments)))
;; Strip off the /: from the file names that have this handler.
(save-match-data
- (while file-arg-indices
+ (while (consp file-arg-indices)
(and (nth (car file-arg-indices) arguments)
(string-match "\\`/:" (nth (car file-arg-indices) arguments))
(setcar (nthcdr (car file-arg-indices) arguments)
(substring (nth (car file-arg-indices) arguments) 2)))
(setq file-arg-indices (cdr file-arg-indices))))
- (apply operation arguments)))
+ (if (eq file-arg-indices 'identity)
+ (car arguments)
+ (apply operation arguments))))
(define-key ctl-x-map "\C-f" 'find-file)
(define-key ctl-x-map "\C-q" 'toggle-read-only)