Mercurial > emacs
changeset 87436:a5a588610e41
* vc.el (vc-dired-hook): Show unregistered file status as "?" in
non-terse mode.
(vc-dired-ignorable-p): Ignore Makefile when it has a peer named
Makefile.in or Makefile.am
author | Eric S. Raymond <esr@snark.thyrsus.com> |
---|---|
date | Thu, 27 Dec 2007 16:17:17 +0000 |
parents | 13951469ac3a |
children | f18b45437f89 |
files | lisp/ChangeLog lisp/vc.el |
diffstat | 2 files changed, 22 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Thu Dec 27 15:26:02 2007 +0000 +++ b/lisp/ChangeLog Thu Dec 27 16:17:17 2007 +0000 @@ -5,7 +5,10 @@ ignorted in VC-Dired listings, heading off lots of expensive calls to (vc-state). - * vc.el (vc-dired-hook): Refactoring step. + * vc.el (vc-dired-hook): Show unregistered file status as "?" in + non-terse mode. + (vc-dired-ignorable-p): Ignore Makefile when it has a peer named + Makefile.in or Makefile.am 2007-12-27 Vinicius Jose Latorre <viniciusjl@ig.com.br>
--- a/lisp/vc.el Thu Dec 27 15:26:02 2007 +0000 +++ b/lisp/vc.el Thu Dec 27 16:17:17 2007 +0000 @@ -2330,11 +2330,18 @@ (defun vc-dired-ignorable-p (filename) "Should FILENAME be ignored in VC-Dired listings?" (catch t + ;; Ignore anything that wouldn't be found by completion (.o, .la, etc.) (dolist (ignorable completion-ignored-extensions) (let ((ext (substring filename (- (length filename) (length ignorable))))) (if (string= ignorable ext) (throw t t)))) + ;; Ignore Makefiles derived from something else + (when (string= (file-name-nondirectory filename) "Makefile") + (let* ((dir (file-name-directory filename)) + (peers (directory-files (or dir default-directory)))) + (if (or (member "Makefile.in" peers) (member "Makefile.am" peers)) + (throw t t)))) nil)) (defun vc-dired-hook () @@ -2390,12 +2397,18 @@ (t (let ((backend (vc-backend filename))) (cond - ((and backend - (not (and vc-dired-terse-mode - (vc-up-to-date-p filename)))) + ;; Not registered + ((not backend) + (if vc-dired-terse-mode + (dired-kill-line) + (vc-dired-reformat-line "?") + (forward-line 1))) + ;; Either we're in non-terse mode or it's out of date + ((not (and vc-dired-terse-mode (vc-up-to-date-p filename))) (vc-dired-reformat-line (vc-call dired-state-info filename)) (forward-line 1)) - (t + ;; Remaining cases are under version control but uninteresting + (t (dired-kill-line))))))) ;; any other line (t (forward-line 1)))) @@ -2405,7 +2418,7 @@ (widen) (cond ((eq (count-lines (point-min) (point-max)) 1) (goto-char (point-min)) - (message "No files locked under %s" default-directory))))) + (message "No changes pending under %s" default-directory))))) (defun vc-dired-purge () "Remove empty subdirs."