Function: viper-get-filenames-from-buffer
viper-get-filenames-from-buffer is a byte-compiled function defined in
viper-util.el.gz.
Signature
(viper-get-filenames-from-buffer &optional ONE-PER-LINE)
Source Code
;; Defined in /usr/src/emacs/lisp/emulation/viper-util.el.gz
;; Interpret the stuff in the buffer as a list of file names
;; return a list of file names listed in the buffer beginning at point
;; If optional arg is supplied, assume each filename is listed on a separate
;; line
(defun viper-get-filenames-from-buffer (&optional one-per-line)
(let ((skip-chars (if one-per-line "\t\n" " \t\n"))
result fname delim)
(skip-chars-forward skip-chars)
(while (not (eobp))
(if (cond ((looking-at "\"")
(setq delim ?\")
(re-search-forward "[^\"]+" nil t)) ; noerror
((looking-at "'")
(setq delim ?')
(re-search-forward "[^']+" nil t)) ; noerror
(t
(re-search-forward
(concat "[^" skip-chars "]+") nil t))) ;noerror
(setq fname
(buffer-substring (match-beginning 0) (match-end 0))))
(if delim
(forward-char 1))
(skip-chars-forward " \t\n")
(setq result (cons fname result)))
result))