Function: viper-glob-mswindows-files

viper-glob-mswindows-files is a byte-compiled function defined in viper-util.el.gz.

Signature

(viper-glob-mswindows-files FILESPEC)

Source Code

;; Defined in /usr/src/emacs/lisp/emulation/viper-util.el.gz
;; glob windows files
;; LIST is expected to be in reverse order
(defun viper-glob-mswindows-files (filespec)
  (let ((case-fold-search t)
	tmp tmp2)
    (with-current-buffer (get-buffer-create viper-ex-tmp-buf-name)
      (erase-buffer)
      (insert filespec)
      (goto-char (point-min))
      (setq tmp (viper-get-filenames-from-buffer))
      (while tmp
	(setq tmp2 (cons (directory-files
			  ;; the directory part
			  (or (file-name-directory (car tmp))
			      "")
			  t  ; return full names
			  ;; the regexp part: globs the file names
			  (concat "^"
				  (viper-wildcard-to-regexp
				   (file-name-nondirectory (car tmp)))
				  "$"))
			 tmp2))
	(setq tmp (cdr tmp)))
      (reverse (apply #'append tmp2)))))