# HG changeset patch # User Dan Nicolaescu # Date 1235534408 0 # Node ID a52c9332c41cce95ddb466134fabcd5a48b3e8dd # Parent 50330dd7aee8162dfd73e3b88bb317d846ea0595 (vc-dir-update): Make sure ./ is always first in the listing. diff -r 50330dd7aee8 -r a52c9332c41c lisp/ChangeLog --- a/lisp/ChangeLog Wed Feb 25 03:58:48 2009 +0000 +++ b/lisp/ChangeLog Wed Feb 25 04:00:08 2009 +0000 @@ -1,6 +1,10 @@ +2009-02-25 Dan Nicolaescu + + * vc-dir.el (vc-dir-update): Make sure ./ is always first in the listing. + 2009-02-25 David Reitter - * mail/mailclient.el: declare clipboard-kill-ring-save + * mail/mailclient.el (clipboard-kill-ring-save): Declare. 2009-02-25 Kenichi Handa diff -r 50330dd7aee8 -r a52c9332c41c lisp/vc-dir.el --- a/lisp/vc-dir.el Wed Feb 25 03:58:48 2009 +0000 +++ b/lisp/vc-dir.el Wed Feb 25 04:00:08 2009 +0000 @@ -351,13 +351,13 @@ ((string< (car entry1) (car entry2)))))))) ;; Insert directory entries in the right places. (let ((entry (car entries)) - (node (ewoc-nth vc-ewoc 0))) + (node (ewoc-nth vc-ewoc 0)) + (dotname (file-relative-name default-directory))) ;; Insert . if it is not present. (unless node - (let ((rd (file-relative-name default-directory))) - (ewoc-enter-last - vc-ewoc (vc-dir-create-fileinfo - rd nil nil nil (expand-file-name default-directory)))) + (ewoc-enter-last + vc-ewoc (vc-dir-create-fileinfo + dotname nil nil nil (expand-file-name default-directory))) (setq node (ewoc-nth vc-ewoc 0))) (while (and entry node) @@ -372,6 +372,8 @@ ;; Found the directory, find the place for the file name. (let ((nodefile (vc-dir-fileinfo->name (ewoc-data node)))) (cond + ((string= nodefile dotname) + (setq node (ewoc-next vc-ewoc node))) ((string-lessp nodefile entryfile) (setq node (ewoc-next vc-ewoc node))) ((string-equal nodefile entryfile)