From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/41302 Path: main.gmane.org!not-for-mail From: Lars Magne Ingebrigtsen Newsgroups: gmane.emacs.gnus.general Subject: Re: Time to update the copyrights? Date: Tue, 01 Jan 2002 01:07:14 +0100 Organization: Programmerer Ingebrigtsen Sender: owner-ding@hpc.uh.edu Message-ID: References: <871yhbx980.fsf@squeaker.lickey.com> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1035176717 5375 80.91.224.250 (21 Oct 2002 05:05:17 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 05:05:17 +0000 (UTC) Cc: Daniel Pfeiffer Return-Path: Original-Received: (qmail 6864 invoked from network); 1 Jan 2002 00:08:12 -0000 Original-Received: from malifon.math.uh.edu (mail@129.7.128.13) by mastaler.com with SMTP; 1 Jan 2002 00:08:12 -0000 Original-Received: from sina.hpc.uh.edu ([129.7.128.10] ident=lists) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 16LCT7-0005Kj-00; Mon, 31 Dec 2001 18:07:49 -0600 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Mon, 31 Dec 2001 18:07:41 -0600 (CST) Original-Received: from sclp3.sclp.com (qmailr@sclp3.sclp.com [209.196.61.66]) by sina.hpc.uh.edu (8.9.3/8.9.3) with SMTP id SAA13165 for ; Mon, 31 Dec 2001 18:07:28 -0600 (CST) Original-Received: (qmail 6853 invoked by alias); 1 Jan 2002 00:07:31 -0000 Original-Received: (qmail 6848 invoked from network); 1 Jan 2002 00:07:31 -0000 Original-Received: from quimby.gnus.org (HELO quimby2.netfonds.no) (195.204.10.66) by gnus.org with SMTP; 1 Jan 2002 00:07:31 -0000 Original-Received: from news by quimby2.netfonds.no with local (Exim 3.12 #1 (Debian)) id 16LCTj-0001rh-00 for ; Tue, 01 Jan 2002 01:08:27 +0100 Original-To: ding@gnus.org Original-Path: not-for-mail Original-Newsgroups: gnus.ding Original-Lines: 35 Original-NNTP-Posting-Host: quimbies.gnus.org Original-X-Trace: quimby2.netfonds.no 1009843707 7172 195.204.10.148 (1 Jan 2002 00:08:27 GMT) Original-X-Complaints-To: usenet@quimby2.netfonds.no Original-NNTP-Posting-Date: 1 Jan 2002 00:08:27 GMT Mail-Copies-To: never X-Now-Playing: Jane Siberry's _Child (cd1)_: "Mary's Lullaby" User-Agent: Gnus/5.090004 (Oort Gnus v0.04) XEmacs/21.4 (Copyleft, i386-debian-linux) X-Face: |J writes: > Whats more, there is copyright.el already there to do it for you (at > least in FSF Emacs). Cool. The following patch adds a command to update an entire directory, which I think would be useful. --- copyright.el.~1~ Mon Jan 8 16:59:40 2001 +++ copyright.el Tue Jan 1 01:04:48 2002 @@ -145,6 +145,17 @@ ;; If a write-file-hook returns non-nil, the file is presumed to be written. nil) +;;;###autoload +(defun copyright-update-directory (directory) + "Update the copyright statements in DIRECTORY. +Only .el files will be updated." + (interactive "DUpdate copyrights in: ") + (let ((current-year (format-time-string "%Y"))) + (dolist (file (directory-files directory t "\\.el$")) + (when (string= current-year + (format-time-string "%Y" (nth 5 (file-attributes file)))) + (find-file file) + (copyright-update))))) ;;;###autoload (define-skeleton copyright -- (domestic pets only, the antidote for overdose, milk.) larsi@gnus.org * Lars Magne Ingebrigtsen