Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm
Precedence: bulk
X-No-Archive: yes
List-Id: Zsh Workers List <zsh-workers.zsh.org>
List-Post: <mailto:zsh-workers@zsh.org>
List-Help: <mailto:zsh-workers-help@zsh.org>
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
Date: Fri, 15 Jan 2016 06:26:47 +0000
From: Daniel Shahaf <d.s@daniel.shahaf.name>
To: zsh-workers@zsh.org
Subject: zle-line-pre-redraw_hooks
Message-ID: <20160115062647.GA28411@tarsus.local2>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
User-Agent: Mutt/1.5.23 (2014-03-12)
X-Seq: zsh-workers 37639

If a user has two different plugins that each want to be invoked from
a pre-redraw hook, right now there is no easy way to achieve that.

Would it make sense to provide a way to register multiple
zle-line-pre-redraw hooks?  Similar to $chpwd_functions?

Concrete suggestion: ship a default implementation of zle-line-pre-redraw
that invokes all functions in $zle_line_pre_redraw_hooks, for example,
by using callhookfunc().¹

Makes sense?

Cheers,

Daniel

¹ It should probably skip the block starting in utils.c:1473 to avoid
having both z-l-p-redraw and z_l_p_redraw, former a widget and latter
a function that widget calls: the names would be too similar.

