From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/41543 Path: main.gmane.org!not-for-mail From: Daniel Pfeiffer Newsgroups: gmane.emacs.gnus.general Subject: Re: Fix to the copyright.el regexp to catch multi-line copyrights. Date: Thu, 3 Jan 2002 22:21:53 +0100 Sender: owner-ding@hpc.uh.edu Message-ID: <20020103222153.6f6bf559.occitan@esperanto.org> References: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1035176921 6684 80.91.224.250 (21 Oct 2002 05:08:41 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 05:08:41 +0000 (UTC) Cc: ding@gnus.org Return-Path: Original-Received: (qmail 17375 invoked from network); 3 Jan 2002 21:22:38 -0000 Original-Received: from malifon.math.uh.edu (mail@129.7.128.13) by mastaler.com with SMTP; 3 Jan 2002 21:22:38 -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 16MFJb-0005YJ-00; Thu, 03 Jan 2002 15:22:19 -0600 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Thu, 03 Jan 2002 15:22:10 -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 PAA03709 for ; Thu, 3 Jan 2002 15:21:57 -0600 (CST) Original-Received: (qmail 17364 invoked by alias); 3 Jan 2002 21:22:00 -0000 Original-Received: (qmail 17354 invoked from network); 3 Jan 2002 21:22:00 -0000 Original-Received: from mailout03.sul.t-online.com (194.25.134.81) by gnus.org with SMTP; 3 Jan 2002 21:22:00 -0000 Original-Received: from fwd09.sul.t-online.de by mailout03.sul.t-online.de with smtp id 16MFJA-0001Im-03; Thu, 03 Jan 2002 22:21:52 +0100 Original-Received: from pfdabpc (520007185214-0001@[217.224.26.136]) by fmrl09.sul.t-online.com with smtp id 16MFJ1-0U1u9QC; Thu, 3 Jan 2002 22:21:43 +0100 Original-To: Lars Magne Ingebrigtsen In-Reply-To: X-Mailer: Sylpheed version 0.6.6 (GTK+ 1.2.10; i586-pc-linux-gnu) X-Operating-System: Linux of course :-) X-Face: #O4jYYB1q_#GM@+5bpI17zYh*qp]@lt"%.HQGbezyU>Cm@cp>rdE97{c:@). kR3O3H&LeNb(Q\/E^f{g|i~#u\4!\lJ"jR;Cx&[\,\xjKcLei-_1\d&TAm\E3&(c|>cQIoik]V8Vdf Qs)St&=rh'+N6/WxXf.VfUnD[<;9{#[ZWC>]FP$xVRgTLssqs)7nQ'sH@l[9b5oo1@llkNJPx;&H(^ o~/ X-Sender: 520007185214-0001@t-dialin.net Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:41543 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:41543 Hello Lars, Lars Magne Ingebrigtsen skribis: > MIME-Version: 1.0 > Content-Type: text/plain; charset=utf-8 > Content-Transfer-Encoding: quoted-printable your mailer seems to be broken, this resulted in an illegible regexp: > (defcustom copyright-regexp > "\\([\251=C2=81=C2=A9]\\|@copyright{}\\|[Cc]opyright\\s *:?\\s *(C)\ > \\|[Cc]opyright\\s *:?\\s *[\251=C2=81=C2=A9]\\)\ > -\\s *\\([1-9][-0-9, ']*[0-9]+\\)" > +\\s *\\([1-9][-0-9, ';\n\t]*[0-9]+\\)" Anyways, when you get this sorted out check who the maintainer for this is -- I haven't touched it in years. > +(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))))) That's a very questionable approach! Why would I want to do it only for .el files? And why precisely for a directory? Better find out how the file-name shell pattern expansion works and use that. And what's the use of opening a whole bunch of files? At the end there should be some save-buffers-dialogue for only those files that were opened and modified! Daniel