aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuanma Barranquero2019-10-16 14:37:06 +0200
committerJuanma Barranquero2019-10-16 14:37:06 +0200
commitb6babe9b4459763889d74d455005d6765df8686d (patch)
tree0d8b8b5330d42c9d09d9dc217a040b06f4812f9c
parent287f5f1fa48ba947c41ad897ba6f5288a166c887 (diff)
downloademacs-b6babe9b4459763889d74d455005d6765df8686d.tar.gz
emacs-b6babe9b4459763889d74d455005d6765df8686d.zip
lisp/speedbar.el: Fix computation of boolean return values
* lisp/speedbar.el (speedbar-check-vc-this-line): Normalize boolean result. (speedbar-this-file-in-vc): Use `run-hook-with-args-until-success' to check for files under versin control. Doc fix.
-rw-r--r--lisp/speedbar.el8
1 files changed, 5 insertions, 3 deletions
diff --git a/lisp/speedbar.el b/lisp/speedbar.el
index addb2b42bb7..df9e932be93 100644
--- a/lisp/speedbar.el
+++ b/lisp/speedbar.el
@@ -2934,7 +2934,8 @@ the file being checked."
2934 (if (<= 2 speedbar-verbosity-level) 2934 (if (<= 2 speedbar-verbosity-level)
2935 (dframe-message "Speedbar vc check...%s" fulln)) 2935 (dframe-message "Speedbar vc check...%s" fulln))
2936 (and (file-writable-p fulln) 2936 (and (file-writable-p fulln)
2937 (speedbar-this-file-in-vc f fn)))) 2937 (speedbar-this-file-in-vc f fn)
2938 t)))
2938 2939
2939(defun speedbar-vc-check-dir-p (directory) 2940(defun speedbar-vc-check-dir-p (directory)
2940 "Return t if we should bother checking DIRECTORY for version control files. 2941 "Return t if we should bother checking DIRECTORY for version control files.
@@ -2948,14 +2949,15 @@ This can be overloaded to add new types of version control systems."
2948 )) 2949 ))
2949 2950
2950(defun speedbar-this-file-in-vc (directory name) 2951(defun speedbar-this-file-in-vc (directory name)
2951 "Check to see if the file in DIRECTORY with NAME is in a version control system. 2952 "Return non-nil if the file NAME in DIRECTORY is under version control.
2952Automatically recognizes all VCs supported by VC mode. You can 2953Automatically recognizes all VCs supported by VC mode. You can
2953optimize this function by overriding it and only doing those checks 2954optimize this function by overriding it and only doing those checks
2954that will occur on your system." 2955that will occur on your system."
2955 (or 2956 (or
2956 (vc-backend (concat directory "/" name)) 2957 (vc-backend (concat directory "/" name))
2957 ;; User extension 2958 ;; User extension
2958 (run-hook-with-args 'speedbar-vc-in-control-hook directory name) 2959 (run-hook-with-args-until-success 'speedbar-vc-in-control-hook
2960 directory name)
2959 )) 2961 ))
2960 2962
2961;; Object File scanning 2963;; Object File scanning