all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Paul Eggert <eggert@cs.ucla.edu>
To: Mike Kupfer <mkupfer@alum.berkeley.edu>
Cc: Glenn Morris <rgm@gnu.org>,
	Stefan Monnier <monnier@iro.umontreal.ca>,
	emacs-devel@gnu.org
Subject: Re: lm-verify, long copyright line
Date: Sat, 24 Jun 2017 19:01:21 -0700	[thread overview]
Message-ID: <aaa6ba84-4234-27bf-821a-7d8aeff9dfb8@cs.ucla.edu> (raw)
In-Reply-To: <5432.1498342609@alto>

[-- Attachment #1: Type: text/plain, Size: 467 bytes --]

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 
copyright notices the same as other text. Let's make lm-verify a bit more 
generous about copyright notice format; this is a good thing to do regardless of 
whether we change update-copyright. I installed the attached patch into master; 
does it suffice to solve the problem?

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Adjust-lm-verify-to-accept-current-notices.patch --]
[-- Type: text/x-patch; name="0001-Adjust-lm-verify-to-accept-current-notices.patch", Size: 1492 bytes --]

From f587a81c5247e79f75c7ec03f4e97a7dd883167b Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
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.
-- 
2.7.4


  reply	other threads:[~2017-06-25  2:01 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-22 22:51 lm-verify, long copyright line Mike Kupfer
2017-06-22 23:26 ` Paul Eggert
2017-06-22 23:57   ` Mike Kupfer
2017-06-23  0:07     ` Paul Eggert
2017-06-23  0:28       ` Mike Kupfer
2017-06-23  4:18         ` Paul Eggert
2017-06-23 16:19           ` Stefan Monnier
2017-06-23 17:13             ` Paul Eggert
2017-06-23 17:59               ` Glenn Morris
2017-06-23 18:33                 ` Paul Eggert
2017-06-24 22:16                   ` Mike Kupfer
2017-06-25  2:01                     ` Paul Eggert [this message]
2017-06-25  2:59                       ` Mike Kupfer
2017-06-25 15:10                       ` Stefan Monnier
2017-06-25 16:59                         ` Mike Kupfer
2017-06-25 20:45                         ` Paul Eggert
2017-06-25 20:53                           ` Mike Kupfer
2017-06-25 21:05                             ` Paul Eggert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aaa6ba84-4234-27bf-821a-7d8aeff9dfb8@cs.ucla.edu \
    --to=eggert@cs.ucla.edu \
    --cc=emacs-devel@gnu.org \
    --cc=mkupfer@alum.berkeley.edu \
    --cc=monnier@iro.umontreal.ca \
    --cc=rgm@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.