]> git.eshelyaron.com Git - emacs.git/commitdiff
(find-file-noselect): Let /: suppress wildcard matching.
authorRichard M. Stallman <rms@gnu.org>
Sun, 3 Jan 1999 15:03:32 +0000 (15:03 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sun, 3 Jan 1999 15:03:32 +0000 (15:03 +0000)
Error if wildcard matches no files.

lisp/files.el

index c4e16fae2529428866fe03713b283cea1c6a87de..ac9153bc87c2cae9f99884801ae42a2f0e75781d 100644 (file)
@@ -891,9 +891,12 @@ Optional second arg RAWFILE non-nil means the file is read literally."
                            filename))
        (error "%s is a directory" filename))
     (if (and find-file-wildcards
+            (not (string-match "\\`/:" filename))
             (string-match "[[*?]" filename))
        (let ((files (file-expand-wildcards filename t))
              (find-file-wildcards nil))
+         (if (null files)
+             (error "No files match `%s'" filename))
          (car (mapcar #'(lambda (fn) (find-file-noselect fn))
                       files)))
       (let* ((buf (get-file-buffer filename))