From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14919 invoked by alias); 7 Jul 2016 17:01:21 -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: 38808 Received: (qmail 28250 invoked from network); 7 Jul 2016 17:01:20 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version; bh=EeXEIDk4bwO6szttUvPSodCdZRUMOqmRcSaBN/WR1T8=; b=JA/p7xKLz93nlIJQRuZ9aq3ethJtbUnDLh3GVns0hClK5U5L8PKSvVa4W295OXblcK c13/BkWLOVzjxkpuJ+8ymJ+gW01klk5unAu6ScP1NqD5l0ZZnHzjQ5+ce+4cPnxdOPKN BM36NF/L1AXRDXqUy9iC0xazhuxxcTo0i9vzct9IESQ3jP73EYpAWkajgDF/GlvN3zUD 9XW6hJRiT4mytzxnSmADZLrwdYeptBWFYw6ploWzTsBcMz3SMIXDGvJeMZ9EzxiwZvjb ci+6HKCUp1I3PgBAsLw2QuxF93RqQEXua085lcSTaeXCmDsznzBfnZ3hVMMa5eFSy4s8 sm5w== 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:in-reply-to:comments :references:to:subject:mime-version; bh=EeXEIDk4bwO6szttUvPSodCdZRUMOqmRcSaBN/WR1T8=; b=kjJyn2hbSzuN+F3YBSTiVxhoPQEmXmnSfjWn3QYBo+h5VEX498MaqSO6eFNh48yS9x dl/9yImaCL8lAdi9m11gzJc7fSGaCSoN/UFAc8bpXaNsLtydf/PKbVgZACugmEQQ3IZA +eRSw9layu7/tQuNevNz3q4lzm1/GLEz5UuE8MxPXVI+HbVouXez7O4ewrFVvNSbsvhM fy0WSSWf6dB0BaqUmKXgbohzcI5ISAr2PLVCqWhMNZTv6L7GZIf2XaheZxGTeG1O47DE r3TzWjo4Y22Sl7+hOjWyMMxtyJi9JwfiuCwqwO4bUMVzynKJiJSVURnB1wLeuGCg60Y0 +dnw== X-Gm-Message-State: ALyK8tKJ7BfHpXbLp3q5c6BtJHBO4ANKsdKvUa+PeMkpEiw2LDMHZ/1sdngxUWbnrEJIPg== X-Received: by 10.98.210.66 with SMTP id c63mr1968278pfg.25.1467910878507; Thu, 07 Jul 2016 10:01:18 -0700 (PDT) From: Bart Schaefer Message-Id: <160707100125.ZM23567@torch.brasslantern.com> Date: Thu, 7 Jul 2016 10:01:25 -0700 In-Reply-To: <49130.1467902941@hydra.kiddle.eu> Comments: In reply to Oliver Kiddle "Re: tab completion color inversion" (Jul 7, 4:49pm) References: <49130.1467902941@hydra.kiddle.eu> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Re: tab completion color inversion MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii [>workers] On Jul 7, 4:49pm, Oliver Kiddle wrote: } } The patch below resets the saved colour first but I'd actually be } inclined to change the following macro to do the AND before the OR. } } #define txtchangeset(T, X, Y)diff((void)(T && (*T |= (X), *T &= ~(Y)))) } } It might also then be logical to swap the X and Y arguments. Reactions: (1) Is this related to "End boldface also ends background color" thread from back in March? (2) As I said in that thread, I don't really follow the semantics of the txtchangep pointer, but AND before OR seems sensible in the macro. (3) Swapping the arguments would touch a lot of code and make it hard to compare revisions, so the benefits ought to be carefully weighed.