emacs-diffs
[Top][All Lists]
Advanced

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

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


From: Eric S. Raymond
Subject: [Emacs-diffs] Changes to emacs/lisp/speedbar.el,v
Date: Fri, 28 Dec 2007 13:29:44 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Eric S. Raymond <esr>   07/12/28 13:29:43

Index: speedbar.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/speedbar.el,v
retrieving revision 1.90
retrieving revision 1.91
diff -u -b -r1.90 -r1.91
--- speedbar.el 22 Sep 2007 01:50:53 -0000      1.90
+++ speedbar.el 28 Dec 2007 13:29:41 -0000      1.91
@@ -657,10 +657,11 @@
               speedbar-ignored-directory-regexp
               (speedbar-extension-list-to-regex val))))
 
-(defcustom speedbar-directory-unshown-regexp 
"^\\(CVS\\|RCS\\|SCCS\\|\\..*\\)\\'"
+(defcustom speedbar-directory-unshown-regexp "^\\(\\..*\\)\\'"
   "*Regular expression matching directories not to show in speedbar.
 They should include commonly existing directories which are not
-useful, such as version control."
+useful.  It is no longer necessary to include include version-control
+directories here; see \\[vc-directory-exclusion-list\\]."
   :group 'speedbar
   :type 'string)
 
@@ -1917,6 +1918,7 @@
        (while dir
          (if (not
               (or (string-match speedbar-file-unshown-regexp (car dir))
+                  (member (car dir) vc-directory-exclusion-list)
                   (string-match speedbar-directory-unshown-regexp (car dir))))
              (if (file-directory-p (car dir))
                  (setq dirs (cons (car dir) dirs))
@@ -2972,18 +2974,8 @@
   "Return t if we should bother checking DIRECTORY for version control files.
 This can be overloaded to add new types of version control systems."
   (or
-   ;; Local CVS available in Emacs 21
-   (and (fboundp 'vc-state)
-       (file-exists-p (concat directory "CVS/")))
-   ;; Local RCS
-   (file-exists-p (concat directory "RCS/"))
-   ;; Local SCCS
-   (file-exists-p (concat directory "SCCS/"))
-   ;; Remote SCCS project
-   (let ((proj-dir (getenv "PROJECTDIR")))
-     (if proj-dir
-        (file-exists-p (concat proj-dir "/SCCS"))
-       nil))
+   (catch t (dolist (vcd vc-directory-exclusion-list)
+             (if (file-exists-p (concat directory vcd)) (throw t t))) nil)
    ;; User extension
    (run-hook-with-args-until-success 'speedbar-vc-directory-enable-hook
                                      directory)
@@ -2991,29 +2983,11 @@
 
 (defun speedbar-this-file-in-vc (directory name)
   "Check to see if the file in DIRECTORY with NAME is in a version control 
system.
-You can add new VC systems by overriding this function.  You can
+Automatically recognizes all VCs supported by VC mode.  You can
 optimize this function by overriding it and only doing those checks
 that will occur on your system."
   (or
-   (if (fboundp 'vc-state)
-       ;; Emacs 21 handles VC state in a nice way.
-       (condition-case nil
-          (let ((state  (vc-state (concat directory name))))
-            (not (or (eq 'up-to-date state)
-                     (null state))))
-        ;; An error means not in a VC system
-        (error nil))
-     (or
-      ;; RCS file name
-      (file-exists-p (concat directory "RCS/" name ",v"))
-      (file-exists-p (concat directory "RCS/" name))
-      ;; Local SCCS file name
-      (file-exists-p (concat directory "SCCS/s." name))
-      ;; Remote SCCS file name
-      (let ((proj-dir (getenv "PROJECTDIR")))
-       (if proj-dir
-           (file-exists-p (concat proj-dir "/SCCS/s." name))
-         nil))))
+   (vc-backend (concat directory "/" name)
    ;; User extension
    (run-hook-with-args 'speedbar-vc-in-control-hook directory name)
    ))




reply via email to

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