changeset 87435:13951469ac3a

Refactoring step.
author Eric S. Raymond <esr@snark.thyrsus.com>
date Thu, 27 Dec 2007 15:26:02 +0000
parents 4d223562bbfa
children a5a588610e41
files lisp/ChangeLog lisp/vc.el
diffstat 2 files changed, 13 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Thu Dec 27 14:41:44 2007 +0000
+++ b/lisp/ChangeLog	Thu Dec 27 15:26:02 2007 +0000
@@ -5,6 +5,8 @@
 	ignorted in VC-Dired listings, heading off lots of expensive calls
 	to (vc-state).
 
+	* vc.el (vc-dired-hook): Refactoring step.  
+
 2007-12-27  Vinicius Jose Latorre  <viniciusjl@ig.com.br>
 
 	* ps-print.el (ps-mark-active-p): Fun returned back.
@@ -18,12 +20,12 @@
 	with 'e' in a log-view buffer.  Not documented yet as this
 	only works for SCCS, RCS, and maybe CVS if you have admin
 	privileges.  When we have backend support for Subversion and
-	more modern systems it will ve time to write this up.
+	more modern systems it will be time to write this up.
 
 2007-12-27  Kenichi Handa  <handa@ni.aist.go.jp>
 
 	* international/mule-cmds.el (select-safe-coding-system): When a
-	buffer is modfied, cancel the writing.
+	buffer is modified, cancel the writing.
 
 2007-12-26  Eric S. Raymond  <esr@snark.thyrsus.com>
 
--- a/lisp/vc.el	Thu Dec 27 14:41:44 2007 +0000
+++ b/lisp/vc.el	Thu Dec 27 15:26:02 2007 +0000
@@ -2387,13 +2387,16 @@
 	 ((vc-dired-ignorable-p filename)
 	  (dired-kill-line))
          ;; ordinary file -- call the (possibly expensive) state query
-         ((and (vc-backend filename)
-	       (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
-          (dired-kill-line))))
+	  (let ((backend (vc-backend filename)))
+	    (cond
+	     ((and backend
+		   (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
+	      (dired-kill-line)))))))
        ;; any other line
        (t (forward-line 1))))
     (vc-dired-purge))