]> code.delx.au - gnu-emacs/commitdiff
pcmpl-cvs.el fix for bug#9606
authorGlenn Morris <rgm@gnu.org>
Tue, 27 Sep 2011 18:09:43 +0000 (14:09 -0400)
committerGlenn Morris <rgm@gnu.org>
Tue, 27 Sep 2011 18:09:43 +0000 (14:09 -0400)
* lisp/pcmpl-cvs.el (pcmpl-cvs-entries): Update for Emacs 22.1 changes
to split-string.

lisp/ChangeLog
lisp/pcmpl-cvs.el

index 8bbb7f5fcc85c886398dbe07a7115ceb1282ca29..b258f1081b0aa678fe7e75894aadbbec507d9599 100644 (file)
@@ -1,3 +1,8 @@
+2011-09-27  Glenn Morris  <rgm@gnu.org>
+
+       * pcmpl-cvs.el (pcmpl-cvs-entries): Update for Emacs 22.1 changes
+       to split-string.  (Bug#9606)
+
 2011-09-27  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
        * mail/smtpmail.el (smtpmail-via-smtp): Fix STARTTLS detection
index b6c5eb62b17d54dce835c5269c48165cecd67620..3ff07bca20e07226f748c32a1648457ddfe4f574 100644 (file)
@@ -169,13 +169,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)))