bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#1771: 23.0.60; suggest "both" option for copyright-at-end-flag


From: Kevin Ryde
Subject: bug#1771: 23.0.60; suggest "both" option for copyright-at-end-flag
Date: Sat, 03 Jan 2009 09:18:15 +1100
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/22.2 (gnu/linux)

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''






reply via email to

[Prev in Thread] Current Thread [Next in Thread]