From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14146 invoked from network); 9 Oct 2003 16:41:44 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 9 Oct 2003 16:41:44 -0000 Received: (qmail 23424 invoked by alias); 9 Oct 2003 16:41:18 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 6672 Received: (qmail 23391 invoked from network); 9 Oct 2003 16:41:16 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 9 Oct 2003 16:41:16 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [4.3.58.249] by sunsite.dk (MessageWall 1.0.8) with SMTP; 9 Oct 2003 16:41:16 -0000 Received: (from schaefer@localhost) by candle.brasslantern.com (8.11.6/8.11.6) id h99GfAh10436 for zsh-users@sunsite.dk; Thu, 9 Oct 2003 09:41:10 -0700 From: Bart Schaefer Message-Id: <1031009164110.ZM10435@candle.brasslantern.com> Date: Thu, 9 Oct 2003 16:41:10 +0000 In-Reply-To: <20031009150907.GA847@DervishD> Comments: In reply to DervishD "How to execute a command upon loading a module" (Oct 9, 5:09pm) References: <20031009150907.GA847@DervishD> X-Mailer: Z-Mail (5.0.0 30July97) To: Zsh Users Subject: Re: How to execute a command upon loading a module MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Oct 9, 5:09pm, DervishD wrote: } } I want to modify the listscroll and menuselect keymaps when } zsh/complist (this is the module which defines it, isn't it? Yes. } Since the keymaps doesn't exist until the module is loaded, I } cannot modify them to my likings :(( Can I execute shell code just } after a module is loaded? No, there is no emacs-like eval-after-load hook. } Can I *create* those keymaps, modify them and expect the corresponding } modules doesn't modify them again? No, the module forcibly re-creates and initializes the keymap, discarding any existing keymap by that name -- and unloading the module deletes the keymap. It'd be nice if complist were a little more careful about this, i.e., check whether the keymap exists and selectively update it, but no. The only thing you can do is explicitly load the module and then change the bindings.