aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric S. Raymond2007-12-27 16:17:17 +0000
committerEric S. Raymond2007-12-27 16:17:17 +0000
commit9580f1fd718feaeeccd7662a4cd379215d0b4415 (patch)
tree69c45739304cf819b6d3f5dfb321f7b48439ee37
parentba0f59050f279d1be287db261179827990281248 (diff)
downloademacs-9580f1fd718feaeeccd7662a4cd379215d0b4415.tar.gz
emacs-9580f1fd718feaeeccd7662a4cd379215d0b4415.zip
* 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
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/vc.el23
2 files changed, 22 insertions, 6 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index e1a67725f6b..8c39318b324 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -5,7 +5,10 @@
5 ignorted in VC-Dired listings, heading off lots of expensive calls 5 ignorted in VC-Dired listings, heading off lots of expensive calls
6 to (vc-state). 6 to (vc-state).
7 7
8 * vc.el (vc-dired-hook): Refactoring step. 8 * vc.el (vc-dired-hook): Show unregistered file status as "?" in
9 non-terse mode.
10 (vc-dired-ignorable-p): Ignore Makefile when it has a peer named
11 Makefile.in or Makefile.am
9 12
102007-12-27 Vinicius Jose Latorre <viniciusjl@ig.com.br> 132007-12-27 Vinicius Jose Latorre <viniciusjl@ig.com.br>
11 14
diff --git a/lisp/vc.el b/lisp/vc.el
index 3e3fa907ed9..c5411718633 100644
--- a/lisp/vc.el
+++ b/lisp/vc.el
@@ -2330,11 +2330,18 @@ This code, like dired, assumes UNIX -l format."
2330(defun vc-dired-ignorable-p (filename) 2330(defun vc-dired-ignorable-p (filename)
2331 "Should FILENAME be ignored in VC-Dired listings?" 2331 "Should FILENAME be ignored in VC-Dired listings?"
2332 (catch t 2332 (catch t
2333 ;; Ignore anything that wouldn't be found by completion (.o, .la, etc.)
2333 (dolist (ignorable completion-ignored-extensions) 2334 (dolist (ignorable completion-ignored-extensions)
2334 (let ((ext (substring filename 2335 (let ((ext (substring filename
2335 (- (length filename) 2336 (- (length filename)
2336 (length ignorable))))) 2337 (length ignorable)))))
2337 (if (string= ignorable ext) (throw t t)))) 2338 (if (string= ignorable ext) (throw t t))))
2339 ;; Ignore Makefiles derived from something else
2340 (when (string= (file-name-nondirectory filename) "Makefile")
2341 (let* ((dir (file-name-directory filename))
2342 (peers (directory-files (or dir default-directory))))
2343 (if (or (member "Makefile.in" peers) (member "Makefile.am" peers))
2344 (throw t t))))
2338 nil)) 2345 nil))
2339 2346
2340(defun vc-dired-hook () 2347(defun vc-dired-hook ()
@@ -2390,12 +2397,18 @@ Called by dired after any portion of a vc-dired buffer has been read in."
2390 (t 2397 (t
2391 (let ((backend (vc-backend filename))) 2398 (let ((backend (vc-backend filename)))
2392 (cond 2399 (cond
2393 ((and backend 2400 ;; Not registered
2394 (not (and vc-dired-terse-mode 2401 ((not backend)
2395 (vc-up-to-date-p filename)))) 2402 (if vc-dired-terse-mode
2403 (dired-kill-line)
2404 (vc-dired-reformat-line "?")
2405 (forward-line 1)))
2406 ;; Either we're in non-terse mode or it's out of date
2407 ((not (and vc-dired-terse-mode (vc-up-to-date-p filename)))
2396 (vc-dired-reformat-line (vc-call dired-state-info filename)) 2408 (vc-dired-reformat-line (vc-call dired-state-info filename))
2397 (forward-line 1)) 2409 (forward-line 1))
2398 (t 2410 ;; Remaining cases are under version control but uninteresting
2411 (t
2399 (dired-kill-line))))))) 2412 (dired-kill-line)))))))
2400 ;; any other line 2413 ;; any other line
2401 (t (forward-line 1)))) 2414 (t (forward-line 1))))
@@ -2405,7 +2418,7 @@ Called by dired after any portion of a vc-dired buffer has been read in."
2405 (widen) 2418 (widen)
2406 (cond ((eq (count-lines (point-min) (point-max)) 1) 2419 (cond ((eq (count-lines (point-min) (point-max)) 1)
2407 (goto-char (point-min)) 2420 (goto-char (point-min))
2408 (message "No files locked under %s" default-directory))))) 2421 (message "No changes pending under %s" default-directory)))))
2409 2422
2410(defun vc-dired-purge () 2423(defun vc-dired-purge ()
2411 "Remove empty subdirs." 2424 "Remove empty subdirs."