From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: (qmail 6224 invoked from network); 29 Mar 2020 21:13:34 -0000 Received-SPF: pass (primenet.com.au: domain of zsh.org designates 203.24.36.2 as permitted sender) receiver=inbox.vuxu.org; client-ip=203.24.36.2 envelope-from= Received: from ns1.primenet.com.au (HELO primenet.com.au) (203.24.36.2) by inbox.vuxu.org with UTF8ESMTPZ; 29 Mar 2020 21:13:34 -0000 Received: (qmail 518 invoked by alias); 29 Mar 2020 21:13:29 -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: List-Unsubscribe: X-Seq: 45652 Received: (qmail 10309 invoked by uid 1010); 29 Mar 2020 21:13:29 -0000 X-Qmail-Scanner-Diagnostics: from wout4-smtp.messagingengine.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.2/25765. spamassassin: 3.4.2. Clear:RC:0(64.147.123.20):SA:0(-2.6/5.0):. Processed in 0.734587 secs); 29 Mar 2020 21:13:29 -0000 X-Envelope-From: d.s@daniel.shahaf.name X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at daniel.shahaf.name does not designate permitted sender hosts) X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrudeifedgudeiudcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefofgggkfgjfhffhffvufgtgfesthhqredtreerjeenucfhrhhomhepfdff rghnihgvlhcuufhhrghhrghffdcuoegurdhssegurghnihgvlhdrshhhrghhrghfrdhnrg hmvgeqnecuffhomhgrihhnpeiishhhrdhmhienucevlhhushhtvghrufhiiigvpedtnecu rfgrrhgrmhepmhgrihhlfhhrohhmpegurdhssegurghnihgvlhdrshhhrghhrghfrdhnrg hmvg X-ME-Proxy: X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.1.7-1021-g152deaf-fmstable-20200319v1 Mime-Version: 1.0 Message-Id: <1494dcf9-97ab-4c2f-a3b4-5e0b9a75e326@www.fastmail.com> In-Reply-To: References: <20200326223449.0a090ae6@tarpaulin.shahaf.local2> <20200329204702.5c096185@tarpaulin.shahaf.local2> Date: Sun, 29 Mar 2020 21:12:34 +0000 From: "Daniel Shahaf" To: "Roman Perepelitsa" Cc: "Marlon Richert" , "Zsh hackers list" Subject: =?UTF-8?Q?Re:_Bug_report:_`setopt_noaliases`_not_respected_in_`local`_st?= =?UTF-8?Q?atement_without_assignment.?= Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable Roman Perepelitsa wrote on Sun, 29 Mar 2020 21:03 +00:00: > On Sun, Mar 29, 2020 at 10:47 PM Daniel Shahaf wrote: > > z-sy-h handles this by saving ${options} to an associative array bef= ore > > resetting the options so it can execute: >=20 > Right. This is done in function _zsh_highlight in > zsh-syntax-highlighting.zsh. My point is that you cannot rename > zsh-syntax-highlighting.zsh to zsh-syntax-highlighting-impl.zsh and > replace the original zsh-syntax-highlighting.zsh with `emulate zsh -o > no_aliases -c 'source zsh-syntax-highlighting-impl.zsh'` because > you'll no longer be able to access user options from _zsh_highlight. > Sticky emulation mode is cool but in this case it provides too much > insulation. Yeah, the code I quoted needs to run before options are changed =E2=80=94= i.e., in the outer script, before the 'emulate' call. That's precisely why that code's written in a KSH_ARRAYS-compatible way. (It wasn't at first, but people opened bug reports=E2=80=A6)