changeset 18040:89969b579beb

(file-name-non-special): Special handling for substitute-in-file-name operation.
author Richard M. Stallman <rms@gnu.org>
date Fri, 30 May 1997 06:38:56 +0000
parents 0696d4c9aa15
children 263f17563fa5
files lisp/files.el
diffstat 1 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/files.el	Fri May 30 05:49:27 1997 +0000
+++ b/lisp/files.el	Fri May 30 06:38:56 1997 +0000
@@ -2956,6 +2956,9 @@
 			;; 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 @@
 	(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)