git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[RFH - Tcl/Tk] use of procedure before declaration?

From
Philip Oakley <philipoakley@iee.org>
Date
Jan 16, 2017, 22:45 UTC
Message-ID
<F9099DB3F0374D898776BD2621BF36FA@PhilipOakley>

I'm looking into a user git-gui problem (https://github.com/git-for-windows/git/issues/1014) that I'd seen in the past - I'd started some patches back in Dec 2015 http://public-inbox.org/git/1450310287-4936-1-git-send-email-philipoakley@iee.org/

I'm trying to make sure I have covered the corner cases correctly, and I'm not sure if the current code actually works as advertised.

In https://github.com/git/git/blob/master/git-gui/lib/choose_repository.tcl#L242 the procedure `_unset_recentrepo` is called, however the procedure isn't declared until line 248. My reading of the various Tcl tutorials suggest (but not explictly) that this isn't the right way.

Should 3c6a287 ("git-gui: Keep repo_config(gui.recentrepos) and .gitconfig in sync", 2010-01-23) have declared `proc _unset_recentrepo {p}` before `proc _get_recentrepos {}` ?

--
Philip
Next: Johannes Schindelin
Message 1 of 4 in “[RFH - Tcl/Tk] use of procedure before declaration?”
  1. Philip OakleyJan 16, 2017
  2. Johannes SchindelinJan 17, 2017
  3. Philip OakleyJan 17, 2017
  4. Konstantin KhomoutovJan 18, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.