From: Lars Magne Ingebrigtsen <larsi@gnus.org>
Cc: Daniel Pfeiffer <occitan@esperanto.org>
Subject: Re: Time to update the copyrights?
Date: Tue, 01 Jan 2002 01:07:14 +0100 [thread overview]
Message-ID: <m3lmfjdjd9.fsf@quimbies.gnus.org> (raw)
In-Reply-To: <871yhbx980.fsf@squeaker.lickey.com>
"Matt Armstrong" <matt+dated+1010273174.cccad3@lickey.com> 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
next prev parent reply other threads:[~2002-01-01 0:07 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-12-31 23:12 Lars Magne Ingebrigtsen
2001-12-31 23:18 ` Russ Allbery
2001-12-31 23:26 ` Matt Armstrong
2002-01-01 0:07 ` Lars Magne Ingebrigtsen [this message]
2001-12-31 23:26 ` Lars Magne Ingebrigtsen
2002-01-02 14:49 ` Randal L. Schwartz
2002-01-02 15:00 ` Lars Magne Ingebrigtsen
2002-01-02 16:09 ` Russ Allbery
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3lmfjdjd9.fsf@quimbies.gnus.org \
--to=larsi@gnus.org \
--cc=occitan@esperanto.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).