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: [PATCH] * vc-git.el (vc-git-log-edit-mode): Font lock long summary lines. Date: Sat, 3 Sep 2022 10:03:08 -0700 Message-ID: <20220903170308.301805-1-spwhitton@spwhitton.name> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8012"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Sean Whitton To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Sep 03 19:04:21 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 1oUWZ9-0001os-JA for ged-emacs-devel@m.gmane-mx.org; Sat, 03 Sep 2022 19:04:20 +0200 Original-Received: from localhost ([::1]:56612 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oUWZ8-0004Z7-FR for ged-emacs-devel@m.gmane-mx.org; Sat, 03 Sep 2022 13:04:18 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54118) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oUWY9-0003ER-LA for emacs-devel@gnu.org; Sat, 03 Sep 2022 13:03:17 -0400 Original-Received: from out1-smtp.messagingengine.com ([66.111.4.25]:46875) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oUWY7-0006Qp-PP for emacs-devel@gnu.org; Sat, 03 Sep 2022 13:03:17 -0400 Original-Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id A74265C00D9; Sat, 3 Sep 2022 13:03:13 -0400 (EDT) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Sat, 03 Sep 2022 13:03:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name; h=cc:cc:content-transfer-encoding:date:date:from:from :in-reply-to:message-id:mime-version:reply-to:sender:subject :subject:to:to; s=fm3; t=1662224593; x=1662310993; bh=WKws8XWxJK U0m8IC84UiJ47/EbH31Jw9em3bQj5WCNs=; b=ezYCWXJyB9SXjgavcb3rTCxqkB 7ifVYj8cq9xNtX+9wYuqeLqo/gMRLeMHpIFcIebCJAp+vTKgOYmPfOQhaBzY7kkN 2QzESBALolHFj94+uaoPldpy9FlK69XEnQK1CJ5Y+AzEz9JYCx0XYh1sPCxLXQZ2 ad1ywJVi2XV9wz2g537SsRAYvzgVVeGYNMt4HeMC4cuMmbtJ8lKNC7HeNoQsW0yO 9UPMxVRBS4NDPfIvjML1jgQxPuFQyMdHiFthqHTL3NP5Rcm9OblSsBH4VW5ILomg suq1+5c2WAI1ab/aMhfV732RXGnGBC6VFfHw+j1jKziu6l2Xr4frobnumQlg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :feedback-id:feedback-id:from:from:in-reply-to:message-id :mime-version: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= 1662224593; x=1662310993; bh=WKws8XWxJKU0m8IC84UiJ47/EbH31Jw9em3 bQj5WCNs=; b=jzclrfOc4Y3Iwt5cS8QZge4nDp4PB1XfkIchiLnofN30K7ZlTJj AnYUuoPYGXTz4jsGfAoQRx8x8Qcg+0l2FHqd+83tevOikUBKKRUN08I541BMTuuc c02/WCuv3zUGtixBV51sMfXQocjhjmpmdU4A2/KzRwT7KcfcohrWSihWPV9Gi6Af BMMv7jBQwcGeiFDQXYAHlPG65nik7vXsAuLZYUgjyvgKo8LpUVQYKR1B77maygLv HjZNKj+hExgcDRqV7E3HGwAGjApG19C38+hZnFhaYpmYX1wmuV2JAjCCpT/4OlAC Tw1C9BKOEoPfF6JQEGT63MRE8UfYiO7zVGw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrvdelvddgudduudcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhephffvvefufffkofgggfestdekre dtredttdenucfhrhhomhepufgvrghnucghhhhithhtohhnuceoshhpfihhihhtthhonhes shhpfihhihhtthhonhdrnhgrmhgvqeenucggtffrrghtthgvrhhnpeevffduudeitdejve eivdfghfehheeihfejvdfhtddvhfeifeekvdeuueduudevffenucevlhhushhtvghrufhi iigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehsphifhhhithhtohhnsehsphifhh hithhtohhnrdhnrghmvg X-ME-Proxy: Feedback-ID: i23c04076:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 3 Sep 2022 13:03:13 -0400 (EDT) Original-Received: by erebus.silentflame.com (Postfix, from userid 1000) id ECBAA80A4E; Sat, 3 Sep 2022 10:03:11 -0700 (MST) X-Mailer: git-send-email 2.30.2 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:294664 Archived-At: --- lisp/vc/vc-git.el | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) I'd like to install this patch to highlight long summary lines when composing git commit messages. Comments welcome. diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index 7395253745..8338bfcb26 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -913,7 +913,14 @@ vc-git-log-edit-mode-map (define-derived-mode vc-git-log-edit-mode log-edit-mode "Log-Edit/git" "Major mode for editing Git log messages. -It is based on `log-edit-mode', and has Git-specific extensions.") +It is based on `log-edit-mode', and has Git-specific extensions." + (setq-local + log-edit-font-lock-keywords + (append log-edit-font-lock-keywords + ;; Warn about going over 50 chars, warn harder about going + ;; over 68, per established conventions. + '(("\\`Summary: .\\{,50\\}\\(.\\{,18\\}\\)\\(.*\\)" + (1 'warning prepend t) (2 'error prepend t)))))) (defvar vc-git-patch-string nil) -- 2.30.2