From: Eric S. Raymond Date: Thu, 27 Dec 2007 15:26:02 +0000 (+0000) Subject: Refactoring step. X-Git-Tag: emacs-pretest-23.0.90~8810 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ba0f59050f279d1be287db261179827990281248;p=emacs.git Refactoring step. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a5f568db299..e1a67725f6b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -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 * 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 * 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 diff --git a/lisp/vc.el b/lisp/vc.el index eca24b124d0..3e3fa907ed9 100644 --- a/lisp/vc.el +++ b/lisp/vc.el @@ -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))