Refactoring step.
authorEric S. Raymond <esr@snark.thyrsus.com>
Thu, 27 Dec 2007 15:26:02 +0000 (15:26 +0000)
committerEric S. Raymond <esr@snark.thyrsus.com>
Thu, 27 Dec 2007 15:26:02 +0000 (15:26 +0000)
lisp/ChangeLog
lisp/vc.el

index a5f568d..e1a6772 100644 (file)
@@ -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.
        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>
 
index eca24b1..3e3fa90 100644 (file)
@@ -2387,13 +2387,16 @@ Called by dired after any portion of a vc-dired buffer has been read in."
         ((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))