X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/c71a0d48f3c880248a7f7f25e92ddbcbad5ef0e7..9a5e2ee3cc86be6b052cba7033a24a8418a263f1:/lisp/pcmpl-cvs.el diff --git a/lisp/pcmpl-cvs.el b/lisp/pcmpl-cvs.el index b6c5eb62b1..7a23b5f609 100644 --- a/lisp/pcmpl-cvs.el +++ b/lisp/pcmpl-cvs.el @@ -1,6 +1,6 @@ ;;; pcmpl-cvs.el --- functions for dealing with cvs completions -;; Copyright (C) 1999-2011 Free Software Foundation, Inc. +;; Copyright (C) 1999-2012 Free Software Foundation, Inc. ;; Author: John Wiegley ;; Package: pcomplete @@ -107,6 +107,10 @@ "j(pcmpl-cvs-tags '(?U ?P))" "I(pcmpl-cvs-entries '(??))W?")) (while (pcomplete-here (pcmpl-cvs-entries '(?U ?P))))) + ((pcomplete-test "status") + (setq pcomplete-help "(cvs)File status") + (pcomplete-opt "vlR") + (while (pcomplete-here (pcmpl-cvs-entries)))) (t (while (pcomplete-here (pcmpl-cvs-entries))))))) @@ -169,13 +173,13 @@ operation character applies, as displayed by 'cvs -n update'." (insert-file-contents (concat dir "CVS/Entries")) (goto-char (point-min)) (while (not (eobp)) - (let* ((line (buffer-substring (line-beginning-position) - (line-end-position))) - (fields (split-string line "/")) - text) - (if (eq (aref line 0) ?/) - (setq fields (cons "" fields))) - (setq text (nth 1 fields)) + ;; 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)))