From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15329 invoked by alias); 18 Aug 2015 07:09:23 -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: 36214 Received: (qmail 13725 invoked from network); 18 Aug 2015 07:09: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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.0 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:date:to:subject:mime-version :content-type; bh=uPGVRzjT2hxffirz9bSGpgf+j/NI2NPrPmuZvCaFjvM=; b=LWbtm2HUQDuUJXhmpIQy+sEfvPllECkfDCcxsCGBLl8tiYsrnd9yW6duSMJIPzktqM Hvi8glALbsoRQTUK/uBFUnZ/Ice8SXbTEAgyhujNY5c515xTAePRGn3L4JTeIltwHIzW G49wuWA2qokkbNqrG2PfMV3fzXVLt9+C8cdF/b/xR6T/Y0GeQLntmdA1O+pS/PgbqPTN OELyXwg4y08Yh30dPQqcnlI5iJ1FoHedfoqCcoDELB/6UWR20FQoct9C55qe6FaI6lqe 7aI3LblX4aTVLHJhy2nUebJUy1e0nv1X2TluaId4v+Ur5U/FUbFoerJNqXotK3s2zcnU VOzw== X-Gm-Message-State: ALoCoQlWKRTwKZy7NH4DcNZvGQ2bV3QPtuUVhpGWeHtaOGBOq7av4BLFRqCDMew99RYh3UooaBOT X-Received: by 10.182.205.226 with SMTP id lj2mr3994449obc.38.1439881759707; Tue, 18 Aug 2015 00:09:19 -0700 (PDT) From: Bart Schaefer Message-Id: <150818000916.ZM28704@torch.brasslantern.com> Date: Tue, 18 Aug 2015 00:09:16 -0700 X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: UNDO_LIMIT_NO and its documentation MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii The doc says: A typical use of this variable in a widget function is as follows: integer save_limit=$UNDO_LIMIT_NO UNDO_LIMIT_NO=$UNDO_CHANGE_NO { # Perform some form of recursive edit. } always { UNDO_LIMIT_NO=save_limit } Firstly, why not just local UNDO_LIMIT_NO=$UNDO_CHANGE_NO and allow function scoping to restore it? It's not a special. Secondly, declaring "integer save_limit" means that save_limit will have a default of zero, but UNDO_LIMIT_NO has a default of unset. So when the assignment back to UNDO_LIMIT_NO is done, it'll change state from unset to zero. Does that matter?