emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/vc.el,v


From: Eric S. Raymond
Subject: [Emacs-diffs] Changes to emacs/lisp/vc.el,v
Date: Thu, 27 Dec 2007 14:41:46 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Eric S. Raymond <esr>   07/12/27 14:41:46

Index: vc.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/vc.el,v
retrieving revision 1.495
retrieving revision 1.496
diff -u -b -r1.495 -r1.496
--- vc.el       27 Dec 2007 11:26:26 -0000      1.495
+++ vc.el       27 Dec 2007 14:41:43 -0000      1.496
@@ -2327,6 +2327,16 @@
       (replace-match (substring (concat vc-info "          ") 0 10)
                      t t nil 1)))
 
+(defun vc-dired-ignorable-p (filename)
+  "Should FILENAME be ignored in VC-Dired listings?"
+  (catch t 
+    (dolist (ignorable completion-ignored-extensions)
+      (let ((ext (substring filename 
+                             (- (length filename)
+                                (length ignorable)))))
+       (if (string= ignorable ext) (throw t t))))
+    nil))
+
 (defun vc-dired-hook ()
   "Reformat the listing according to version control.
 Called by dired after any portion of a vc-dired buffer has been read in."
@@ -2372,7 +2382,11 @@
            (t
             (vc-dired-reformat-line nil)
             (forward-line 1))))
-         ;; ordinary file
+        ;; try to head off calling the expensive state query -
+        ;; ignore object files, TeX intermediate files, and so forth.
+        ((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))))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]