Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Daniel Jacobowitz <drow@false.org>
Cc: gdb@sourceware.org
Subject: Re: Copyright updates
Date: Sat, 06 Jan 2007 14:05:00 -0000	[thread overview]
Message-ID: <uk600z1wj.fsf@gnu.org> (raw)
In-Reply-To: <20070104044149.GA4414@nevyn.them.org> (message from Daniel 	Jacobowitz on Wed, 3 Jan 2007 23:41:49 -0500)

> Date: Wed, 3 Jan 2007 23:41:49 -0500
> From: Daniel Jacobowitz <drow@false.org>
> Cc: gdb@sourceware.org
> 
> On Thu, Jan 04, 2007 at 06:32:06AM +0200, Eli Zaretskii wrote:
> > Why are we including a package in GDB that is part of Emacs, and
> > why modify it while doing that?  Can't we simply tell people ``use
> > copyright.el from Emacs''?
> 
> Pragmatics: Because I needed to modify it to get the results I posted.
> Otherwise, it has no respect for margins - it would just push things
> further and further out to the right.

I suggest below a modification in your script that should take care of
filling the copyright years, please see if it solves the problem.

I promised to see if copyright.el can be fixed to fill the results
after adding the missing year, but I cannot see any good way of doing
that, since copyright.el does not only support FSF copyrights, but is
supposed to honor copyrights of other organizations.  So I think it's
best to refill in your script, which is what I've done below.

> And because the version in the last release of emacs was too old to
> use

I tested the change I suggest below with Emacs 21.4.  It works, but I
don't recommend using copyright.el from v21.x, as it has bugs when the
copyright years span more than one line.  For example, it goofs with
ada-typeprint.c: it adds 2007 after 2000, not after 2004.  Perhaps we
should add a comment about this in your script.

> +cat > copytmp.el <<EOF
> +(setq copyright-query nil)
> +(setq vc-cvs-stay-local nil)
> +(load-file "copyright.el")
> +EOF
> +
> +for f in $prunes $byhand; do
> +  prune_opts="$prune_opts -name $f -prune -o"
> +done
> +
> +for f in $(find . $prune_opts -type f -print); do
> +  cat >> copytmp.el <<EOF
> +(switch-to-buffer (find-file "$f"))
> +(setq backup-inhibited t)
> +(setq write-file-hooks '())
> +(copyright-update)          <<<<<<<<<<
> +(save-buffer)
> +(kill-buffer (buffer-name))
> +EOF
> +done
> +
> +cat >> copytmp.el <<EOF
> +(kill-emacs)
> +(delete-file "copytmp.el")
> +EOF

I suggest to modify this slightly: instead of the single line marked
with <<<<<<<<<<, use the following lines (indentation is not
important, it's here for readability):

(widen)
(goto-char (point-min))
(if (re-search-forward copyright-regexp (+ (point) copyright-limit) t)
    (progn
      (setq copyright-update t
	    copyright-query nil
	    fill-column 78
	    start (point-marker)
	    end (progn
		  (re-search-forward
		   "Free[ \t\n]+Software[ \t\n]+Foundation,[ \t\n]+Inc\."
		   (+ (point) copyright-limit) t)
		  (point-marker))
	    fsf-start (copy-marker (match-beginning 0)))
      (replace-match "Free_Software_Foundation,_Inc." t t)
      (copyright-update)
      (fill-region-as-paragraph start end)
      (replace-string "_" " " nil fsf-start end))
  (message "WARNING: No copyright message found in $f"))

In case you wonder, the "Free_Software_Foundation,_Inc." gork is to
avoid breaking up "Free Software Foundation, Inc." during filling, but
at the same time to account for its length.


  parent reply	other threads:[~2007-01-06 14:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-04  1:16 Daniel Jacobowitz
2007-01-04  4:32 ` Eli Zaretskii
2007-01-04  4:41   ` Daniel Jacobowitz
2007-01-04 22:02     ` Eli Zaretskii
2007-01-04 22:09       ` Daniel Jacobowitz
2007-01-04 22:13         ` Eli Zaretskii
2007-01-06 14:05     ` Eli Zaretskii [this message]
2007-01-06 14:17       ` Eli Zaretskii

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=uk600z1wj.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=drow@false.org \
    --cc=gdb@sourceware.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox