diff lisp/emacs-lisp/copyright.el @ 94043:3901934685f5

(copyright-update-directory): New command.
author Reiner Steib <Reiner.Steib@gmx.de>
date Sat, 12 Apr 2008 10:06:28 +0000
parents cb8d5a37e8ef
children 6743069007ec
line wrap: on
line diff
--- 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: