mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-04-27 16:51:06 -07:00
Remove extra process call from vc-hg-registered
Prefer vc-state to benefit from its caching (bug#44534)
This same technique is used in vc-git.el,
per commit 2018-06-28 "Remove extra process call from vc-git-find-file-hook"
93c41ce6aa.
* lisp/vc/vc-hg.el (vc-hg-registered): Use vc-state rather than vc-hg-state.
This commit is contained in:
parent
f1eca59dfa
commit
b5b0f07b0a
1 changed files with 1 additions and 1 deletions
|
|
@ -222,7 +222,7 @@ If `ask', you will be prompted for a branch type."
|
|||
(defun vc-hg-registered (file)
|
||||
"Return non-nil if FILE is registered with hg."
|
||||
(when (vc-hg-root file) ; short cut
|
||||
(let ((state (vc-hg-state file))) ; expensive
|
||||
(let ((state (vc-state file 'Hg))) ; expensive
|
||||
(and state (not (memq state '(ignored unregistered)))))))
|
||||
|
||||
(defun vc-hg-state (file)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue