From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18391 invoked by alias); 18 Feb 2011 22:30:16 -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: 28773 Received: (qmail 19075 invoked from network); 18 Feb 2011 22:30:09 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at ntlworld.com designates 81.103.221.49 as permitted sender) From: Peter Stephenson To: zsh-workers@zsh.org (Zsh hackers list) Subject: PATCH: zle-history-line-set hook X-Mailer: MH-E 8.2; nmh 1.3; GNU Emacs 23.2.1 Date: Fri, 18 Feb 2011 22:29:58 +0000 Message-ID: <18638.1298068198@pws-pc.ntlworld.com> X-Cloudmark-Analysis: v=1.1 cv=JvdXmxIgLJv2/GthKqHpGJEEHukvLcvELVXUanXFreg= c=1 sm=0 a=sDFrfUh01EgA:10 a=NLZqzBF-AAAA:8 a=aij7wHKmwdLzM6Ev7nkA:9 a=md256ZBrNxelNLun-TUA:7 a=pMFU_5gXAJ0fWpdSbON3RoHVYE4A:4 a=_dQi-Dcv4p4A:10 a=HpAAvcLHHh0Zw7uRqdWCyQ==:117 This is a good place to be able to do highlighting. Index: Doc/Zsh/zle.yo =================================================================== RCS file: /cvsroot/zsh/zsh/Doc/Zsh/zle.yo,v retrieving revision 1.91 diff -p -u -r1.91 zle.yo --- Doc/Zsh/zle.yo 18 Feb 2011 22:08:45 -0000 1.91 +++ Doc/Zsh/zle.yo 18 Feb 2011 22:29:04 -0000 @@ -923,6 +923,10 @@ item(tt(zle-line-finish))( This is similar to tt(zle-line-init) but is executed every time the line editor has finished reading a line of input. ) +tindex(zle-history-line-set) +item(tt(zle-history-line-set))( +Executed when the history line changes. +) tindex(zle-keymap-select) item(tt(zle-keymap-select))( Executed every time the keymap changes, i.e. the special parameter Index: Src/Zle/zle_hist.c =================================================================== RCS file: /cvsroot/zsh/zsh/Src/Zle/zle_hist.c,v retrieving revision 1.67 diff -p -u -r1.67 zle_hist.c --- Src/Zle/zle_hist.c 12 Dec 2010 22:44:51 -0000 1.67 +++ Src/Zle/zle_hist.c 18 Feb 2011 22:29:04 -0000 @@ -765,6 +765,7 @@ zle_setline(Histent he) histline = he->histnum; setline(GETZLETEXT(he), ZSL_COPY|ZSL_TOEND); + zlecallhook("zle-history-line-set", NULL); setlastline(); clearlist = 1; if (remetafy) -- Peter Stephenson Web page now at http://homepage.ntlworld.com/p.w.stephenson/