From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 199 invoked by alias); 18 Oct 2015 18:38:51 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 36888 Received: (qmail 15218 invoked from network); 18 Oct 2015 18:38:49 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.0 From: Frank Terbeck To: zsh-workers@zsh.org Subject: [PATCH] vcs_info: Prevent warn_create_global warning with '-preinit-' state Date: Sun, 18 Oct 2015 20:27:55 +0200 Message-Id: <1445192875-23656-1-git-send-email-ft@bewatermyfriend.org> X-Mailer: git-send-email 2.1.4 X-Df-Sender: NDMwNDQ0 This is related to 33405. Turns out that not all other calls to VCS_INFO_set are okay: With recent zsh versions the early call to that function with the '-preinit-' argument causes a warning like this: VCS_INFO_set:9: math parameter maxexports created globally in function VCS_INFO_set This fixes it. --- Functions/VCS_Info/vcs_info | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Functions/VCS_Info/vcs_info b/Functions/VCS_Info/vcs_info index 350b189..628dde9 100644 --- a/Functions/VCS_Info/vcs_info +++ b/Functions/VCS_Info/vcs_info @@ -11,6 +11,7 @@ setopt localoptions noksharrays extendedglob NO_shwordsplit local file func sys local -a static_functions +local -i maxexports static_functions=( VCS_INFO_adjust @@ -38,6 +39,7 @@ for func in ${static_functions} ; do done [[ -n ${(Mk)parameters:#vcs_info_msg_<->_} ]] && unset ${parameters[(I)vcs_info_msg_<->_]} +VCS_INFO_maxexports VCS_INFO_set --nvcs '-preinit-' vcs_info_setsys -- 2.1.4