]> code.delx.au - gnu-emacs/commitdiff
(file-name-non-special): If "/:" is the entire file
authorKarl Heuer <kwzh@gnu.org>
Sun, 19 Oct 1997 20:34:22 +0000 (20:34 +0000)
committerKarl Heuer <kwzh@gnu.org>
Sun, 19 Oct 1997 20:34:22 +0000 (20:34 +0000)
name, make it "/" after stripping.

lisp/files.el

index ad4e7708ebf344f2e8cceab5f99b7be1d8e1b1ba..01712f58e7b7fc3cd5435a9f22d3acb38ba06c54 100644 (file)
@@ -3104,10 +3104,13 @@ With prefix arg, silently save all file-visiting buffers, then kill."
     ;; Strip off the /: from the file names that have this handler.
     (save-match-data
       (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)))
+       (let ((pair (nthcdr (car file-arg-indices) arguments)))
+         (and (car pair)
+              (string-match "\\`/:" (car pair))
+              (setcar pair
+                      (if (= (length (car pair)) 2)
+                          "/"
+                        (substring (car pair) 2)))))
        (setq file-arg-indices (cdr file-arg-indices))))
     (if (eq file-arg-indices 'identity)
        (car arguments)