changeset 94043:3901934685f5

(copyright-update-directory): New command.
author Reiner Steib <Reiner.Steib@gmx.de>
date Sat, 12 Apr 2008 10:06:28 +0000
parents 62c45d39d360
children eb58232228e8
files lisp/ChangeLog lisp/emacs-lisp/copyright.el
diffstat 2 files changed, 13 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Sat Apr 12 09:47:42 2008 +0000
+++ b/lisp/ChangeLog	Sat Apr 12 10:06:28 2008 +0000
@@ -1,5 +1,8 @@
 2008-04-12  Reiner Steib  <Reiner.Steib@gmx.de>
 
+	* emacs-lisp/copyright.el (copyright-update-directory): New
+	command.
+
 	* ediff-wind.el (ediff-split-window-function)
 	(ediff-merge-split-window-function): Improve custom type.
 
--- a/lisp/emacs-lisp/copyright.el	Sat Apr 12 09:47:42 2008 +0000
+++ b/lisp/emacs-lisp/copyright.el	Sat Apr 12 10:06:28 2008 +0000
@@ -255,6 +255,16 @@
        (message "Copyright extends beyond `copyright-limit' and won't be updated automatically."))
   comment-end \n)
 
+(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))))
+
 (provide 'copyright)
 
 ;; For the copyright sign: