From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Sean Whitton Newsgroups: gmane.emacs.devel Subject: Re: [PATCH v2] Font lock long Git commit summary lines Date: Mon, 05 Sep 2022 11:14:27 -0700 Message-ID: <87sfl5zo1o.fsf@melete.silentflame.com> References: <20220903170308.301805-1-spwhitton@spwhitton.name> <871qsq2096.fsf@melete.silentflame.com> <8335d6koru.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25551"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) To: Eli Zaretskii , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Sep 05 20:15:59 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oVGdZ-0006St-Ob for ged-emacs-devel@m.gmane-mx.org; Mon, 05 Sep 2022 20:15:59 +0200 Original-Received: from localhost ([::1]:41638 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oVGdY-0005tL-Gv for ged-emacs-devel@m.gmane-mx.org; Mon, 05 Sep 2022 14:15:56 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44878) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oVGcG-0004b6-E4 for emacs-devel@gnu.org; Mon, 05 Sep 2022 14:14:36 -0400 Original-Received: from out1-smtp.messagingengine.com ([66.111.4.25]:44889) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oVGcC-0000g2-Fp; Mon, 05 Sep 2022 14:14:36 -0400 Original-Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 87D945C0120; Mon, 5 Sep 2022 14:14:29 -0400 (EDT) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Mon, 05 Sep 2022 14:14:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name; h=cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm3; t=1662401669; x=1662488069; bh=X987VwYSyo smE79+Lm0JzcLFXwClZDsNxh1b1Dx5ZJ8=; b=bntflBwh47G1yXts+LOBmaLy7B WpMfBrvJ388dFPMNtnhGdSorGuImsFCCx+1SKQAGTls7ZYvRKtHXr30oyRrCpfo1 JqR2ryX3DVSBS0cE3u2d/yADxQeFOTfcTf24kgFQJDfQgq+EJnH2/HNSUUa70qLF 7ETzEDlElgfIU2LDwtiHHGBaXYrVU5hGswerac/dZxolLicAzx5zshfUU1W9qKjH U3IP/VqSroIVBYRSAe7jqvHziwRcSvhxt1yRNqeSgPnom7xvRkghPpeJ4QqptCAm GzmkJeblOUVK61/wG4PS3trQLgUOw14N4VjL/rSvUsqcr8kan6/uaS29LV+Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1662401669; x=1662488069; bh=X987VwYSyosmE79+Lm0JzcLFXwCl ZDsNxh1b1Dx5ZJ8=; b=5mYXWxlS7n5gtlqWsriMqofRzKRWv4Y+1iWqMZTD71/z 3Ipp2i/N/Xf5pyO5dnVaGhV2THV1ZznSq76iP2wlBkSgNtbXbImR66uv3FnzCuTQ 7oHJ9iTsCzJ5knwVoDLLQ1SJ2keHI22eiuvoobSE3rJVPWLq0qshWRIXPG6+oDBM 3cIxRhk1y9cv8NOI8WweDVzi1LrI+428mbI0KTB3slv7UgnLi6d+Vym9tfSgTDfU LNxxR6rrQOOqIPpktprtaE+VwkrdT5YRv3eNjt0hjcCUoWfDLfHO5joiNpfZRGMj VhNlDjtdPZ4WpMYfHPYSfrM021e5AkEjcjo09dslSw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrvdeliedguddvjecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvffujghffffkfgggtgesthdttddttdertdenucfhrhhomhepufgvrghn ucghhhhithhtohhnuceoshhpfihhihhtthhonhesshhpfihhihhtthhonhdrnhgrmhgvqe enucggtffrrghtthgvrhhnpeffueettdefvddtteevgfeufeejgfegudfgfedutdegfeet keehuddvfeejjeeifeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrih hlfhhrohhmpehsphifhhhithhtohhnsehsphifhhhithhtohhnrdhnrghmvg X-ME-Proxy: Feedback-ID: i23c04076:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 5 Sep 2022 14:14:29 -0400 (EDT) Original-Received: by melete.silentflame.com (Postfix, from userid 1000) id F071E7EA341; Mon, 5 Sep 2022 11:14:27 -0700 (MST) In-Reply-To: <8335d6koru.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 05 Sep 2022 15:07:49 +0300") Received-SPF: pass client-ip=66.111.4.25; envelope-from=spwhitton@spwhitton.name; helo=out1-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:294756 Archived-At: Hello, I've applied most of this, thank you. Rather than replace 'target', which I think is right, I renamed the two faces. What we have are two warnings, no errors. On Mon 05 Sep 2022 at 03:07PM +03, Eli Zaretskii wrote: >> +(defun vc-git--log-edit-summary-check (limit) >> + (and (re-search-forward "^Summary: " limit t) >> + (when-let ((regex >> + (cond ((and vc-git-log-edit-summary-max >> + vc-git-log-edit-summary-target) > > Should this test using numberp? > >> + (vc-git-log-edit-summary-max >> + (format ".\\{,%d\\}\\(?2:.*\\)" >> + vc-git-log-edit-summary-max)) >> + (vc-git-log-edit-summary-target >> + (format ".\\{,%d\\}\\(.*\\)" >> + vc-git-log-edit-summary-target))))) > > Likewise here. I put calls to natnump in, but I'm not sure about it. Is it really most useful to silently fail to highlight the characters if somehow something other than a number has ended up in the variables? I'm new to working with font lock so would be grateful for more input. -- Sean Whitton