]> code.delx.au - gnu-emacs/blobdiff - lisp/pcmpl-cvs.el
Use set-face-underline rather than the alias set-face-underline-p
[gnu-emacs] / lisp / pcmpl-cvs.el
index f0055091926fc608b1e432acba672920bf91360f..7a23b5f609001f6d33157869bf7c01ac2c79eca4 100644 (file)
@@ -1,15 +1,16 @@
 ;;; pcmpl-cvs.el --- functions for dealing with cvs completions
 
-;; Copyright (C) 1999, 2000, 2002 Free Software Foundation
+;; Copyright (C) 1999-2012 Free Software Foundation, Inc.
 
 ;; Author: John Wiegley <johnw@gnu.org>
+;; Package: pcomplete
 
 ;; This file is part of GNU Emacs.
 
-;; GNU Emacs is free software; you can redistribute it and/or modify
+;; GNU Emacs is free software: you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
-;; any later version.
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
 
 ;; GNU Emacs is distributed in the hope that it will be useful,
 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -17,9 +18,7 @@
 ;; GNU General Public License for more details.
 
 ;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
 
 ;;; Commentary:
 
 (require 'executable)
 
 (defgroup pcmpl-cvs nil
-  "Functions for dealing with CVS completions"
+  "Functions for dealing with CVS completions."
   :group 'pcomplete)
 
 ;; User Variables:
 
 (defcustom pcmpl-cvs-binary (or (executable-find "cvs") "cvs")
-  "*The full path of the 'cvs' binary."
+  "The full path of the 'cvs' binary."
   :type 'file
   :group 'pcmpl-cvs)
 
                    "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)))))))
 
@@ -170,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)))