]> git.eshelyaron.com Git - emacs.git/commitdiff
(insert-directory): Use -- as arg
authorRichard M. Stallman <rms@gnu.org>
Tue, 31 Dec 1996 04:50:27 +0000 (04:50 +0000)
committerRichard M. Stallman <rms@gnu.org>
Tue, 31 Dec 1996 04:50:27 +0000 (04:50 +0000)
so that a file name or pattern is never taken as an option.

lisp/files.el

index 1341cd909b2d092b89be798f49b48809a6b8325b..f62e7d9aa0cc73a5f49942180801a3ee030a691b 100644 (file)
@@ -2726,7 +2726,7 @@ If WILDCARD, it also runs the shell specified by `shell-file-name'."
                                                (if (stringp switches)
                                                    switches
                                                  (mapconcat 'identity switches " "))
-                                               " "
+                                               " -- "
                                                pattern)))
                 ;; SunOS 4.1.3, SVr4 and others need the "." to list the
                 ;; directory if FILE is a symbolic link.
@@ -2745,6 +2745,8 @@ If WILDCARD, it also runs the shell specified by `shell-file-name'."
                                          switches (substring switches (match-end 0))))
                                  (setq list (nreverse (cons switches list))))))
                          (append list
+                                 ;; Avoid lossage if FILE starts with `-'.
+                                 '("--")
                                  (list
                                   (if full-directory-p
                                       (concat (file-name-as-directory file) ".")