Subject: 23.0.60; suggest "both" option for copyright-at-end-flag

From: Kevin Ryde <[email-masked]>
Date: Sat, 03 Jan 2009 09:18:15 +1100

Some perl files have a copyright statement at the start in comments and
then again at the end in the embedded documentation.  A couple of
examples picked at random,

 http://search.cpan.org/src/GUIDO/libintl-perl-1.16/lib/Locale/TextDomain.pm  
 http://search.cpan.org/src/ECOCODE/Finance-Quote-1.15/lib/Finance/Quote.pm

It's a little redundant of course, but the start puts it in front of the
programmer and the end in the POD goes through to the man/html/whatever
docs, so it's not completely outrageous.

It'd be great if copyright-update could update both places.  Maybe a
"both" mode for copyright-at-end-flag, or maybe even an "all" mode to
look for all matches, though I don't suppose three occurances would be
likely.  If the scan is pretty fast it'd be tempting to just look for
all matches, with no options.

I got the "both" effect I wanted from a bit of a hack

(defun my-copyright-update-both ()
  (interactive)
  (when (or (not (boundp 'copyright-update)) ;; if not yet loaded
            copyright-update)
    (copyright-update)
    (let ((copyright-at-end-flag (not copyright-at-end-flag)))
      (setq copyright-update t)
      (copyright-update))))

-------
In GNU Emacs 23.0.60.10 (i586-pc-linux-gnu, GTK+ Version 2.12.11)
 of 2008-12-19 on blah.blah
configured using `configure  'CFLAGS=-O -g' '--prefix=/down/emacs/b/inst' '--with-x-toolkit=gtk''