aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1997-05-30 06:38:56 +0000
committerRichard M. Stallman1997-05-30 06:38:56 +0000
commit18b9dced5bd5e58f9df7961754404df6987afe92 (patch)
tree8fe7e80ca5dc9aea5937a0ada009e143e7dd28d5
parent8615e792428131034d4c6f4ed6681ac2ffaf67dd (diff)
downloademacs-18b9dced5bd5e58f9df7961754404df6987afe92.tar.gz
emacs-18b9dced5bd5e58f9df7961754404df6987afe92.zip
(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."
2956 ;; in the return value. 2956 ;; in the return value.
2957 ;; So just avoid stripping it in the first place. 2957 ;; So just avoid stripping it in the first place.
2958 '((expand-file-name . nil) 2958 '((expand-file-name . nil)
2959 ;; `identity' means just return the first arg
2960 ;; as stripped of its quoting.
2961 (substitute-in-file-name . identity)
2959 (file-name-directory . nil) 2962 (file-name-directory . nil)
2960 (file-name-as-directory . nil) 2963 (file-name-as-directory . nil)
2961 (directory-file-name . nil) 2964 (directory-file-name . nil)
@@ -2970,13 +2973,15 @@ With prefix arg, silently save all file-visiting buffers, then kill."
2970 (arguments (copy-sequence arguments))) 2973 (arguments (copy-sequence arguments)))
2971 ;; Strip off the /: from the file names that have this handler. 2974 ;; Strip off the /: from the file names that have this handler.
2972 (save-match-data 2975 (save-match-data
2973 (while file-arg-indices 2976 (while (consp file-arg-indices)
2974 (and (nth (car file-arg-indices) arguments) 2977 (and (nth (car file-arg-indices) arguments)
2975 (string-match "\\`/:" (nth (car file-arg-indices) arguments)) 2978 (string-match "\\`/:" (nth (car file-arg-indices) arguments))
2976 (setcar (nthcdr (car file-arg-indices) arguments) 2979 (setcar (nthcdr (car file-arg-indices) arguments)
2977 (substring (nth (car file-arg-indices) arguments) 2))) 2980 (substring (nth (car file-arg-indices) arguments) 2)))
2978 (setq file-arg-indices (cdr file-arg-indices)))) 2981 (setq file-arg-indices (cdr file-arg-indices))))
2979 (apply operation arguments))) 2982 (if (eq file-arg-indices 'identity)
2983 (car arguments)
2984 (apply operation arguments))))
2980 2985
2981(define-key ctl-x-map "\C-f" 'find-file) 2986(define-key ctl-x-map "\C-f" 'find-file)
2982(define-key ctl-x-map "\C-q" 'toggle-read-only) 2987(define-key ctl-x-map "\C-q" 'toggle-read-only)