diff options
| author | Eric S. Raymond | 2007-12-27 14:41:44 +0000 |
|---|---|---|
| committer | Eric S. Raymond | 2007-12-27 14:41:44 +0000 |
| commit | 35d33ce76962929591c2b2e9f2b8c1104cee311e (patch) | |
| tree | 07f0cf1b7d338c43747d6c7f68439ef065402fa9 | |
| parent | 1be05f120f5e57732f5f2860d758736f318e516a (diff) | |
| download | emacs-35d33ce76962929591c2b2e9f2b8c1104cee311e.tar.gz emacs-35d33ce76962929591c2b2e9f2b8c1104cee311e.zip | |
* vc.el (vc-dired-ignorable-p, vc-dired-hook): Speed optimization;
use completion-ignored-extensions to detect files that should be
ignorted in VC-Dired listings, heading off lots of expensive calls
to (vc-state).
| -rw-r--r-- | lisp/ChangeLog | 11 | ||||
| -rw-r--r-- | lisp/vc.el | 16 |
2 files changed, 24 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b1878cef3f5..a5f568db299 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2007-12-27 Eric S. Raymond <esr@snark.thyrsus.com> | ||
| 2 | |||
| 3 | * vc.el (vc-dired-ignorable-p, vc-dired-hook): Speed optimization; | ||
| 4 | use completion-ignored-extensions to detect files that should be | ||
| 5 | ignorted in VC-Dired listings, heading off lots of expensive calls | ||
| 6 | to (vc-state). | ||
| 7 | |||
| 1 | 2007-12-27 Vinicius Jose Latorre <viniciusjl@ig.com.br> | 8 | 2007-12-27 Vinicius Jose Latorre <viniciusjl@ig.com.br> |
| 2 | 9 | ||
| 3 | * ps-print.el (ps-mark-active-p): Fun returned back. | 10 | * ps-print.el (ps-mark-active-p): Fun returned back. |
| @@ -6,8 +13,8 @@ | |||
| 6 | 13 | ||
| 7 | 2007-12-27 Eric S. Raymond <esr@snark.thyrsus.com> | 14 | 2007-12-27 Eric S. Raymond <esr@snark.thyrsus.com> |
| 8 | 15 | ||
| 9 | * (vc.el, vc-sccs.el, vc-rcs.el, vc-cs.el, vc-mcvs.el): Put | 16 | * vc.el, vc-sccs.el, vc-rcs.el, vc-cs.el, vc-mcvs.el: Put |
| 10 | machinery in place to support editing of change comments | 17 | new machinery in place to support editing of change comments |
| 11 | with 'e' in a log-view buffer. Not documented yet as this | 18 | with 'e' in a log-view buffer. Not documented yet as this |
| 12 | only works for SCCS, RCS, and maybe CVS if you have admin | 19 | only works for SCCS, RCS, and maybe CVS if you have admin |
| 13 | privileges. When we have backend support for Subversion and | 20 | privileges. When we have backend support for Subversion and |
diff --git a/lisp/vc.el b/lisp/vc.el index 3d1132aab77..eca24b124d0 100644 --- a/lisp/vc.el +++ b/lisp/vc.el | |||
| @@ -2327,6 +2327,16 @@ This code, like dired, assumes UNIX -l format." | |||
| 2327 | (replace-match (substring (concat vc-info " ") 0 10) | 2327 | (replace-match (substring (concat vc-info " ") 0 10) |
| 2328 | t t nil 1))) | 2328 | t t nil 1))) |
| 2329 | 2329 | ||
| 2330 | (defun vc-dired-ignorable-p (filename) | ||
| 2331 | "Should FILENAME be ignored in VC-Dired listings?" | ||
| 2332 | (catch t | ||
| 2333 | (dolist (ignorable completion-ignored-extensions) | ||
| 2334 | (let ((ext (substring filename | ||
| 2335 | (- (length filename) | ||
| 2336 | (length ignorable))))) | ||
| 2337 | (if (string= ignorable ext) (throw t t)))) | ||
| 2338 | nil)) | ||
| 2339 | |||
| 2330 | (defun vc-dired-hook () | 2340 | (defun vc-dired-hook () |
| 2331 | "Reformat the listing according to version control. | 2341 | "Reformat the listing according to version control. |
| 2332 | Called by dired after any portion of a vc-dired buffer has been read in." | 2342 | Called by dired after any portion of a vc-dired buffer has been read in." |
| @@ -2372,7 +2382,11 @@ Called by dired after any portion of a vc-dired buffer has been read in." | |||
| 2372 | (t | 2382 | (t |
| 2373 | (vc-dired-reformat-line nil) | 2383 | (vc-dired-reformat-line nil) |
| 2374 | (forward-line 1)))) | 2384 | (forward-line 1)))) |
| 2375 | ;; ordinary file | 2385 | ;; try to head off calling the expensive state query - |
| 2386 | ;; ignore object files, TeX intermediate files, and so forth. | ||
| 2387 | ((vc-dired-ignorable-p filename) | ||
| 2388 | (dired-kill-line)) | ||
| 2389 | ;; ordinary file -- call the (possibly expensive) state query | ||
| 2376 | ((and (vc-backend filename) | 2390 | ((and (vc-backend filename) |
| 2377 | (not (and vc-dired-terse-mode | 2391 | (not (and vc-dired-terse-mode |
| 2378 | (vc-up-to-date-p filename)))) | 2392 | (vc-up-to-date-p filename)))) |