[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master b6babe9: lisp/speedbar.el: Fix computation of boole
From: |
Juanma Barranquero |
Subject: |
[Emacs-diffs] master b6babe9: lisp/speedbar.el: Fix computation of boolean return values |
Date: |
Wed, 16 Oct 2019 08:38:41 -0400 (EDT) |
branch: master
commit b6babe9b4459763889d74d455005d6765df8686d
Author: Juanma Barranquero <address@hidden>
Commit: Juanma Barranquero <address@hidden>
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.
---
lisp/speedbar.el | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/lisp/speedbar.el b/lisp/speedbar.el
index addb2b4..df9e932 100644
--- a/lisp/speedbar.el
+++ b/lisp/speedbar.el
@@ -2934,7 +2934,8 @@ the file being checked."
(if (<= 2 speedbar-verbosity-level)
(dframe-message "Speedbar vc check...%s" fulln))
(and (file-writable-p fulln)
- (speedbar-this-file-in-vc f fn))))
+ (speedbar-this-file-in-vc f fn)
+ t)))
(defun speedbar-vc-check-dir-p (directory)
"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."
))
(defun speedbar-this-file-in-vc (directory name)
- "Check to see if the file in DIRECTORY with NAME is in a version control
system.
+ "Return non-nil if the file NAME in DIRECTORY is under version control.
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
(vc-backend (concat directory "/" name))
;; User extension
- (run-hook-with-args 'speedbar-vc-in-control-hook directory name)
+ (run-hook-with-args-until-success 'speedbar-vc-in-control-hook
+ directory name)
))
;; Object File scanning
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master b6babe9: lisp/speedbar.el: Fix computation of boolean return values,
Juanma Barranquero <=