mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-25 07:28:20 +00:00
* lisp/pcmpl-cvs.el (pcmpl-cvs-entries): Don't assume CVS/Entries exists.
This commit is contained in:
parent
8994590317
commit
2b0459cd8e
@ -164,27 +164,28 @@ operation character applies, as displayed by 'cvs -n update'."
|
||||
(with-temp-buffer
|
||||
(and dir (cd dir))
|
||||
(call-process pcmpl-cvs-binary nil t nil
|
||||
"-q" "-n" "-f" "update"); "-l")
|
||||
"-q" "-n" "-f" "update") ; "-l")
|
||||
(goto-char (point-min))
|
||||
(while (re-search-forward "^\\(.\\) \\(.+\\)$" nil t)
|
||||
(if (memq (string-to-char (match-string 1)) opers)
|
||||
(setq entries (cons (match-string 2) entries)))))
|
||||
(with-temp-buffer
|
||||
(insert-file-contents (concat dir "CVS/Entries"))
|
||||
(goto-char (point-min))
|
||||
(while (not (eobp))
|
||||
;; Normal file: /NAME -> "" "NAME"
|
||||
;; Directory : D/NAME -> "D" "NAME"
|
||||
(let* ((fields (split-string (buffer-substring
|
||||
(line-beginning-position)
|
||||
(line-end-position))
|
||||
"/"))
|
||||
(text (nth 1 fields)))
|
||||
(when text
|
||||
(if (string= (nth 0 fields) "D")
|
||||
(setq text (file-name-as-directory text)))
|
||||
(setq entries (cons text entries))))
|
||||
(forward-line))))
|
||||
(when (file-exists-p (expand-file-name "CVS/Entries" dir))
|
||||
(with-temp-buffer
|
||||
(insert-file-contents (expand-file-name "CVS/Entries" dir))
|
||||
(goto-char (point-min))
|
||||
(while (not (eobp))
|
||||
;; Normal file: /NAME -> "" "NAME"
|
||||
;; Directory : D/NAME -> "D" "NAME"
|
||||
(let* ((fields (split-string (buffer-substring
|
||||
(line-beginning-position)
|
||||
(line-end-position))
|
||||
"/"))
|
||||
(text (nth 1 fields)))
|
||||
(when text
|
||||
(if (string= (nth 0 fields) "D")
|
||||
(setq text (file-name-as-directory text)))
|
||||
(setq entries (cons text entries))))
|
||||
(forward-line)))))
|
||||
(setq pcomplete-stub nondir)
|
||||
(pcomplete-uniqify-list entries)))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user