emacs-devel
[Top][All Lists]
Advanced

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

copyright-update-directory / Copyright at the bottom of files


From: Reiner Steib
Subject: copyright-update-directory / Copyright at the bottom of files
Date: Sun, 02 Mar 2008 16:31:00 +0100
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.1.91 (gnu/linux)

Hi,

(1) copyright-update-directory

I found the command `copyright-update-directory' (see below) quite
handy for updating the copyright years in Gnus (v5_10 branch).

But maybe such a functionality is already there?  Glenn, how did you
handle updating the years and the switch to GPLv3?

Unless there are objections or there is a better solution available,
I'll add this to `copyright.el' in a few days:

--8<---------------cut here---------------start------------->8---
(defun copyright-update-directory (directory match)
  "Update copyright notice for all files in DIRECTORY matching MATCH."
  (interactive "DDirectory: \nMFilenames matching: ")
  (dolist (file (directory-files directory t match nil))
    (find-file file)
    (let ((copyright-query nil))
      (copyright-update))
    (save-buffer)
    (kill-buffer (current-buffer))))
--8<---------------cut here---------------end--------------->8---

(2) Update copyright at the bottom of files

As because of `copyright-limit's default of 2000, it fails to update
the years in (Gnus) ChangeLog files.  Maybe `copyright-update' should
search at the bottom of the file as well?

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/




reply via email to

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