From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18628 invoked by alias); 6 Jan 2007 14:05:26 -0000 Received: (qmail 18620 invoked by uid 22791); 6 Jan 2007 14:05:25 -0000 X-Spam-Check-By: sourceware.org Received: from heller.inter.net.il (HELO heller.inter.net.il) (192.114.186.73) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 06 Jan 2007 14:05:20 +0000 Received: from HOME-C4E4A596F7 (IGLD-83-130-195-26.inter.net.il [83.130.195.26]) by heller.inter.net.il (MOS 3.7.3a-GA) with ESMTP id BLS57550 (AUTH halo1); Sat, 6 Jan 2007 16:05:16 +0200 (IST) Date: Sat, 06 Jan 2007 14:05:00 -0000 Message-Id: From: Eli Zaretskii To: Daniel Jacobowitz CC: gdb@sourceware.org In-reply-to: <20070104044149.GA4414@nevyn.them.org> (message from Daniel Jacobowitz on Wed, 3 Jan 2007 23:41:49 -0500) Subject: Re: Copyright updates Reply-to: Eli Zaretskii References: <20070104011636.GA31905@nevyn.them.org> <20070104044149.GA4414@nevyn.them.org> X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2007-01/txt/msg00106.txt.bz2 > Date: Wed, 3 Jan 2007 23:41:49 -0500 > From: Daniel Jacobowitz > 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 < +(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 < +(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 < +(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.