From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8268 invoked by alias); 22 Jun 2015 00:18:24 -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: 35554 Received: (qmail 25031 invoked from network); 22 Jun 2015 00:18:23 -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=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:in-reply-to:references; bh=NhQYCh72NzP2Xwk96n7QBENajPmiWct3UfFp7b+AOCk=; b=Z19eYGSqclZJ2kLKve6+zwlJ6huIWwhcGKXstS7IfsTPn68GIGg0FknjuyBL151Z59 +ufX9ZiPFGCfmrH/FLdifNGLDIgJeDZ5dlPSKr+znXJg122Jzf70mfQQBNV7UrQkiC3G h2F7c093yi8/RgzrMsYMox2D3Bvqjj9zaBKkXGdwzfXEf9mucruusTOIVDSHZPeKp+Og UEhB22DRpt1QON43CmNQu52bJ3mFu0XYNZtIbg16xAIj5Fvvw055VbJZJbLGpqxkWxpP FxnK2fjqVQHLwaivh6BoK62csMv3sZDPhbxG/d/Rjy7TZOc4MHqqx0/iiXIzB8QpwnTF 2aIA== X-Received: by 10.152.6.1 with SMTP id w1mr27052215law.91.1434932299056; Sun, 21 Jun 2015 17:18:19 -0700 (PDT) From: Mikael Magnusson To: zsh-workers@zsh.org Subject: PATCH: Document narrow-to-region -l and -r. Date: Mon, 22 Jun 2015 02:18:11 +0200 Message-Id: <1434932291-23881-1-git-send-email-mikachu@gmail.com> X-Mailer: git-send-email 2.4.0 In-Reply-To: References: --- Doc/Zsh/contrib.yo | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Doc/Zsh/contrib.yo b/Doc/Zsh/contrib.yo index 323bf0f..09ac5c8 100644 --- a/Doc/Zsh/contrib.yo +++ b/Doc/Zsh/contrib.yo @@ -2272,7 +2272,8 @@ tindex(narrow-to-region) tindex(narrow-to-region-invisible) redef(SPACES)(0)(tt(ifztexi(NOTRANS(@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ))ifnztexi( ))) xitem(tt(narrow-to-region )[ tt(-p) var(pre) ] [ tt(-P) var(post) ]) -xitem(SPACES()[ tt(-S) var(statepm) | tt(-R) var(statepm) ] [ tt(-n) ] [ var(start) var(end) ]) +xitem(SPACES()[ tt(-S) var(statepm) | tt(-R) var(statepm) | [ tt(-l) var(lbufvar) ] [ tt(-r) var(rbufvar) ] ]) +xitem(SPACES()[ tt(-n) ] [ var(start) var(end) ]) item(tt(narrow-to-region-invisible))( Narrow the editable portion of the buffer to the region between the cursor and the mark, which may be in either order. The region may not be empty. @@ -2308,9 +2309,15 @@ parameter, except that parameters beginning with the prefix tt(_ntr_) are reserved for use within tt(narrow-to-region). Typically the parameter will be local to the calling function. +The options tt(-l) var(lbufvar) and tt(-r) var(rbufvar) may be used to +specify parameters where the widget will store the resulting text from +the operation. The parameter var(lbufvar) will contain var(LBUFFER) +and var(rbufvar) will contain var(RBUFFER). Neither of these two options +may be used with tt(-S) or tt(-R). + tt(narrow-to-region-invisible) is a simple widget which calls tt(narrow-to-region) with arguments which replace any text outside the -region with `tt(...)'. +region with `tt(...)'. It does not take any arguments. The display is restored (and the widget returns) upon any zle command which would usually cause the line to be accepted or aborted. Hence an -- 2.4.0