# HG changeset patch # User Andr Spiegel # Date 897650017 0 # Node ID 9d9df85eb7fbf8182781f45a8c6ba3941737ebbf # Parent 337f283a80356b85eb30faea2c4815e1b9a43513 (vc-dired-hook): Don't use dired-kill-line to remove directory lines in terse mode. (vc-dired-purge): If the top level dir is empty, make it look a little nicer. diff -r 337f283a8035 -r 9d9df85eb7fb lisp/vc.el --- a/lisp/vc.el Fri Jun 12 08:55:04 1998 +0000 +++ b/lisp/vc.el Fri Jun 12 11:13:37 1998 +0000 @@ -5,7 +5,7 @@ ;; Author: Eric S. Raymond ;; Maintainer: Andre Spiegel -;; $Id: vc.el,v 1.229 1998/06/05 12:46:29 spiegel Exp spiegel $ +;; $Id: vc.el,v 1.230 1998/06/11 15:33:13 spiegel Exp spiegel $ ;; This file is part of GNU Emacs. @@ -1761,7 +1761,11 @@ (goto-char pos) (dired-kill-line))) (vc-dired-terse-mode - (dired-kill-line)) + ;; Don't show directories in terse mode. Don't use + ;; dired-kill-line to remove it, because in recursive listings, + ;; that would remove the directory contents as well. + (delete-region (progn (beginning-of-line) (point)) + (progn (forward-line 1) (point)))) ((string-match "\\`\\.\\.?\\'" (file-name-nondirectory filename)) (dired-kill-line)) (t @@ -1785,8 +1789,9 @@ (message "Getting version information... done") (save-restriction (widen) - (if (eq (count-lines (point-min) (point-max)) 2) - (message "No files locked under %s" default-directory)))) + (cond ((eq (count-lines (point-min) (point-max)) 1) + (goto-char (point-min)) + (message "No files locked under %s" default-directory))))) (defun vc-dired-purge () ;; Remove empty subdirs @@ -1800,6 +1805,10 @@ (forward-line -2) (if (not (string= (dired-current-directory) default-directory)) (dired-do-kill-lines t "") + ;; We cannot remove the top level directory. + ;; Just make it look a little nicer. + (forward-line 1) + (kill-line) (if (not (dired-next-subdir 1 t)) (goto-char (point-max)))))) (goto-char (point-min))))