From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.devel Subject: Re: lm-verify, long copyright line Date: Sat, 24 Jun 2017 19:01:21 -0700 Organization: UCLA Computer Science Department Message-ID: References: <5432.1498342609@alto> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------17FA96F9316273C000AED73E" X-Trace: blaine.gmane.org 1498356131 11564 195.159.176.226 (25 Jun 2017 02:02:11 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 25 Jun 2017 02:02:11 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 Cc: Glenn Morris , Stefan Monnier , emacs-devel@gnu.org To: Mike Kupfer Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jun 25 04:02:06 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dOwsH-0002g0-Kc for ged-emacs-devel@m.gmane.org; Sun, 25 Jun 2017 04:02:05 +0200 Original-Received: from localhost ([::1]:40969 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dOwsM-00041Q-Ic for ged-emacs-devel@m.gmane.org; Sat, 24 Jun 2017 22:02:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46449) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dOwri-00041F-4A for emacs-devel@gnu.org; Sat, 24 Jun 2017 22:01:31 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dOwrf-0006ly-3E for emacs-devel@gnu.org; Sat, 24 Jun 2017 22:01:30 -0400 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:54238) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dOwre-0006lK-T9; Sat, 24 Jun 2017 22:01:27 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 51AB8160095; Sat, 24 Jun 2017 19:01:23 -0700 (PDT) Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id afV59a2Pwyr1; Sat, 24 Jun 2017 19:01:22 -0700 (PDT) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 22310160096; Sat, 24 Jun 2017 19:01:22 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id hEA22XP3P9q7; Sat, 24 Jun 2017 19:01:22 -0700 (PDT) Original-Received: from [192.168.1.9] (unknown [47.153.184.153]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id EBA8A160095; Sat, 24 Jun 2017 19:01:21 -0700 (PDT) In-Reply-To: <5432.1498342609@alto> Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 131.179.128.68 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:215951 Archived-At: This is a multi-part message in MIME format. --------------17FA96F9316273C000AED73E Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Mike Kupfer wrote: > I guess the question is how likely would this be to introduce a new set > of problems. Reasonably likely, I'd say, as the tradition outside Emacs is to indent=20 copyright notices the same as other text. Let's make lm-verify a bit more= =20 generous about copyright notice format; this is a good thing to do regard= less of=20 whether we change update-copyright. I installed the attached patch into m= aster;=20 does it suffice to solve the problem? --------------17FA96F9316273C000AED73E Content-Type: text/x-patch; name="0001-Adjust-lm-verify-to-accept-current-notices.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="0001-Adjust-lm-verify-to-accept-current-notices.patch" =46rom f587a81c5247e79f75c7ec03f4e97a7dd883167b Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 24 Jun 2017 17:54:21 -0700 Subject: [PATCH] Adjust lm-verify to accept current notices Problem reported by Mike Kupfer in: http://lists.gnu.org/archive/html/emacs-devel/2017-06/msg00512.html * lisp/emacs-lisp/lisp-mnt.el (lm-crack-copyright): Do not require later lines in a copyright notice to have more indentation than earlier lines. --- lisp/emacs-lisp/lisp-mnt.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lisp/emacs-lisp/lisp-mnt.el b/lisp/emacs-lisp/lisp-mnt.el index fc3caf3..a1c5b69 100644 --- a/lisp/emacs-lisp/lisp-mnt.el +++ b/lisp/emacs-lisp/lisp-mnt.el @@ -326,12 +326,13 @@ lm-crack-copyright (start (point)) (end (line-end-position))) ;; Cope with multi-line copyright `lines'. Assume the second - ;; line is indented (with the same commenting style). + ;; line is indented at least as much as the original, with the + ;; same commenting style. (save-excursion (beginning-of-line 2) - (let ((str (concat (match-string-no-properties 1) "[ \t]+"))) + (let ((str (match-string-no-properties 1))) (beginning-of-line) - (while (looking-at str) + (while (and (looking-at str) (not (looking-at lm-copyright-prefix))) (setq end (line-end-position)) (beginning-of-line 2)))) ;; Make a single line and parse that. --=20 2.7.4 --------------17FA96F9316273C000AED73E--